public interface MindMap extends MindMapRO
node.map
- read-write.Modifier and Type | Method and Description |
---|---|
void |
addListener(NodeChangeListener listener) |
boolean |
close(boolean force,
boolean allowInteraction)
closes a map.
|
void |
evaluateAllFormulas()
Evaluate all formulas in the map.
|
void |
evaluateOutdatedFormulas()
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)
With
filter(boolean, boolean, NodeCondition) neither ancestors not descendants of the visible nodes are shown. |
Properties |
getStorage()
returns an accessor to the map specific storage.
|
void |
hide(boolean hideAncestors,
boolean hideDescendants,
NodeCondition condition)
Hides nodes matching given condition.
|
void |
redoFilter()
reinstalls the previously undone filter if there is any.
|
void |
removeListener(NodeChangeListener listener) |
boolean |
save(boolean allowInteraction)
saves the map to disk.
|
boolean |
saveAs(java.io.File file)
saves the map to disk.
|
void |
setBackgroundColor(java.awt.Color color) |
void |
setBackgroundColorCode(java.lang.String rgbString) |
void |
setFilter(boolean showAncestors,
boolean showDescendants,
NodeCondition condition)
Deprecated.
use filter
|
void |
setFilter(NodeCondition condition)
alias for
filter(NodeCondition) . |
void |
setName(java.lang.String title)
Sets the map (frame/tab) title.
|
void |
setSaved(boolean isSaved) |
void |
undoFilter()
removes the current filter and reinstalls the previous filter if there is any.
|
getBackgroundColor, getBackgroundColorCode, getFile, getName, getRoot, getRootNode, isSaved, node
boolean close(boolean force, boolean allowInteraction)
force
- close map even if there are unsaved changes.allowInteraction
- if (allowInteraction && ! force)
a saveAs dialog will be opened if there are
unsaved changes.java.lang.RuntimeException
- if the map contains changes and parameter force is false.boolean save(boolean allowInteraction)
allowInteraction
- if a saveAs dialog should be opened if the map has no assigned URL so far.java.lang.RuntimeException
- if the map has no assigned URL and parameter allowInteraction is false.boolean saveAs(java.io.File file)
file
- the location of the file to be saved.java.lang.RuntimeException
- if the map has no assigned URL and parameter allowInteraction is false.void setSaved(boolean isSaved)
void setName(java.lang.String title)
void setBackgroundColor(java.awt.Color color)
void setBackgroundColorCode(java.lang.String rgbString)
rgbString
- a HTML color spec like #ff0000 (red) or #222222 (darkgray).void filter(NodeCondition condition)
filter(boolean, boolean, NodeCondition)
neither ancestors not descendants of the visible nodes are shown.filter(boolean, boolean, NodeCondition)
void setFilter(NodeCondition condition)
filter(NodeCondition)
. Enables assignment to the filter
property.void filter(boolean showAncestors, boolean showDescendants, NodeCondition condition)
condition
is null then filtering will
be disabled. The filter state of a node can be checked by NodeRO.isVisible()
. // 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
showAncestors
- whether to show ancestors or not.showDescendants
- whether to show descendant or not.condition
- filter the map using this lamda.void hide(boolean hideAncestors, boolean hideDescendants, NodeCondition condition)
hideAncestors
- whether to hide ancestors or not.hideDescendants
- whether to hide descendant or not.condition
- filter the map using this lamda.filter(boolean, boolean, NodeCondition)
@Deprecated void setFilter(boolean showAncestors, boolean showDescendants, NodeCondition condition)
filter(boolean, boolean, NodeCondition)
filter(boolean, boolean, NodeCondition)
void redoFilter()
void undoFilter()
Properties getStorage()
void evaluateAllFormulas()
void evaluateOutdatedFormulas()
void addListener(NodeChangeListener listener)
void removeListener(NodeChangeListener listener)