Class AbstractTreeNodeDecorator

    • Field Detail

      • baseNode

        protected final TreeNode baseNode
      • inherit

        protected final boolean inherit
      • decorable

        protected final boolean decorable
    • Constructor Detail

      • AbstractTreeNodeDecorator

        public AbstractTreeNodeDecorator​(TreeNode baseNode)
      • AbstractTreeNodeDecorator

        public AbstractTreeNodeDecorator​(TreeNode baseNode,
                                         boolean inherit)
      • AbstractTreeNodeDecorator

        public AbstractTreeNodeDecorator​(TreeNode baseNode,
                                         boolean inherit,
                                         boolean decorable)
    • Method Detail

      • content

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

        public TreeNode getDecoratedNode()
      • originalNode

        public TreeNode originalNode()
        Description copied from interface: TreeNode
        Gets the original node object. By default, returns with this. Decorators should return with the most inner decorated node.
        Specified by:
        originalNode 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
      • isDecorable

        public boolean isDecorable()
        Description copied from interface: TreeNode
        Checks if this node can be decorated. By default, decorators should keep non-decorable nodes untouched.
        Specified by:
        isDecorable in interface TreeNode
      • isPlaceholder

        public boolean isPlaceholder()
        Description copied from interface: TreeNode
        Checks if this node is a placeholder. By default, generic TreePrinter implementations hide placeholder nodes. Some types of implementation (e. g. n-ary trees) should take these into account anyway.
        Specified by:
        isPlaceholder 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
      • decoratedContent

        protected abstract java.lang.String decoratedContent()
      • wrapChild

        protected abstract TreeNode wrapChild​(TreeNode childNode,
                                              int index)