org.freeplane.api

## Interface Controller

- All Superinterfaces:
    ControllerRO, HeadlessMapCreator
  All Known Subinterfaces:
    Proxy.Controller

      public interface Controller
      extends ControllerRO, HeadlessMapCreator

  Access to global state: in scripts, this is available as global variable `c` - read-write.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `centerOnNode(Node center)`
    `void` | `deactivateUndo()` reset undo / redo lists and deactivate Undo for current script
    `void` | `edit(Node node)` Starts editing node, normally in the inline editor.
    `void` | `editInPopup(Node node)` opens the appropriate popup text editor.
    `java.util.concurrent.ExecutorService` | `getMainThreadExecutorService()`
    `default java.util.List<? extends Map>` | `getOpenMaps()` Deprecated. since 1.7.10 - use `getOpenMindMaps()`
    `java.util.List<? extends MindMap>` | `getOpenMindMaps()` a list of all opened maps.
    `Loader` | `load(java.io.File file)` Deprecated. since 1.7.5 - use `mapLoader(File)`
    `Loader` | `load(java.lang.String input)` Deprecated. since 1.7.5 - use `mapLoader(String)`
    `Loader` | `load(java.net.URL url)` Deprecated. since 1.7.5 - use `mapLoader(URL)`
    `Loader` | `mapLoader(java.io.File file)` Returns `Loader` for accessing or loading mind map from file.
    `Loader` | `mapLoader(java.lang.String file)` Returns `Loader` for accessing or loading mind map from file.
    `Loader` | `mapLoader(java.net.URL file)` Returns `Loader` for accessing or loading mind map from URL.
    `default Map` | `newMap()` Deprecated. since 1.7.10 - use `newMindMap()`
    `default Map` | `newMap(java.net.URL url)` Deprecated. since 1.6.16 - use `mapLoader(URL)`
    `default Map` | `newMapFromTemplate(java.io.File templateFile)` Deprecated. since 1.6.16 - use `mapLoader(File)`
    `MindMap` | `newMindMap()` opens a new map with a default name in the foreground.
    `void` | `redo()` invokes redo once - for testing purposes mainly.
    `void` | `select(java.util.Collection<? extends Node> toSelect)` selects multiple Nodes.
    `void` | `select(Node toSelect)`
    `void` | `selectBranch(Node branchRoot)` selects branchRoot and all children
    `void` | `selectMultipleNodes(java.util.Collection<? extends Node> toSelect)` same as `select(Collection)`
    `void` | `setStatusInfo(java.lang.String info)` The main info for the status line with key="standard", use null to remove.
    `void` | `setStatusInfo(java.lang.String infoPanelKey, javax.swing.Icon icon)` Deprecated. since 1.2 - use `setStatusInfo(String, String, String)`
    `void` | `setStatusInfo(java.lang.String infoPanelKey, java.lang.String info)` Info for status line, null to remove.
    `void` | `setStatusInfo(java.lang.String infoPanelKey, java.lang.String info, java.lang.String iconKey)` Info for status line - text and icon - null stands for "remove" (text or icon)
    `void` | `setZoom(float ratio)` a value of 1 means 100%.
    `void` | `undo()` invokes undo once - for testing purposes mainly.

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

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

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

      `getAttributeValueSerializer, mapLoader, script, script`

