|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.webapp.admin.TreeControl
public class TreeControl
The overall data structure representing a tree control
that can be rendered by the TreeControlTag custom tag.
Each node of the tree is represented by an instance of
TreeControlNode.
| Field Summary | |
|---|---|
protected java.util.HashMap |
registry
The collection of nodes that represent this tree, keyed by name. |
protected TreeControlNode |
root
The root node of the entire tree. |
protected TreeControlNode |
selected
The most recently selected node. |
| Constructor Summary | |
|---|---|
TreeControl()
Construct a new instance with no predefined root node. |
|
TreeControl(TreeControlNode root)
Construct a new instance with the specified root node. |
|
| Method Summary | |
|---|---|
TreeControlNode |
findNode(java.lang.String name)
Find and return the TreeControlNode for the specified
node name, if it exists; otherwise, return null. |
TreeControlNode |
getRoot()
|
int |
getWidth()
The current displayable "width" of this tree (that is, the maximum depth of the visible part of the tree). |
void |
removeNode(TreeControlNode node)
Deregister the specified node, as well as all child nodes of this node, from our registry of the complete tree. |
void |
selectNode(java.lang.String name)
Mark the specified node as the one-and-only currently selected one, deselecting any previous node that was so marked. |
protected void |
setRoot(TreeControlNode root)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.HashMap registry
protected TreeControlNode selected
protected TreeControlNode root
| Constructor Detail |
|---|
public TreeControl()
public TreeControl(TreeControlNode root)
root - The new root node| Method Detail |
|---|
public TreeControlNode getRoot()
protected void setRoot(TreeControlNode root)
public int getWidth()
public TreeControlNode findNode(java.lang.String name)
TreeControlNode for the specified
node name, if it exists; otherwise, return null.
name - Name of the TreeControlNode to be returnedpublic void selectNode(java.lang.String name)
node - Name of the node to mark as selected, or null
if there should be no currently selected nodepublic void removeNode(TreeControlNode node)
node - The TreeControlNode to be deregistered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||