Class BorderTreeNodeDecorator
- java.lang.Object
-
- hu.webarticum.treeprinter.decorator.AbstractTreeNodeDecorator
-
- hu.webarticum.treeprinter.decorator.BorderTreeNodeDecorator
-
- All Implemented Interfaces:
TreeNode
public class BorderTreeNodeDecorator extends AbstractTreeNodeDecorator
TreeNodedecorator implementation that draws a border around the node.For example, with the default options this content:
Hello, Node!
will be transformed to this:
┌────────────┐ │Hello, Node!│ └────────────┘
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBorderTreeNodeDecorator.Builder
-
Field Summary
-
Fields inherited from class hu.webarticum.treeprinter.decorator.AbstractTreeNodeDecorator
baseNode, decorable, inherit
-
-
Constructor Summary
Constructors Constructor Description BorderTreeNodeDecorator(TreeNode baseNode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BorderTreeNodeDecorator.Builderbuilder()java.lang.StringdecoratedContent()Insetsinsets()Gets the content insets.protected TreeNodewrapChild(TreeNode childNode, int index)-
Methods inherited from class hu.webarticum.treeprinter.decorator.AbstractTreeNodeDecorator
children, content, getDecoratedNode, isDecorable, isPlaceholder, originalNode
-
-
-
-
Constructor Detail
-
BorderTreeNodeDecorator
public BorderTreeNodeDecorator(TreeNode baseNode)
-
-
Method Detail
-
builder
public static BorderTreeNodeDecorator.Builder builder()
-
decoratedContent
public java.lang.String decoratedContent()
- Specified by:
decoratedContentin classAbstractTreeNodeDecorator
-
insets
public Insets insets()
Description copied from interface:TreeNodeGets 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:
insetsin interfaceTreeNode- Overrides:
insetsin classAbstractTreeNodeDecorator
-
wrapChild
protected TreeNode wrapChild(TreeNode childNode, int index)
- Specified by:
wrapChildin classAbstractTreeNodeDecorator
-
-