Package io.github.astrapi69.swing.tree
Class GenericTreeElement.GenericTreeElementBuilder<T>
- java.lang.Object
-
- io.github.astrapi69.swing.tree.GenericTreeElement.GenericTreeElementBuilder<T>
-
- Enclosing class:
- GenericTreeElement<T>
public static class GenericTreeElement.GenericTreeElementBuilder<T> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenericTreeElement<T>
build()
GenericTreeElement.GenericTreeElementBuilder<T>
iconPath(java.lang.String iconPath)
The icon path for a custom tree icon, if not set default icon will be setGenericTreeElement.GenericTreeElementBuilder<T>
leaf(boolean leaf)
The flag that indicates if this tree element is a node.GenericTreeElement.GenericTreeElementBuilder<T>
name(java.lang.String name)
The name of this tree element.GenericTreeElement.GenericTreeElementBuilder<T>
properties(java.util.Map<java.lang.String,java.lang.Object> properties)
The map with optional propertiesGenericTreeElement.GenericTreeElementBuilder<T>
selectedIconPath(java.lang.String selectedIconPath)
The selected icon path for a custom selected tree icon, if not set default icon will be setjava.lang.String
toString()
GenericTreeElement.GenericTreeElementBuilder<T>
withText(boolean withText)
The flag that indicates if a text label should shown if an icon exists
-
-
-
Method Detail
-
properties
public GenericTreeElement.GenericTreeElementBuilder<T> properties(java.util.Map<java.lang.String,java.lang.Object> properties)
The map with optional properties- Returns:
this
.
-
name
public GenericTreeElement.GenericTreeElementBuilder<T> name(java.lang.String name)
The name of this tree element.- Returns:
this
.
-
leaf
public GenericTreeElement.GenericTreeElementBuilder<T> leaf(boolean leaf)
The flag that indicates if this tree element is a node.- Returns:
this
.
-
withText
public GenericTreeElement.GenericTreeElementBuilder<T> withText(boolean withText)
The flag that indicates if a text label should shown if an icon exists- Returns:
this
.
-
iconPath
public GenericTreeElement.GenericTreeElementBuilder<T> iconPath(java.lang.String iconPath)
The icon path for a custom tree icon, if not set default icon will be set- Returns:
this
.
-
selectedIconPath
public GenericTreeElement.GenericTreeElementBuilder<T> selectedIconPath(java.lang.String selectedIconPath)
The selected icon path for a custom selected tree icon, if not set default icon will be set- Returns:
this
.
-
build
public GenericTreeElement<T> build()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-