Package io.github.astrapi69.swing.tree
Class JXTreeElement
- java.lang.Object
-
- io.github.astrapi69.swing.tree.JXTreeElement
-
- All Implemented Interfaces:
java.io.Serializable
public class JXTreeElement extends java.lang.Object implements java.io.Serializable
The classJXTreeElement
represents as the name already presume a tree element- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JXTreeElement.JXTreeElementBuilder
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_CONTENT_KEY
-
Constructor Summary
Constructors Constructor Description JXTreeElement()
JXTreeElement(java.util.Map<java.lang.String,java.lang.Object> properties, java.lang.String name, boolean node, boolean withText, java.lang.String iconPath, JXTreeElement parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JXTreeElement.JXTreeElementBuilder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.Object
getDefaultContent()
Gets the default content object from the mapjava.lang.String
getIconPath()
The icon path for a custom tree icon, if not set default icon will be setjava.lang.String
getName()
The name of this tree element.JXTreeElement
getParent()
The parent of this tree element.java.util.Map<java.lang.String,java.lang.Object>
getProperties()
The map with optional propertiesint
hashCode()
boolean
isNode()
The flag that indicates if this tree element is a node.boolean
isWithText()
The flag that indicates if a text label should shown if an icon existsJXTreeElement
setDefaultContent(java.lang.Object defaultContent)
Sets the default content object from the map to the given objectvoid
setIconPath(java.lang.String iconPath)
The icon path for a custom tree icon, if not set default icon will be setvoid
setName(java.lang.String name)
The name of this tree element.void
setNode(boolean node)
The flag that indicates if this tree element is a node.void
setParent(JXTreeElement parent)
The parent of this tree element.void
setWithText(boolean withText)
The flag that indicates if a text label should shown if an icon existsJXTreeElement.JXTreeElementBuilder
toBuilder()
java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_CONTENT_KEY
public static final java.lang.String DEFAULT_CONTENT_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JXTreeElement
public JXTreeElement()
-
JXTreeElement
public JXTreeElement(java.util.Map<java.lang.String,java.lang.Object> properties, java.lang.String name, boolean node, boolean withText, java.lang.String iconPath, JXTreeElement parent)
-
-
Method Detail
-
getDefaultContent
public java.lang.Object getDefaultContent()
Gets the default content object from the map- Returns:
- the default content object from the map
-
setDefaultContent
public JXTreeElement setDefaultContent(java.lang.Object defaultContent)
Sets the default content object from the map to the given object- Parameters:
defaultContent
- the default content object to set- Returns:
- this object
-
builder
public static JXTreeElement.JXTreeElementBuilder builder()
-
toBuilder
public JXTreeElement.JXTreeElementBuilder toBuilder()
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
The map with optional properties
-
getName
public java.lang.String getName()
The name of this tree element.
-
isNode
public boolean isNode()
The flag that indicates if this tree element is a node.
-
isWithText
public boolean isWithText()
The flag that indicates if a text label should shown if an icon exists
-
getIconPath
public java.lang.String getIconPath()
The icon path for a custom tree icon, if not set default icon will be set
-
getParent
public JXTreeElement getParent()
The parent of this tree element.
-
setName
public void setName(java.lang.String name)
The name of this tree element.
-
setNode
public void setNode(boolean node)
The flag that indicates if this tree element is a node.
-
setWithText
public void setWithText(boolean withText)
The flag that indicates if a text label should shown if an icon exists
-
setIconPath
public void setIconPath(java.lang.String iconPath)
The icon path for a custom tree icon, if not set default icon will be set
-
setParent
public void setParent(JXTreeElement parent)
The parent of this tree element.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-