| java.lang.Object org.apache.webapp.admin.TreeControl
TreeControl | public class TreeControl implements Serializable(Code) | | 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 .
author: Jazmin Jonson author: Craig R. McClanahan version: $Revision: 516448 $ $Date: 2007-03-09 17:25:47 +0100 (Fri, 09 Mar 2007) $ |
Constructor Summary | |
public | TreeControl() Construct a new instance with no predefined root node. | public | TreeControl(TreeControlNode root) Construct a new instance with the specified root node. |
Method Summary | |
void | addNode(TreeControlNode node) Register the specified node in our registry of the complete tree. | public TreeControlNode | findNode(String name) Find and return the TreeControlNode for the specified
node name, if it exists; otherwise, return null . | public TreeControlNode | getRoot() | public int | getWidth() The current displayable "width" of this tree (that is, the maximum
depth of the visible part of the tree). | int | getWidth(TreeControlNode node) Calculate the width of the subtree below the specified node. | public void | removeNode(TreeControlNode node) Deregister the specified node, as well as all child nodes of this
node, from our registry of the complete tree. | public void | selectNode(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) |
registry | protected HashMap registry(Code) | | The collection of nodes that represent this tree, keyed by name.
|
TreeControl | public TreeControl()(Code) | | Construct a new instance with no predefined root node.
|
TreeControl | public TreeControl(TreeControlNode root)(Code) | | Construct a new instance with the specified root node.
Parameters: root - The new root node |
findNode | public TreeControlNode findNode(String name)(Code) | | Find and return the TreeControlNode for the specified
node name, if it exists; otherwise, return null .
Parameters: name - Name of the TreeControlNode to be returned |
getWidth | public int getWidth()(Code) | | The current displayable "width" of this tree (that is, the maximum
depth of the visible part of the tree).
|
getWidth | int getWidth(TreeControlNode node)(Code) | | Calculate the width of the subtree below the specified node.
Parameters: node - The node for which to calculate the width |
removeNode | public void removeNode(TreeControlNode node)(Code) | | Deregister the specified node, as well as all child nodes of this
node, from our registry of the complete tree. If this node is not
present, no action is taken.
Parameters: node - The TreeControlNode to be deregistered |
selectNode | public void selectNode(String name)(Code) | | Mark the specified node as the one-and-only currently selected one,
deselecting any previous node that was so marked.
Parameters: node - Name of the node to mark as selected, or null if there should be no currently selected node |
|
|