public class MindMapMapModel extends MapAdapter
Modifier and Type | Class and Description |
---|---|
static interface |
MindMapMapModel.ReaderCreator |
static class |
MindMapMapModel.StringReaderCreator |
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
EXPECTED_START_STRINGS
The current version and all other version that don't need
XML update for sure.
|
static java.lang.String |
MAP_INITIAL_START |
static java.lang.String |
RESTORE_MODE_MIND_MAP |
changesPerformedSinceLastSave, logger, mModeController, readOnly
Constructor and Description |
---|
MindMapMapModel(FreeMindMain frame,
ModeController modeController) |
MindMapMapModel(MindMapNodeModel root,
FreeMindMain frame,
ModeController modeController) |
Modifier and Type | Method and Description |
---|---|
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 |
getXml(java.io.Writer fileout,
boolean saveInvisible)
writes the content of the map to a writer.
|
void |
getXml(java.io.Writer fileout,
boolean saveInvisible,
MindMapNode pRootNode)
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
|
fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getFile, getFilter, getFrame, getModeController, getNumberOfChangesSinceLastSave, getRegistry, getRootNode, getText, getURL, isReadOnly, isSaved, nodeChanged, nodeRefresh, setFile, setFilter, setRoot, setSaved
addTreeModelListener, asksAllowsChildren, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPathToRoot, nodeStructureChanged
public static final java.lang.String MAP_INITIAL_START
public static final java.lang.String RESTORE_MODE_MIND_MAP
public static final java.lang.String[] EXPECTED_START_STRINGS
public MindMapMapModel(FreeMindMain frame, ModeController modeController)
public MindMapMapModel(MindMapNodeModel root, FreeMindMain frame, ModeController modeController)
public MindMapLinkRegistry getLinkRegistry()
getLinkRegistry
in interface MindMap
getLinkRegistry
in class MapAdapter
public java.lang.String getRestoreable()
MindMap
getRestoreable
in interface MindMap
getRestoreable
in class MapAdapter
public void changeNode(MindMapNode node, java.lang.String newText)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getAsHTML(java.util.List mindMapNodes)
getAsHTML
in interface MindMap
getAsHTML
in class MapAdapter
public java.lang.String getAsPlainText(java.util.List mindMapNodes)
getAsPlainText
in interface MindMap
getAsPlainText
in class MapAdapter
public boolean saveTXT(MindMapNodeModel rootNodeOfBranch, java.io.File file)
public java.lang.String getAsRTF(java.util.List mindMapNodes)
getAsRTF
in interface MindMap
getAsRTF
in class MapAdapter
public boolean saveRTF(java.util.List mindMapNodes, java.io.BufferedWriter fileout)
public boolean save(java.io.File file)
save
in class MapAdapter
public void getXml(java.io.Writer fileout, boolean saveInvisible) throws java.io.IOException
java.io.IOException
public void getXml(java.io.Writer fileout, boolean saveInvisible, MindMapNode pRootNode) throws java.io.IOException
java.io.IOException
public void getXml(java.io.Writer fileout) throws java.io.IOException
MindMap
java.io.IOException
public void getFilteredXml(java.io.Writer fileout) throws java.io.IOException
MindMap
java.io.IOException
public java.lang.String tryToLock(java.io.File file) throws java.lang.Exception
tryToLock
in class MapAdapter
Exception,
- when the locking failed for other reasons than that the
file is being edited.java.lang.Exception
public void load(java.net.URL url) throws java.io.FileNotFoundException, java.io.IOException, XMLParseException, java.net.URISyntaxException
load
in class MapAdapter
java.io.FileNotFoundException
java.io.IOException
XMLParseException
java.net.URISyntaxException
public void load(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
load
in class MapAdapter
java.io.FileNotFoundException
java.io.IOException
public void destroy()
destroy
in interface MindMap
destroy
in class MapAdapter