Proxy.Map

org.freeplane.plugin.script.proxy

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

- すべてのスーパーインタフェース:
    Proxy.MapRO
  含まれているインタフェース:
    Proxy

      public static interface Proxy.Map
      extends Proxy.MapRO

  The map a node belongs to: `node.map` - read-write.

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

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `boolean` | `close(boolean force, boolean allowInteraction)` closes a map.
    `void` | `filter(boolean showAncestors, boolean showDescendants, groovy.lang.Closure<java.lang.Boolean> closure)` With `filter(Closure)` neither ancestors not descendants of the visible nodes are shown.
    `void` | `filter(groovy.lang.Closure<java.lang.Boolean> closure)` install a Groovy closure as the current filter in this map.
    `Proxy.Properties` | `getStorage()` returns an accessor to the map specific storage.
    `void` | `redoFilter()` reinstalls the previously undone filter if there is any.
    `boolean` | `save(boolean allowInteraction)` saves the map to disk.
    `void` | `setBackgroundColor(java.awt.Color color)`
    `void` | `setBackgroundColorCode(java.lang.String rgbString)`
    `void` | `setFilter(boolean showAncestors, boolean showDescendants, groovy.lang.Closure<java.lang.Boolean> closure)` alias for `setFilter(boolean, boolean, Closure)`
    `void` | `setFilter(groovy.lang.Closure<java.lang.Boolean> closure)` alias for `filter(Closure)`.
    `void` | `setName(java.lang.String title)` Sets the map (frame/tab) title.
    `void` | `setSaved(boolean isSaved)`
    `void` | `undoFilter()` removes the current filter and reinstalls the previous filter if there is any.

    - ### インタフェースから継承されたメソッド org.freeplane.plugin.script.proxy.Proxy.MapRO

      `getBackgroundColor, getBackgroundColorCode, getFile, getName, getRoot, getRootNode, isSaved, node`

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

    - #### close

          boolean close(boolean force,
                      boolean allowInteraction)

      closes a map. Note that there is no undo for this method!
      パラメータ:
        `force` - close map even if there are unsaved changes.
        `allowInteraction` - if (allowInteraction && ! force) a saveAs dialog will be opened if there are unsaved changes.
      戻り値:
        false if the saveAs was cancelled by the user and true otherwise.
      例外:
        `java.lang.RuntimeException` - if the map contains changes and parameter force is false.
      導入されたバージョン:
        1.2

    - #### save

          boolean save(boolean allowInteraction)

      saves the map to disk. Note that there is no undo for this method.
      パラメータ:
        `allowInteraction` - if a saveAs dialog should be opened if the map has no assigned URL so far.
      戻り値:
        false if the saveAs was cancelled by the user and true otherwise.
      例外:
        `java.lang.RuntimeException` - if the map has no assigned URL and parameter allowInteraction is false.
      導入されたバージョン:
        1.2

    - #### setSaved

          void setSaved(boolean isSaved)

      導入されたバージョン:
        1.2

    - #### setName

          void setName(java.lang.String title)

      Sets the map (frame/tab) title. Note that there is no undo for this method!
      導入されたバージョン:
        1.2

    - #### setBackgroundColor

          void setBackgroundColor(java.awt.Color color)

      導入されたバージョン:
        1.2

    - #### setBackgroundColorCode

          void setBackgroundColorCode(java.lang.String rgbString)

      パラメータ:
        `rgbString` - a HTML color spec like #ff0000 (red) or #222222 (darkgray).
      導入されたバージョン:
        1.2

    - #### filter

          void filter(groovy.lang.Closure<java.lang.Boolean> closure)

      install a Groovy closure as the current filter in this map. If `closure` is null then filtering will be disabled. The filter state of a node can be checked by `Proxy.NodeRO.isVisible()`.
      To undo filtering use Tools -> Undo. After execution of the following you have to use it seven times to return to the initial filter state.

           // show only matching nodes
           node.map.filter{ it.text.contains("todo") }
           // equivalent:
           node.map.filter = { it.text.contains("todo") }

           // show ancestors of matching nodes
           node.map.filter(true, false){ it.text.contains("todo") }
           // equivalent:
           node.map.setFilter(true, false, { it.text.contains("todo") })

           // show descendants of matching nodes
           node.map.filter(false, true){ it.text.contains("todo") }
           // equivalent:
           node.map.setFilter(false, true, { it.text.contains("todo") })

           // remove filter
           node.map.filter = null

      導入されたバージョン:
        1.2

    - #### setFilter

          void setFilter(groovy.lang.Closure<java.lang.Boolean> closure)

      alias for `filter(Closure)`. Enables assignment to the `filter` property.
      導入されたバージョン:
        1.2

    - #### filter

          void filter(boolean showAncestors,
                    boolean showDescendants,
                    groovy.lang.Closure<java.lang.Boolean> closure)

      With `filter(Closure)` neither ancestors not descendants of the visible nodes are shown. Use this method to control these options.
      導入されたバージョン:
        1.2
      関連項目:
        `filter(Closure)`

    - #### setFilter

          void setFilter(boolean showAncestors,
                       boolean showDescendants,
                       groovy.lang.Closure<java.lang.Boolean> closure)

      alias for `setFilter(boolean, boolean, Closure)`
      導入されたバージョン:
        1.2
      関連項目:
        `filter(Closure)`

    - #### redoFilter

          void redoFilter()

      reinstalls the previously undone filter if there is any. Note: undo/redo for filters is separate to the undo/redo for other map state.
      導入されたバージョン:
        1.2

    - #### undoFilter

          void undoFilter()

      removes the current filter and reinstalls the previous filter if there is any. Note: undo/redo for filters is separate to the undo/redo for other map state.
      導入されたバージョン:
        1.2

    - #### getStorage

          Proxy.Properties getStorage()

      returns an accessor to the map specific storage. The value is never null
      導入されたバージョン:
        1.3.6