Package org.freeplane.api
Interface MindMap
- All Superinterfaces:
MindMapRO
- All Known Subinterfaces:
Map
,Proxy.Map
,Proxy.MindMap
The map a node belongs to:
node.map
- read-write.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(NodeChangeListener listener) boolean
close
(boolean force, boolean allowInteraction) closes a map.void
Evaluate all formulas in the map.void
Evaluate probably changed formulas in the map.void
filter
(boolean showAncestors, boolean showDescendants, NodeCondition condition) install a lambda as the current filter in this map.void
filter
(NodeCondition condition) Withfilter(boolean, boolean, NodeCondition)
neither ancestors not descendants of the visible nodes are shown.returns an accessor to the map specific storage.void
reinstalls the previously undone filter if there is any.void
removeListener
(NodeChangeListener listener) boolean
save
(boolean allowInteraction) saves the map to disk.boolean
saves the map to disk.void
setBackgroundColor
(Color color) void
setBackgroundColorCode
(String rgbString) void
setFilter
(boolean showAncestors, boolean showDescendants, NodeCondition condition) alias forfilter(boolean, boolean, NodeCondition)
void
setFilter
(NodeCondition condition) alias forfilter(NodeCondition)
.void
Sets the map (frame/tab) title.void
setSaved
(boolean isSaved) void
removes the current filter and reinstalls the previous filter if there is any.Methods inherited from interface org.freeplane.api.MindMapRO
getBackgroundColor, getBackgroundColorCode, getFile, getName, getRoot, getRootNode, isSaved, node
-
Method Details
-
close
boolean close(boolean force, boolean allowInteraction) closes a map. Note that there is no undo for this method!- Parameters:
force
- close map even if there are unsaved changes.allowInteraction
-if (allowInteraction && ! force)
a saveAs dialog will be opened if there are unsaved changes.- Returns:
- false if the saveAs was cancelled by the user and true otherwise.
- Throws:
RuntimeException
- if the map contains changes and parameter force is false.- Since:
- 1.2
-
save
boolean save(boolean allowInteraction) saves the map to disk. Note that there is no undo for this method.- Parameters:
allowInteraction
- if a saveAs dialog should be opened if the map has no assigned URL so far.- Returns:
- false if the saveAs was cancelled by the user and true otherwise.
- Throws:
RuntimeException
- if the map has no assigned URL and parameter allowInteraction is false.- Since:
- 1.2
-
saveAs
saves the map to disk. Note that there is no undo for this method.- Parameters:
file
- the location of the file to be saved.- Returns:
- false if the saveAs was cancelled by the user and true otherwise.
- Throws:
RuntimeException
- if the map has no assigned URL and parameter allowInteraction is false.- Since:
- 1.2
-
setSaved
void setSaved(boolean isSaved) - Since:
- 1.2
-
setName
Sets the map (frame/tab) title. Note that there is no undo for this method!- Since:
- 1.2
-
setBackgroundColor
- Since:
- 1.2
-
setBackgroundColorCode
- Parameters:
rgbString
- a HTML color spec like #ff0000 (red) or #222222 (darkgray).- Since:
- 1.2
-
filter
Withfilter(boolean, boolean, NodeCondition)
neither ancestors not descendants of the visible nodes are shown.- Since:
- 1.2
- See Also:
-
setFilter
alias forfilter(NodeCondition)
. Enables assignment to thefilter
property.- Since:
- 1.2
-
filter
install a lambda as the current filter in this map. Ifcondition
is null then filtering will be disabled. The filter state of a node can be checked byNodeRO.isVisible()
.
To undo filtering use Tools → Undo. After execution of the following you have to use it seven times to return to the initial filter state.// show only matching nodes node.map.filter{ it.text.contains("todo") } // equivalent: node.map.filter = { it.text.contains("todo") } // show ancestors of matching nodes node.map.filter(true, false){ it.text.contains("todo") } // equivalent: node.map.setFilter(true, false, { it.text.contains("todo") }) // show descendants of matching nodes node.map.filter(false, true){ it.text.contains("todo") } // equivalent: node.map.setFilter(false, true, { it.text.contains("todo") }) // remove filter node.map.filter = null
- Parameters:
showAncestors
- whether to show ancestors or not.showDescendants
- whether to show descendant or not.condition
- filter the map using this lamda.- Since:
- 1.2
-
setFilter
alias forfilter(boolean, boolean, NodeCondition)
- Since:
- 1.2
- See Also:
-
redoFilter
void redoFilter()reinstalls the previously undone filter if there is any. Note: undo/redo for filters is separate to the undo/redo for other map state.- Since:
- 1.2
-
undoFilter
void undoFilter()removes the current filter and reinstalls the previous filter if there is any. Note: undo/redo for filters is separate to the undo/redo for other map state.- Since:
- 1.2
-
getStorage
Properties getStorage()returns an accessor to the map specific storage. The value is never null- Since:
- 1.3.6
-
evaluateAllFormulas
void evaluateAllFormulas()Evaluate all formulas in the map. Each formula in the map is evaluated not depending on if it was already cached.- Since:
- 1.7.2
-
evaluateOutdatedFormulas
void evaluateOutdatedFormulas()Evaluate probably changed formulas in the map. Each formula not having valid result in the cache is evaluated.- Since:
- 1.7.2
-
addListener
-
removeListener
-