|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mycompany.jsf.model.TreeNode
This class represents a node in a tree of nodes. Instances of this class are used as the nodes in the TreeModel.
Field Summary | |
private java.util.List |
children
|
private boolean |
isExpanded
|
private boolean |
isLeafNode
|
private java.lang.String |
name
|
private TreeNode |
parent
|
private java.lang.Object |
value
|
Constructor Summary | |
TreeNode()
|
Method Summary | |
void |
addChild(TreeNode child)
Adds the provided node as a child of this node. |
java.util.List |
getChildren()
Returns all children of this node. |
java.lang.String |
getName()
Returns the node name. |
private TreeNode |
getParent()
Returns the parent of this node. |
java.lang.String |
getPath()
Returns a String representing the path to this node, with the names of each parent node separated by a slash and ending with the name of the current node. |
java.lang.Object |
getValue()
Returns the node value. |
boolean |
isExpanded()
Returns "true" if the node is expanded, |
boolean |
isLeafNode()
Returns "true" if this is a leaf node. |
void |
setExpanded(boolean isExpanded)
Sets the "expanded" property value. |
void |
setLeafNode(boolean isLeafNode)
Sets the "leafNode" property value. |
void |
setName(java.lang.String name)
Sets the node name. |
private void |
setParent(TreeNode parent)
Sets the parent of this node, called by the addChild() method. |
void |
setValue(java.lang.Object value)
Sets the node value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private TreeNode parent
private java.lang.String name
private java.lang.Object value
private boolean isExpanded
private boolean isLeafNode
private java.util.List children
Constructor Detail |
public TreeNode()
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public boolean isExpanded()
public void setExpanded(boolean isExpanded)
public boolean isLeafNode()
public void setLeafNode(boolean isLeafNode)
public void addChild(TreeNode child)
public java.util.List getChildren()
public java.lang.String getPath()
private TreeNode getParent()
private void setParent(TreeNode parent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |