Interface Proxy.ControllerRO
- All Superinterfaces:
ControllerRO
- All Known Subinterfaces:
Proxy.Controller
- Enclosing interface:
- Proxy
public static interface Proxy.ControllerRO extends ControllerRO
-
Method Summary
Modifier and Type Method 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 whichcondition.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 whichclosure.call(node)
returns true.java.util.List<? extends Node>
find(org.freeplane.features.filter.condition.ICondition condition)
Deprecated.Methods inherited from interface org.freeplane.api.ControllerRO
export, find, find, findAll, findAllDepthFirst, getExportTypeDescriptions, getFreeplaneVersion, getSelected, getSelecteds, getSortedSelection, getUserDirectory, getViewRoot, getZoom, isInteractive
-
Method Details
-
find
Starting from the root node, recursively searches for nodes (in breadth-first sequence) for whichclosure.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 ")
SeeProxy.NodeRO.find(Closure)
for searches on subtrees.- Parameters:
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.- Returns:
- all nodes for which
closure.call(NodeModel)
returns true.
-
find
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 whichcondition.check(node)
returns true and adds their ancestor or descendant nodes if required.- Since:
- 1.7.4
See
Proxy.Controller.find(NodeCondition)
for details.
-
find
@Deprecated java.util.List<? extends Node> find(org.freeplane.features.filter.condition.ICondition condition)Deprecated.since 1.2 useControllerRO.find(NodeCondition)
instead.Starting from the root node, recursively searches for nodes for whichcondition.checkNode(node)
returns true.- Parameters:
condition
- condition to match the search.- Returns:
- the nodes which match the condition.
-
ControllerRO.find(NodeCondition)
instead.