Class SimpleTreeNode

  • All Implemented Interfaces:
    TreeNode

    public class SimpleTreeNode
    extends java.lang.Object
    implements TreeNode
    Simple default implementation for TreeNode. You can specify content and custom insets in the constructor. Child nodes can be added after construction (so this class is partially mutable).
    • Constructor Detail

      • SimpleTreeNode

        public SimpleTreeNode​(java.lang.String content)
      • SimpleTreeNode

        public SimpleTreeNode​(java.lang.String content,
                              Insets insets)
    • Method Detail

      • addChild

        public void addChild​(TreeNode childNode)
      • content

        public java.lang.String content()
        Description copied from interface: TreeNode
        Gets the content of this node.
        Specified by:
        content in interface TreeNode
      • insets

        public Insets insets()
        Description copied from interface: TreeNode
        Gets the content insets. Returns with the sizes of the visual decoration around the main content. By default, this is fully zero. Visually extending decorators (border, shadow etc.) should extend the insets with the sizes of the visual extension.
        Specified by:
        insets in interface TreeNode
      • children

        public java.util.List<TreeNode> children()
        Description copied from interface: TreeNode
        Gets the list of child nodes of this node.
        Specified by:
        children in interface TreeNode