public class TreeModelBase extends java.lang.Object implements TreeModel
TreeNode class.| Constructor and Description |
|---|
TreeModelBase(TreeNode root)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
TreeNode |
getNode()
Gets the current
TreeNode or null if no node ID is selected. |
java.lang.String[] |
getPathInformation(java.lang.String nodeId)
Gets an array of String containing the ID's of all of the
TreeNodes in the path to
the specified node. |
TreeState |
getTreeState() |
boolean |
isLastChild(java.lang.String nodeId)
Indicates whether or not the specified
TreeNode is the last child in the List
of children. |
void |
setNodeId(java.lang.String nodeId)
Sets the current
TreeNode to the specified node ID, which is a colon-separated list
of node indexes. |
void |
setTreeState(TreeState treeState) |
public TreeModelBase(TreeNode root)
root - The root TreeNodepublic TreeState getTreeState()
getTreeState in interface TreeModelpublic void setTreeState(TreeState treeState)
setTreeState in interface TreeModelpublic void setNodeId(java.lang.String nodeId)
TreeNode to the specified node ID, which is a colon-separated list
of node indexes. For instance, "0:0:1" means "the second child node of the first child node
under the root node."public java.lang.String[] getPathInformation(java.lang.String nodeId)
TreeNodes in the path to
the specified node. The path information will be an array of String objects
representing node ID's. The array will starting with the ID of the root node and end with
the ID of the specified node.getPathInformation in interface TreeModelnodeId - The id of the node for whom the path information is needed.public boolean isLastChild(java.lang.String nodeId)
TreeNode is the last child in the List
of children. If the node id provided corresponds to the root node, this returns true.isLastChild in interface TreeModelnodeId - The ID of the node to check