freemind.modes.mindmapmode
Class MindMapMapModel
java.lang.Object
javax.swing.tree.DefaultTreeModel
freemind.modes.MapAdapter
freemind.modes.mindmapmode.MindMapMapModel
- All Implemented Interfaces:
- MindMap, java.io.Serializable, javax.swing.tree.TreeModel
public class MindMapMapModel
- extends MapAdapter
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.tree.DefaultTreeModel |
asksAllowsChildren, listenerList, root |
|
Method Summary |
void |
changeNode(MindMapNode node,
java.lang.String newText)
|
void |
destroy()
When a map is closed, this method is called. |
java.lang.String |
getAsHTML(java.util.List mindMapNodes)
|
java.lang.String |
getAsPlainText(java.util.List mindMapNodes)
|
java.lang.String |
getAsRTF(java.util.List mindMapNodes)
|
void |
getFilteredXml(java.io.Writer fileout)
writes the content of the map to a writer. |
MindMapLinkRegistry |
getLinkRegistry()
|
java.lang.String |
getRestoreable()
Returns a string that may be given to the modes restore()
to get this map again. |
void |
getXml(java.io.Writer fileout)
writes the content of the map to a writer. |
void |
load(java.io.File file)
|
void |
load(java.net.URL url)
|
boolean |
save(java.io.File file)
Return the success of saving |
boolean |
saveRTF(java.util.List mindMapNodes,
java.io.BufferedWriter fileout)
|
boolean |
saveTXT(MindMapNodeModel rootNodeOfBranch,
java.io.File file)
|
java.lang.String |
toString()
|
java.lang.String |
tryToLock(java.io.File file)
Attempts to lock the map using a semaphore file |
| Methods inherited from class freemind.modes.MapAdapter |
fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getFile, getFilter, getFrame, getModeController, getNumberOfChangesSinceLastSave, getRegistry, getRootNode, getText, getURL, isReadOnly, isSaved, nodeChanged, nodeRefresh, setFile, setFilter, setRoot, setSaved |
| Methods inherited from class javax.swing.tree.DefaultTreeModel |
addTreeModelListener, asksAllowsChildren, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.tree.TreeModel |
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged |
RESTORE_MODE_MIND_MAP
public static final java.lang.String RESTORE_MODE_MIND_MAP
- See Also:
- Constant Field Values
MindMapMapModel
public MindMapMapModel(FreeMindMain frame,
ModeController modeController)
MindMapMapModel
public MindMapMapModel(MindMapNodeModel root,
FreeMindMain frame,
ModeController modeController)
getLinkRegistry
public MindMapLinkRegistry getLinkRegistry()
- Specified by:
getLinkRegistry in interface MindMap- Overrides:
getLinkRegistry in class MapAdapter
- Returns:
- returns the link registry associated with this mode, or null, if no registry is present.
getRestoreable
public java.lang.String getRestoreable()
- Description copied from interface:
MindMap
- Returns a string that may be given to the modes restore()
to get this map again. The Mode must take care that
two different maps don't give the same restoreable
key.
- Specified by:
getRestoreable in interface MindMap- Overrides:
getRestoreable in class MapAdapter
changeNode
public void changeNode(MindMapNode node,
java.lang.String newText)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getAsHTML
public java.lang.String getAsHTML(java.util.List mindMapNodes)
- Specified by:
getAsHTML in interface MindMap- Overrides:
getAsHTML in class MapAdapter
getAsPlainText
public java.lang.String getAsPlainText(java.util.List mindMapNodes)
- Specified by:
getAsPlainText in interface MindMap- Overrides:
getAsPlainText in class MapAdapter
saveTXT
public boolean saveTXT(MindMapNodeModel rootNodeOfBranch,
java.io.File file)
getAsRTF
public java.lang.String getAsRTF(java.util.List mindMapNodes)
- Specified by:
getAsRTF in interface MindMap- Overrides:
getAsRTF in class MapAdapter
saveRTF
public boolean saveRTF(java.util.List mindMapNodes,
java.io.BufferedWriter fileout)
save
public boolean save(java.io.File file)
- Return the success of saving
- Specified by:
save in class MapAdapter
getXml
public void getXml(java.io.Writer fileout)
throws java.io.IOException
- Description copied from interface:
MindMap
- writes the content of the map to a writer.
- Throws:
java.io.IOException
getFilteredXml
public void getFilteredXml(java.io.Writer fileout)
throws java.io.IOException
- Description copied from interface:
MindMap
- writes the content of the map to a writer.
- Throws:
java.io.IOException
tryToLock
public java.lang.String tryToLock(java.io.File file)
throws java.lang.Exception
- Attempts to lock the map using a semaphore file
- Overrides:
tryToLock in class MapAdapter
- Returns:
- If the map is locked, return the name of the locking user, otherwise return null.
- Throws:
Exception, - when the locking failed for other reasons than that the
file is being edited.
java.lang.Exception
load
public void load(java.net.URL url)
throws java.io.FileNotFoundException,
java.io.IOException,
XMLParseException,
java.net.URISyntaxException
- Specified by:
load in class MapAdapter
- Throws:
java.io.FileNotFoundException
java.io.IOException
XMLParseException
java.net.URISyntaxException
load
public void load(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
- Overrides:
load in class MapAdapter
- Throws:
java.io.FileNotFoundException
java.io.IOException
destroy
public void destroy()
- When a map is closed, this method is called.
- Specified by:
destroy in interface MindMap- Overrides:
destroy in class MapAdapter