Proxy.NodeRO

org.freeplane.plugin.script.proxy

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

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

      public static interface Proxy.NodeRO

  The currently selected node: `node` - read-only.

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

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `java.util.List<Proxy.Node>` | `find(groovy.lang.Closure<java.lang.Boolean> closure)` Starting from this node, recursively searches for nodes 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 branch that starts with this node in breadth-first order.
    `java.util.List<Proxy.Node>` | `findAllDepthFirst()` Returns all nodes of the branch that starts with this node in depth-first order.
    `Convertible` | `getAt(java.lang.String attributeName)` allows to access attribute values like array elements.
    `Proxy.Attributes` | `getAttributes()`
    `byte[]` | `getBinary()` Returns a BASE64 encoded node text (see `Proxy.Node.setBinary(byte[])`) as a binary object.
    `int` | `getChildPosition(Proxy.Node childNode)` returns the index (0..) of this node in the (by Y coordinate sorted) list of this node's children.
    `java.util.List<Proxy.Node>` | `getChildren()` returns the children of this node ordered by Y coordinate.
    `Proxy.Cloud` | `getCloud()`
    `java.util.Collection<Proxy.Connector>` | `getConnectorsIn()`
    `java.util.Collection<Proxy.Connector>` | `getConnectorsOut()`
    `java.util.Date` | `getCreatedAt()`
    `Convertible` | `getDetails()` returns the text of the details as a Convertible like `getNote()` for notes.
    `java.lang.String` | `getDetailsText()` returns the raw HTML text of the details if there is any or null otherwise.
    `java.lang.String` | `getDisplayedText()` The visible text of this node.
    `Proxy.ExternalObject` | `getExternalObject()`
    `java.lang.String` | `getFormat()` returns the format string of the formatter if available and null otherwise.
    `boolean` | `getHideDetails()` returns true if node details are hidden.
    `int` | `getHorizontalShift()`
    `Proxy.Icons` | `getIcons()`
    `java.lang.String` | `getId()`
    `java.util.Date` | `getLastModifiedAt()`
    `Proxy.Link` | `getLink()`
    `Proxy.Map` | `getMap()` the map this node belongs to.
    `int` | `getMinimalDistanceBetweenChildren()`
    `Proxy.Node` | `getNext()` returns the next node with respect to this node in breadth-first order.
    `java.lang.String` | `getNodeID()` 非推奨です。 since 1.2 - use Node.getId() instead.
    `int` | `getNodeLevel(boolean countHidden)` if countHidden is false then only nodes that are matched by the current filter are counted.
    `Convertible` | `getNote()` Returns a Convertible object for the plain not text.
    `java.lang.String` | `getNoteText()` Returns the HTML text of the node.
    `java.lang.Object` | `getObject()` The object that's displayed as the node text - normally the raw text of this node (then this method is equivalent to `getText()`).
    `Proxy.Node` | `getParent()`
    `Proxy.Node` | `getParentNode()` 非推奨です。 since 1.2 - use `getParent()` instead.
    `java.util.List<Proxy.Node>` | `getPathToRoot()` a list of all nodes starting from this node upto (and including) the root node.
    `java.lang.String` | `getPlainText()` use this method to remove all tags from an HTML node.
    `java.lang.String` | `getPlainTextContent()` 非推奨です。 since 1.2 - use getPlainText() or getTo().getPlain() instead.
    `Proxy.Node` | `getPrevious()` returns the previous node with respect to this node in breadth-first order.
    `Proxy.Reminder` | `getReminder()` use it to create and inspect `Proxy.Reminder`s.
    `java.lang.String` | `getShortText()`
    `Proxy.NodeStyle` | `getStyle()` The style attributes of a node can either be changed by assigning a named style like this: node.style.name = 'style.ok' or by changing attributes for this node individually like this: node.style.textColorCode = '#FF0000' Conditional styles of a node can only be investigated by `hasStyle(String)`.
    `java.lang.String` | `getText()` The html text of this node.
    `Convertible` | `getTo()` returns an object that performs conversions (method name is choosen to give descriptive code): node.to.num Long or Double, see `Convertible.getDate()`.
    `java.lang.String` | `getTransformedText()`
    `Convertible` | `getValue()` an alias for `getTo()`.
    `int` | `getVerticalShift()`
    `boolean` | `hasStyle(java.lang.String styleName)` returns true if the node has the style of this name - either manually set or as a conditional style or it is "default" which all nodes have.
    `boolean` | `isDescendantOf(Proxy.Node p)` returns true if p is a parent, or grandparent, ... of this node, or if it is equal to this node; returns false otherwise.
    `boolean` | `isFolded()`
    `boolean` | `isFree()` returns true if this node is freely positionable.
    `boolean` | `isLeaf()`
    `boolean` | `isLeft()`
    `boolean` | `isMinimized()`
    `boolean` | `isRoot()`
    `boolean` | `isVisible()`

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

    - #### getAttributes

          Proxy.Attributes getAttributes()

    - #### getAt

          Convertible getAt(java.lang.String attributeName)

      allows to access attribute values like array elements. Note that the returned type is a `Convertible`, not a String. Nevertheless it behaves like a String in almost all respects, that is, in Groovy scripts it understands all String methods like lenght(), matches() etc.

             // standard way
             node.attributes.set("attribute name", "12")
             // implicitely use getAt()
             def val = node["attribute name"]
             // use all conversions that Convertible provides (num, date, string, ...)
             assert val.num == new Long(12)
             // or use it just like a string
             assert val.startsWith("1")
             // check for availability of an attribute this way:
             if (node["unknown attribute"])
                // surprise: the node has an attribute with key "unknown attribute"

      例外:
        `org.freeplane.plugin.script.ExecuteScriptException`
      導入されたバージョン:
        1.2

    - #### getCloud

          Proxy.Cloud getCloud()

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

    - #### getChildPosition

          int getChildPosition(Proxy.Node childNode)

      returns the index (0..) of this node in the (by Y coordinate sorted) list of this node's children. Returns -1 if childNode is not a child of this node.

    - #### getChildren

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

      returns the children of this node ordered by Y coordinate.

    - #### getConnectorsIn

          java.util.Collection<Proxy.Connector> getConnectorsIn()

    - #### getConnectorsOut

          java.util.Collection<Proxy.Connector> getConnectorsOut()

    - #### getDetailsText

          java.lang.String getDetailsText()

      returns the raw HTML text of the details if there is any or null otherwise.
      導入されたバージョン:
        1.2

    - #### getDetails

          Convertible getDetails()

      returns the text of the details as a Convertible like `getNote()` for notes.
      導入されたバージョン:
        1.2

    - #### getHideDetails

          boolean getHideDetails()

      returns true if node details are hidden.
      導入されたバージョン:
        1.2

    - #### getExternalObject

          Proxy.ExternalObject getExternalObject()

    - #### getIcons

          Proxy.Icons getIcons()

    - #### getLink

          Proxy.Link getLink()

    - #### getReminder

          Proxy.Reminder getReminder()

      use it to create and inspect `Proxy.Reminder`s. This property is never null.

    - #### getMap

          Proxy.Map getMap()

      the map this node belongs to.

    - #### getNodeID

          java.lang.String getNodeID()

      非推奨です。 since 1.2 - use Node.getId() instead.

    - #### getId

          java.lang.String getId()

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

    - #### getNodeLevel

          int getNodeLevel(boolean countHidden)

      if countHidden is false then only nodes that are matched by the current filter are counted.

    - #### getNote

          Convertible getNote()

      Returns a Convertible object for the plain not text. Convertibles behave like Strings in most respects. Additionally String methods are overridden to handle Convertible arguments as if the argument were the result of Convertible.getText().
      戻り値:
        Convertible getString(), getText() and toString() will return plain text instead of the HTML. Use `getNoteText()` to get the HTML text.
      例外:
        `org.freeplane.plugin.script.ExecuteScriptException`
      導入されたバージョン:
        1.2

    - #### getNoteText

          java.lang.String getNoteText()

      Returns the HTML text of the node. (Notes always contain HTML text.)
      例外:
        `org.freeplane.plugin.script.ExecuteScriptException`

    - #### getParent

          Proxy.Node getParent()

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

    - #### getParentNode

          Proxy.Node getParentNode()

      非推奨です。 since 1.2 - use `getParent()` instead.

    - #### getPathToRoot

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

      a list of all nodes starting from this node upto (and including) the root node.

             def path = pathToRoot.collect{ it.plainText }.join('.')

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

    - #### getNext

          Proxy.Node getNext()

      returns the next node with respect to this node in breadth-first order. Returns null if this node is the only one in the map.

    - #### getPrevious

          Proxy.Node getPrevious()

      returns the previous node with respect to this node in breadth-first order. Returns null if this node is the only one in the map.

    - #### getStyle

          Proxy.NodeStyle getStyle()

      The style attributes of a node can either be changed by assigning a named style like this:

          node.style.name = 'style.ok'

      or by changing attributes for this node individually like this:

          node.style.textColorCode = '#FF0000'

      Conditional styles of a node can only be investigated by `hasStyle(String)`. Here a script that creates an index of all nodes having the style 'todo':

           def todos = node.map.root.createChild('To Do')
           c.find{ it.hasStyle('todo') }.each {
               def child = todos.createChild(it.text)
               child.link.node = it
           }

    - #### hasStyle

          boolean hasStyle(java.lang.String styleName)

      returns true if the node has the style of this name - either manually set or as a conditional style or it is "default" which all nodes have. The following statement will always be true:
      導入されたバージョン:
        1.2

    - #### getPlainText

          java.lang.String getPlainText()

      use this method to remove all tags from an HTML node. Formulas are not evaluated.
      導入されたバージョン:
        1.2

    - #### getPlainTextContent

          java.lang.String getPlainTextContent()

      非推奨です。 since 1.2 - use getPlainText() or getTo().getPlain() instead.
      use this method to remove all tags from an HTML node.

    - #### getDisplayedText

          java.lang.String getDisplayedText()

      The visible text of this node. Use `getPlainText()` to remove HTML.
      導入されたバージョン:
        1.2

    - #### getTransformedText

          java.lang.String getTransformedText()

    - #### getShortText

          java.lang.String getShortText()

    - #### getText

          java.lang.String getText()

      The html text of this node. Use `getPlainText()` to remove HTML.
      導入されたバージョン:
        1.2

    - #### getObject

          java.lang.Object getObject()

      The object that's displayed as the node text - normally the raw text of this node (then this method is equivalent to `getText()`). But in case of typed content (for numbers, dates and calendars) `getObject()` returns a proper `IFormattedObject`. Use `getPlainText()` to remove HTML.
      導入されたバージョン:
        1.2

    - #### getFormat

          java.lang.String getFormat()

      returns the format string of the formatter if available and null otherwise.
      導入されたバージョン:
        1.2

    - #### getTo

          Convertible getTo()

      returns an object that performs conversions (method name is choosen to give descriptive code):
      node.to.num
        Long or Double, see `Convertible.getDate()`.
      node.to.date
        Date, see `Convertible.getDate()`.
      node.to.string
        Text, see `Convertible.getString()`.
      node.to.text
        an alias for getString(), see `Convertible.getText()`.
      node.to.object
        returns what fits best, see `Convertible.getObject()`.
      戻り値:
        ConvertibleObject
      例外:
        `org.freeplane.plugin.script.ExecuteScriptException` - on formula evaluation errors
        `ConversionException` - on parse errors, e.g. if to.date is invoked on "0.25"
      導入されたバージョン:
        1.2

    - #### getValue

          Convertible getValue()

      an alias for `getTo()`.
      例外:
        `org.freeplane.plugin.script.ExecuteScriptException` - on formula evaluation errors
      導入されたバージョン:
        1.2

    - #### getBinary

          byte[] getBinary()

      Returns a BASE64 encoded node text (see `Proxy.Node.setBinary(byte[])`) as a binary object. Errors are signaled by a null return value. Whitespace characters are ignored.
      Note that this method is not able to catch all encoding errors!
      導入されたバージョン:
        1.2

    - #### isDescendantOf

          boolean isDescendantOf(Proxy.Node p)

      returns true if p is a parent, or grandparent, ... of this node, or if it is equal to this node; returns false otherwise.

    - #### isFolded

          boolean isFolded()

    - #### isFree

          boolean isFree()

      returns true if this node is freely positionable.
      導入されたバージョン:
        1.2

    - #### isLeaf

          boolean isLeaf()

    - #### isLeft

          boolean isLeft()

    - #### isRoot

          boolean isRoot()

    - #### isVisible

          boolean isVisible()

    - #### isMinimized

          boolean isMinimized()

    - #### find

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

      非推奨です。 since 1.2 use `find(Closure)` instead.
      Starting from this node, recursively searches for nodes for which `condition.checkNode(node)` returns true.

    - #### find

          java.util.List<Proxy.Node> find(groovy.lang.Closure<java.lang.Boolean> closure)

      Starting from this node, recursively searches for nodes for which `closure.call(node)` returns true. See `Proxy.ControllerRO.find(Closure)` for details.

    - #### findAll

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

      Returns all nodes of the branch that starts with this node in breadth-first order.
      導入されたバージョン:
        1.2
      関連項目:
        `for subtrees`

    - #### findAllDepthFirst

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

      Returns all nodes of the branch that starts with this node in depth-first order.
      導入されたバージョン:
        1.2
      関連項目:
        `for subtrees.`

    - #### getLastModifiedAt

          java.util.Date getLastModifiedAt()

    - #### getCreatedAt

          java.util.Date getCreatedAt()

    - #### getHorizontalShift

          int getHorizontalShift()

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

    - #### getVerticalShift

          int getVerticalShift()

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

    - #### getMinimalDistanceBetweenChildren

          int getMinimalDistanceBetweenChildren()

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