Package de.xima.fc.gui.model.tree
Class BasicTreeNode<T>
- java.lang.Object
-
- de.xima.fc.gui.model.tree.BasicTreeNode<T>
-
- Type Parameters:
T
- Type of the tree data.
- All Implemented Interfaces:
org.primefaces.model.TreeNode<T>
public class BasicTreeNode<T> extends Object implements org.primefaces.model.TreeNode<T>
A basic tree node.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description BasicTreeNode()
Creates a new basic root node.BasicTreeNode(String type, T data, String rowKey, org.primefaces.model.TreeNode<T> parent)
Creates a new node with a parent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addChild(org.primefaces.model.TreeNode<T> child)
void
clearParent()
int
getChildCount()
List<org.primefaces.model.TreeNode<T>>
getChildren()
T
getData()
org.primefaces.model.TreeNode<T>
getParent()
String
getRowKey()
String
getType()
boolean
isExpanded()
boolean
isLeaf()
boolean
isPartialSelected()
boolean
isSelectable()
boolean
isSelected()
void
setExpanded(boolean expanded)
void
setParent(org.primefaces.model.TreeNode<T> treeNode)
void
setPartialSelected(boolean value)
void
setRowKey(String rowKey)
void
setSelectable(boolean selectable)
void
setSelected(boolean selected)
void
setType(String type)
-
-
-
Constructor Detail
-
BasicTreeNode
public BasicTreeNode()
Creates a new basic root node.
-
BasicTreeNode
public BasicTreeNode(String type, T data, String rowKey, org.primefaces.model.TreeNode<T> parent)
Creates a new node with a parent.- Parameters:
type
- Type of the tree node, can be used later to show a different UI depending on the type.data
- User-defined data for the node.parent
- Parent of this node.rowKey
- Key for this node.
-
-
Method Detail
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfaceorg.primefaces.model.TreeNode<T>
-
getParent
public org.primefaces.model.TreeNode<T> getParent()
- Specified by:
getParent
in interfaceorg.primefaces.model.TreeNode<T>
-
setParent
public void setParent(org.primefaces.model.TreeNode<T> treeNode)
- Specified by:
setParent
in interfaceorg.primefaces.model.TreeNode<T>
-
getChildren
public List<org.primefaces.model.TreeNode<T>> getChildren()
- Specified by:
getChildren
in interfaceorg.primefaces.model.TreeNode<T>
-
getRowKey
public String getRowKey()
- Specified by:
getRowKey
in interfaceorg.primefaces.model.TreeNode<T>
-
setRowKey
public void setRowKey(String rowKey)
- Specified by:
setRowKey
in interfaceorg.primefaces.model.TreeNode<T>
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfaceorg.primefaces.model.TreeNode<T>
-
isExpanded
public boolean isExpanded()
- Specified by:
isExpanded
in interfaceorg.primefaces.model.TreeNode<T>
-
setExpanded
public void setExpanded(boolean expanded)
- Specified by:
setExpanded
in interfaceorg.primefaces.model.TreeNode<T>
-
isSelected
public boolean isSelected()
- Specified by:
isSelected
in interfaceorg.primefaces.model.TreeNode<T>
-
setSelected
public void setSelected(boolean selected)
- Specified by:
setSelected
in interfaceorg.primefaces.model.TreeNode<T>
-
isSelectable
public boolean isSelectable()
- Specified by:
isSelectable
in interfaceorg.primefaces.model.TreeNode<T>
-
setSelectable
public void setSelectable(boolean selectable)
- Specified by:
setSelectable
in interfaceorg.primefaces.model.TreeNode<T>
-
isPartialSelected
public boolean isPartialSelected()
- Specified by:
isPartialSelected
in interfaceorg.primefaces.model.TreeNode<T>
-
setPartialSelected
public void setPartialSelected(boolean value)
- Specified by:
setPartialSelected
in interfaceorg.primefaces.model.TreeNode<T>
-
setType
public void setType(String type)
- Specified by:
setType
in interfaceorg.primefaces.model.TreeNode<T>
-
clearParent
public void clearParent()
- Specified by:
clearParent
in interfaceorg.primefaces.model.TreeNode<T>
-
addChild
public boolean addChild(org.primefaces.model.TreeNode<T> child)
-
-