Package org.apache.tapestry5.tree
Interface TreeNode<T>
- Type Parameters:
T
- type of node
public interface TreeNode<T>
A node within a
TreeModel
. In a DefaultTreeModel
, most of the node's information
comes via the TreeModelAdapter
.- Since:
- 5.3
-
Method Summary
Modifier and TypeMethodDescriptionReturns the actual children of this non-leaf node, as additional nodes.boolean
Returns true if this non-leaf node has child nodes.getId()
Returns a string Id for the node that uniquely identifies it.getLabel()
Returns a textual label for the node.getValue()
Returns the value represented by this node.boolean
isLeaf()
If true, then this node is a leaf node, which never has children (i.e., a file).
-
Method Details
-
getId
Returns a string Id for the node that uniquely identifies it.- Returns:
- unique string identifying the node
- See Also:
-
getValue
Returns the value represented by this node. -
isLeaf
boolean isLeaf()If true, then this node is a leaf node, which never has children (i.e., a file). If false, the node may have children (i.e., a folder).- Returns:
- true for leaf nodes, false for folder nodes
- See Also:
-
getHasChildren
boolean getHasChildren()Returns true if this non-leaf node has child nodes. This will not be invoked for leaf nodes.- See Also:
-
getChildren
List<TreeNode<T>> getChildren()Returns the actual children of this non-leaf node, as additional nodes.- See Also:
-
getLabel
Returns a textual label for the node. Not all UIs will make use of the label, but default UIs will.- See Also:
-