- - ### Method Detail

    - #### centerOnNode

          void centerOnNode(Node center)

    - #### edit

          void edit(Node node)

      Starts editing node, normally in the inline editor. Does not block until edit has finished.
      Since:
        1.2.2

    - #### editInPopup

          void editInPopup(Node node)

      opens the appropriate popup text editor. Does not block until edit has finished.
      Since:
        1.2.2

    - #### select

          void select(Node toSelect)

    - #### select

          void select(java.util.Collection<? extends Node> toSelect)

      selects multiple Nodes.
      Since:
        1.4

    - #### selectBranch

          void selectBranch(Node branchRoot)

      selects branchRoot and all children

    - #### selectMultipleNodes

          void selectMultipleNodes(java.util.Collection<? extends Node> toSelect)

      same as `select(Collection)`

    - #### deactivateUndo

          void deactivateUndo()

      reset undo / redo lists and deactivate Undo for current script

    - #### undo

          void undo()

      invokes undo once - for testing purposes mainly.
      Since:
        1.2

    - #### redo

          void redo()

      invokes redo once - for testing purposes mainly.
      Since:
        1.2

    - #### setStatusInfo

          void setStatusInfo(java.lang.String info)

      The main info for the status line with key="standard", use null to remove. Removes icon if there is one.

    - #### setStatusInfo

          void setStatusInfo(java.lang.String infoPanelKey,
                             java.lang.String info)

      Info for status line, null to remove. Removes icon if there is one.
      See Also:
        `setStatusInfo(String, String, String)`

    - #### setStatusInfo

          void setStatusInfo(java.lang.String infoPanelKey,
                             java.lang.String info,
                             java.lang.String iconKey)

      Info for status line - text and icon - null stands for "remove" (text or icon)
      Parameters:
        `infoPanelKey` - "standard" is the left most standard info panel. If a panel with this name doesn't exist it will be created.
        `info` - Info text
        `iconKey` - key as those that are used for nodes (see `Icons.addIcon(String)`).

               println("all available icon keys: " + FreeplaneIconUtils.listStandardIconKeys())
               c.setStatusInfo("standard", "hi there!", "button_ok");

      Since:
        1.2
      See Also:
        `FreeplaneIconFactory`

    - #### setStatusInfo

          @Deprecated
          void setStatusInfo(java.lang.String infoPanelKey,
                                          javax.swing.Icon icon)

      Deprecated. since 1.2 - use `setStatusInfo(String, String, String)`

    - #### load

          @Deprecated
          Loader load(java.io.File file)

      Deprecated. since 1.7.5 - use `mapLoader(File)`
      Specified by:
        `load` in interface `HeadlessMapCreator`

    - #### load

          @Deprecated
          Loader load(java.net.URL url)

      Deprecated. since 1.7.5 - use `mapLoader(URL)`
      Specified by:
        `load` in interface `HeadlessMapCreator`

    - #### load

          @Deprecated
          Loader load(java.lang.String input)

      Deprecated. since 1.7.5 - use `mapLoader(String)`
      Specified by:
        `load` in interface `HeadlessMapCreator`

    - #### mapLoader

          Loader mapLoader(java.io.File file)

      Returns `Loader` for accessing or loading mind map from file.
      Specified by:
        `mapLoader` in interface `HeadlessMapCreator`
      Since:
        1.7.5

    - #### mapLoader

          Loader mapLoader(java.net.URL file)

      Returns `Loader` for accessing or loading mind map from URL.
      Specified by:
        `mapLoader` in interface `HeadlessMapCreator`
      Since:
        1.7.5

    - #### mapLoader

          Loader mapLoader(java.lang.String file)

      Returns `Loader` for accessing or loading mind map from file.
      Specified by:
        `mapLoader` in interface `HeadlessMapCreator`
      Since:
        1.7.5

    - #### newMap

          default Map newMap()

      Deprecated. since 1.7.10 - use `newMindMap()`
      opens a new map with a default name in the foreground.
      Since:
        1.2

    - #### newMap

          @Deprecated
          default Map newMap(java.net.URL url)

      Deprecated. since 1.6.16 - use `mapLoader(URL)`
      Since:
        1.2

    - #### newMapFromTemplate

          @Deprecated
          default Map newMapFromTemplate(java.io.File templateFile)

      Deprecated. since 1.6.16 - use `mapLoader(File)`
      Since:
        1.5

    - #### newMindMap

          MindMap newMindMap()

      opens a new map with a default name in the foreground.
      Since:
        1.7.10

    - #### setZoom

          void setZoom(float ratio)

      a value of 1 means 100%.
      Since:
        1.2

    - #### getOpenMaps

          @Deprecated
          default java.util.List<? extends Map> getOpenMaps()

      Deprecated. since 1.7.10 - use `getOpenMindMaps()`
      a list of all opened maps.
      Since:
        1.5

    - #### getOpenMindMaps

          java.util.List<? extends MindMap> getOpenMindMaps()

      a list of all opened maps.
      Since:
        1.5

    - #### getMainThreadExecutorService

          java.util.concurrent.ExecutorService getMainThreadExecutorService()

      Since:
        1.7.10