Class ShadowTreeNodeDecorator
- java.lang.Object
-
- hu.webarticum.treeprinter.decorator.AbstractTreeNodeDecorator
-
- hu.webarticum.treeprinter.decorator.ShadowTreeNodeDecorator
-
- All Implemented Interfaces:
TreeNode
public class ShadowTreeNodeDecorator 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 classShadowTreeNodeDecorator.Builder
-
Field Summary
-
Fields inherited from class hu.webarticum.treeprinter.decorator.AbstractTreeNodeDecorator
baseNode, decorable, inherit
-
-
Constructor Summary
Constructors Constructor Description ShadowTreeNodeDecorator(TreeNode baseNode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ShadowTreeNodeDecorator.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
-
ShadowTreeNodeDecorator
public ShadowTreeNodeDecorator(TreeNode baseNode)
-
-
Method Detail
-
builder
public static ShadowTreeNodeDecorator.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
-
-