Class PadTreeNodeDecorator
- java.lang.Object
-
- hu.webarticum.treeprinter.decorator.AbstractTreeNodeDecorator
-
- hu.webarticum.treeprinter.decorator.PadTreeNodeDecorator
-
- All Implemented Interfaces:
TreeNode
public class PadTreeNodeDecorator extends AbstractTreeNodeDecorator
TreeNodedecorator implementation that draws some padding around the node.Given the following content:
Hello, Node! Line 2
With with
new Insets(1, 2, 3, 4)and~as pad character~~~~~~~~~~~~~~~~~~ ~~~~Hello, Node!~~ ~~~~Line 2 ~~ ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPadTreeNodeDecorator.Builder
-
Field Summary
-
Fields inherited from class hu.webarticum.treeprinter.decorator.AbstractTreeNodeDecorator
baseNode, decorable, inherit
-
-
Constructor Summary
Constructors Constructor Description PadTreeNodeDecorator(TreeNode baseNode)PadTreeNodeDecorator(TreeNode baseNode, int pad)PadTreeNodeDecorator(TreeNode baseNode, Insets insets)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PadTreeNodeDecorator.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
-
-
-
-
Method Detail
-
builder
public static PadTreeNodeDecorator.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
-
-