NodeStyle (Freeplane API 1.11.8)
Description: declaration: package: org.freeplane.api, interface: NodeStyle

Package org.freeplane.api

# Interface NodeStyle

All Superinterfaces:
  `NodeStyleRO`

All Known Subinterfaces:
  `Proxy.NodeStyle`

public interface NodeStyle extends NodeStyleRO
Node's style: `node.style` - read-only.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setBackgroundColor(Color color)`
  `void`
  `setBackgroundColorCode(String rgbString)`
  `void`
  `setCss(String css)`
  `void`
  `setFloating(boolean floating)`
  sets the floating style for the node (aka "free node").
  `void`
  `setHorizontalTextAlignment(HorizontalTextAlignment alignment)`
  `void`
  `setMaxNodeWidth(int width)`
  minNodeWidth in px - set to -1 to restore default.
  `void`
  `setMaxNodeWidth(String width)`
  use length units like "1 cm" or "6 pt"
  `void`
  `setMinNodeWidth(int width)`
  minNodeWidth in px - set to -1 to restore default.
  `void`
  `setMinNodeWidth(String width)`
  use length units like "1 cm" or "6 pt"
  `void`
  `setName(String styleName)`
  Selects a style by name, see menu Styles → Pre/Userdefined styles for valid style names or use `NodeStyleRO.getName()` to display the name of a node's style.
  `void`
  `setNodeTextColor(Color color)`
  Deprecated.
  since 1.2 - use `setTextColor(Color)` instead.
  `void`
  `setNumberingEnabled(boolean enabled)`
  `void`
  `setTextColor(Color color)`
  `void`
  `setTextColorCode(String rgbString)`

  ### Methods inherited from interface org.freeplane.api.NodeStyleRO

  `getAllActiveStyles, getBackgroundColor, getBackgroundColorCode, getBorder, getCss, getEdge, getFont, getHorizontalTextAlignment, getMaxNodeWidth, getMinNodeWidth, getName, getNodeTextColor, getStyleNode, getTextColor, getTextColorCode, isBackgroundColorSet, isCssSet, isFloating, isHorizontalTextAlignmentSet, isMaxNodeWidthSet, isMinNodeWidthSet, isNumberingEnabled, isTextColorSet`

- ## Method Details

  - ### setName

    void setName(String styleName)
    Selects a style by name, see menu Styles → Pre/Userdefined styles for valid style names or use `NodeStyleRO.getName()` to display the name of a node's style. It's guaranteed that `node.style.name = node.style.name` does not change the style.
    Parameters:
      `styleName` - can be the name visible in the style menu or its translation key as returned by `NodeStyleRO.getName()`. (Names of predefined styles are subject to translation.) Only translation keys will continue to work if the language setting is changed.
    Throws:
      `IllegalArgumentException` - if the style does not exist.
    Since:
      1.2.2

  - ### setBackgroundColor

    void setBackgroundColor(Color color)

  - ### setBackgroundColorCode

    void setBackgroundColorCode(String rgbString)
    Parameters:
      `rgbString` - a HTML color spec like #ff0000 (red) or #222222 (darkgray).
    Since:
      1.2

  - ### setNodeTextColor

    @Deprecated void setNodeTextColor(Color color)
    Deprecated.
    since 1.2 - use `setTextColor(Color)` instead.

  - ### setTextColor

    void setTextColor(Color color)
    Since:
      1.2

  - ### setTextColorCode

    void setTextColorCode(String rgbString)
    Parameters:
      `rgbString` - a HTML color spec like #ff0000 (red) or #222222 (darkgray).
    Since:
      1.2

  - ### setFloating

    void setFloating(boolean floating)
    sets the floating style for the node (aka "free node"). Should normally only be applied to direct children of the root node.
    Since:
      1.2

  - ### setMinNodeWidth

    void setMinNodeWidth(int width)
    minNodeWidth in px - set to -1 to restore default.
    Since:
      1.2.20

  - ### setMinNodeWidth

    void setMinNodeWidth(String width)
    use length units like "1 cm" or "6 pt"
    Since:
      1.5.6

  - ### setMaxNodeWidth

    void setMaxNodeWidth(int width)
    minNodeWidth in px - set to -1 to restore default.
    Since:
      1.2.20

  - ### setMaxNodeWidth

    void setMaxNodeWidth(String width)
    use length units like "1 cm" or "6 pt"
    Since:
      1.5.6

  - ### setNumberingEnabled

    void setNumberingEnabled(boolean enabled)
    Since:
      1.3.8

  - ### setCss

    void setCss(String css)
    Since:
      1.9.12

  - ### setHorizontalTextAlignment

    void setHorizontalTextAlignment(HorizontalTextAlignment alignment)
    Since:
      1.11.8