public static interface Proxy.ControllerRO extends ControllerRO
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends Node> |
find(boolean withAncestors,
boolean withDescendants,
groovy.lang.Closure<java.lang.Boolean> closure)
Starting from root node, recursively searches for nodes for which
condition.check(node)
returns true and adds their ancestor or descendant nodes if required. |
java.util.List<? extends Node> |
find(groovy.lang.Closure<java.lang.Boolean> closure)
Starting from the root node, recursively searches for nodes (in breadth-first sequence) for which
closure.call(node) returns true. |
java.util.List<? extends Node> |
find(org.freeplane.features.filter.condition.ICondition condition)
Deprecated.
since 1.2 use
ControllerRO.find(NodeCondition) instead. |
export, find, find, findAll, findAllDepthFirst, getExportTypeDescriptions, getFreeplaneVersion, getSelected, getSelecteds, getSortedSelection, getUserDirectory, getZoom, isInteractive
java.util.List<? extends Node> find(groovy.lang.Closure<java.lang.Boolean> closure)
closure.call(node)
returns true.
A find method that uses a Groovy closure ("block") for simple custom searches. As this closure
will be called with a node as an argument (to be referenced by it
) the search can
evaluate every node property, like attributes, icons, node text or notes.
Examples:
def nodesWithNotes = c.find{ it.noteText != null } def matchingNodes = c.find{ it.text.matches(".\*\d.*") } def texts = matchingNodes.collect{ it.text } print "node texts containing numbers:\n " + texts.join("\n ")See
Proxy.NodeRO.find(Closure)
for searches on subtrees.closure
- a Groovy closure that returns a boolean value. The closure will receive
a NodeModel as an argument which can be tested for a match.closure.call(NodeModel)
returns true.java.util.List<? extends Node> find(boolean withAncestors, boolean withDescendants, groovy.lang.Closure<java.lang.Boolean> closure)
condition.check(node)
returns true and adds their ancestor or descendant nodes if required.Proxy.Controller.find(NodeCondition)
for details.@Deprecated java.util.List<? extends Node> find(org.freeplane.features.filter.condition.ICondition condition)
ControllerRO.find(NodeCondition)
instead.condition.checkNode(node)
returns true.condition
- condition to match the search.