Package de.xima.fc.gui.model.tree
Class LazyTreeNode<T>
- java.lang.Object
-
- de.xima.fc.gui.model.tree.LazyTreeNode<T>
-
- Type Parameters:
T
- Type of the tree data.
- All Implemented Interfaces:
Serializable
,org.primefaces.model.TreeNode<T>
public class LazyTreeNode<T> extends Object implements org.primefaces.model.TreeNode<T>, Serializable
A tree node for a lazy loading PrimeFaces trees. Specify an adapter that implements the loading process.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LazyTreeNode(ILazyTreeNodeAdapter<T> adapter, String type, T data, String rowKey)
Creates a new node without a parent, should be used for root nodes.LazyTreeNode(ILazyTreeNodeAdapter<T> adapter, 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 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
-
LazyTreeNode
public LazyTreeNode(ILazyTreeNodeAdapter<T> adapter, String type, T data, String rowKey)
Creates a new node without a parent, should be used for root nodes.- Parameters:
adapter
- Adapter to use for lazy loading.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.rowKey
- Key for this node.
-
LazyTreeNode
public LazyTreeNode(ILazyTreeNodeAdapter<T> adapter, String type, T data, String rowKey, org.primefaces.model.TreeNode<T> parent)
Creates a new node with a parent.- Parameters:
adapter
- Adapter to use for lazy loading.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
-
clearParent
public void clearParent()
- Specified by:
clearParent
in interfaceorg.primefaces.model.TreeNode<T>
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfaceorg.primefaces.model.TreeNode<T>
-
getChildren
public List<org.primefaces.model.TreeNode<T>> getChildren()
- Specified by:
getChildren
in interfaceorg.primefaces.model.TreeNode<T>
-
getParent
public org.primefaces.model.TreeNode<T> getParent()
- Specified by:
getParent
in interfaceorg.primefaces.model.TreeNode<T>
-
getRowKey
public String getRowKey()
- Specified by:
getRowKey
in interfaceorg.primefaces.model.TreeNode<T>
-
isExpanded
public boolean isExpanded()
- Specified by:
isExpanded
in interfaceorg.primefaces.model.TreeNode<T>
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfaceorg.primefaces.model.TreeNode<T>
-
isPartialSelected
public boolean isPartialSelected()
- Specified by:
isPartialSelected
in interfaceorg.primefaces.model.TreeNode<T>
-
isSelectable
public boolean isSelectable()
- Specified by:
isSelectable
in interfaceorg.primefaces.model.TreeNode<T>
-
isSelected
public boolean isSelected()
- Specified by:
isSelected
in interfaceorg.primefaces.model.TreeNode<T>
-
setExpanded
public void setExpanded(boolean expanded)
- Specified by:
setExpanded
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>
-
setPartialSelected
public void setPartialSelected(boolean value)
- Specified by:
setPartialSelected
in interfaceorg.primefaces.model.TreeNode<T>
-
setRowKey
public void setRowKey(String rowKey)
- Specified by:
setRowKey
in interfaceorg.primefaces.model.TreeNode<T>
-
setSelectable
public void setSelectable(boolean selectable)
- Specified by:
setSelectable
in interfaceorg.primefaces.model.TreeNode<T>
-
setSelected
public void setSelected(boolean selected)
- Specified by:
setSelected
in interfaceorg.primefaces.model.TreeNode<T>
-
-