Proxy.ControllerRO

org.freeplane.plugin.script.proxy

## インタフェース Proxy.ControllerRO

- 既知のサブインタフェースのリスト:
    Proxy.Controller
  含まれているインタフェース:
    Proxy

      public static interface Proxy.ControllerRO

  Access to global state: `c` - read-only.

- - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `void` | `export(Proxy.Map map, java.io.File destinationFile, java.lang.String exportTypeDescription, boolean overwriteExisting)` exports map to destination file, example: println c.getExportTypeDescriptions.join('\n') boolean overwriteExistingFile = true c.export(node.map, new File('/tmp/t.png'), 'Portable Network Graphic (PNG) (.png)', overwriteExistingFile)
    `java.util.List<Proxy.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<Proxy.Node>` | `find(org.freeplane.features.filter.condition.ICondition condition)` 非推奨です。 since 1.2 use `find(Closure)` instead.
    `java.util.List<Proxy.Node>` | `findAll()` Returns all nodes of the map in breadth-first order, that is, for the following map, 1 1.1 1.1.1 1.1.2 1.2 2 [1, 1.1, 1.1.1, 1.1.2, 1.2, 2] is returned.
    `java.util.List<Proxy.Node>` | `findAllDepthFirst()` Returns all nodes of the map in depth-first order, that is, for the following map, 1 1.1 1.1.1 1.1.2 1.2 2 [1.1.1, 1.1.2, 1.1, 1.2, 1, 2] is returned.
    `java.util.List<java.lang.String>` | `getExportTypeDescriptions()`
    `FreeplaneVersion` | `getFreeplaneVersion()` returns Freeplane version.
    `Proxy.Node` | `getSelected()` if multiple nodes are selected returns one (arbitrarily chosen) selected node or the selected node for a single node selection.
    `java.util.List<Proxy.Node>` | `getSelecteds()` A read-only list of selected nodes.
    `java.util.List<Proxy.Node>` | `getSortedSelection(boolean differentSubtrees)` returns List of Node objects sorted on Y
    `java.io.File` | `getUserDirectory()` returns the directory where user settings, logfiles, templates etc. are stored.
    `float` | `getZoom()` returns the current zoom factor.
    `boolean` | `isInteractive()` returns false if the system 'nonInteractive' is set.

- - ### メソッドの詳細

    - #### getSelected

          Proxy.Node getSelected()

      if multiple nodes are selected returns one (arbitrarily chosen) selected node or the selected node for a single node selection.

    - #### getSelecteds

          java.util.List<Proxy.Node> getSelecteds()

      A read-only list of selected nodes. That is you cannot select a node by adding it to the returned list.

    - #### getSortedSelection

          java.util.List<Proxy.Node> getSortedSelection(boolean differentSubtrees)

      returns List of Node objects sorted on Y
      パラメータ:
        `differentSubtrees` - if true children/grandchildren/grandgrandchildren/... nodes of selected parent nodes are excluded from the result.

    - #### getFreeplaneVersion

          FreeplaneVersion getFreeplaneVersion()

      returns Freeplane version. Use it like this:

             import org.freeplane.core.util.FreeplaneVersion
             import org.freeplane.core.ui.components.UITools

             def required = FreeplaneVersion.getVersion("1.1.2");
             if (c.freeplaneVersion < required)
                 UITools.errorMessage("Freeplane version " + c.freeplaneVersion
                     + " not supported - update to at least " + required);

    - #### getUserDirectory

          java.io.File getUserDirectory()

      returns the directory where user settings, logfiles, templates etc. are stored.
      導入されたバージョン:
        1.2

    - #### find

          java.util.List<Proxy.Node> find(org.freeplane.features.filter.condition.ICondition condition)

      非推奨です。 since 1.2 use `find(Closure)` instead.
      Starting from the root node, recursively searches for nodes for which `condition.checkNode(node)` returns true.
      関連項目:
        `for searches on subtrees`

    - #### find

          java.util.List<Proxy.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 ")

      パラメータ:
        `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.
      戻り値:
        all nodes for which `closure.call(NodeModel)` returns true.
      関連項目:
        `for searches on subtrees`

    - #### findAll

          java.util.List<Proxy.Node> findAll()

      Returns all nodes of the map in breadth-first order, that is, for the following map,

            1
              1.1
                1.1.1
                1.1.2
              1.2
            2

      [1, 1.1, 1.1.1, 1.1.2, 1.2, 2] is returned.
      導入されたバージョン:
        1.2
      関連項目:
        `for searches on subtrees`

    - #### findAllDepthFirst

          java.util.List<Proxy.Node> findAllDepthFirst()

      Returns all nodes of the map in depth-first order, that is, for the following map,

            1
              1.1
                1.1.1
                1.1.2
              1.2
            2

      [1.1.1, 1.1.2, 1.1, 1.2, 1, 2] is returned.
      導入されたバージョン:
        1.2
      関連項目:
        `for subtrees`

    - #### getZoom

          float getZoom()

      returns the current zoom factor. A value of 1 means 100%.
      導入されたバージョン:
        1.2

    - #### isInteractive

          boolean isInteractive()

      returns false if the system 'nonInteractive' is set. This can be used in actions to not open dialogs etc.
      導入されたバージョン:
        1.2

    - #### getExportTypeDescriptions

          java.util.List<java.lang.String> getExportTypeDescriptions()

    - #### export

          void export(Proxy.Map map,
                    java.io.File destinationFile,
                    java.lang.String exportTypeDescription,
                    boolean overwriteExisting)

      exports map to destination file, example:

             println c.getExportTypeDescriptions.join('\n')
             boolean overwriteExistingFile = true
             c.export(node.map, new File('/tmp/t.png'), 'Portable Network Graphic (PNG) (.png)', overwriteExistingFile)

      パラメータ:
        `exportTypeDescription` - Use `getExportTypeDescriptions()` to look up available exportTypes
      導入されたバージョン:
        1.3.5