Package com.sun.javatest.tool
Interface TreeSelectionPane.Model
- Enclosing class:
TreeSelectionPane
public static interface TreeSelectionPane.Model
The model for the tree whose nodes can be selected in a TreeSelectionPane.
-
Method Summary
Modifier and TypeMethodDescriptionGet a specific child of a node.int
getChildCount
(Object node) Get the number of children for a node.Get the name of a node.Get the path of a node.getRoot()
Get the root node of the tree.boolean
Check whether or not a node is a leaf node.
-
Method Details
-
getRoot
Object getRoot()Get the root node of the tree.- Returns:
- the root node of the tree
-
getChildCount
Get the number of children for a node.- Parameters:
node
- the node for which the number of children is required- Returns:
- the number of children of the specified node
-
getChild
Get a specific child of a node.- Parameters:
node
- the node for which the child is requiredindex
- the index of the desired child; this should be in the range [0..getChildCount())- Returns:
- the specified child node
-
getName
Get the name of a node. The name should identify the child within the set of its parent's children.- Parameters:
node
- the node for which the name is required- Returns:
- the name of the node
-
getPath
Get the path of a node. The path is a series of names, separated by '/', which identify successive children, initially relative to the root node.- Parameters:
node
- the node for which the path is required- Returns:
- the path of the node
-
isLeaf
Check whether or not a node is a leaf node. This is simply a semantic distinction for a node, that will be used to determine how the node should be displayed; it is independent of whether a node has any children or not.- Parameters:
node
- the node to be checked- Returns:
- true if the node is a leaf node, and false otherwise
-