org.freeplane.plugin.script.proxy

## Interface Proxy.ControllerRO

- All Superinterfaces:
    ControllerRO
  All Known Subinterfaces:
    Proxy.Controller
  Enclosing interface:
    Proxy

      public static interface Proxy.ControllerRO
      extends ControllerRO

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    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.

    - ### Methods inherited from interface org.freeplane.api.ControllerRO

      `export, find, find, findAll, findAllDepthFirst, getExportTypeDescriptions, getFreeplaneVersion, getSelected, getSelecteds, getSortedSelection, getUserDirectory, getZoom, isInteractive`

- - ### Method Detail

    - #### find

          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.

      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.
      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 which `condition.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 use `ControllerRO.find(NodeCondition)` instead.
      Starting from the root node, recursively searches for nodes for which `condition.checkNode(node)` returns true.
      Parameters:
        `condition` - condition to match the search.
      Returns:
        the nodes which match the condition.