| java.lang.Object org.objectweb.jonas.webapp.taglib.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: 1.4 |
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. |
mi_Id | protected int mi_Id(Code) | | |
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 |
addRemovedList | void addRemovedList(TreeControlNode p_RemovedNode)(Code) | | Add the removed node in the removed list.
Parameters: p_RemovedNode - The removed node |
autoRefresh | protected void autoRefresh(TreeControlNode p_AddedNode)(Code) | | Search the added node in the removed list and if it's found, copy the expanded info.
Parameters: p_AddedNode - The added node |
disableAutoRefresh | public void disableAutoRefresh()(Code) | | Disable auto-refresh mode.
|
enableAutoRefresh | public void enableAutoRefresh()(Code) | | Enable auto-refresh mode.
When a set of children are refreshed (removed then added),
the expanded info is copied of the removed node to the added node.
The name is used to retreive the good node.
By default, the auto-refresh mode is disabled.
Be careful, enabled this mode before the remove of all nodes and
disabled it after the add.
|
expandSelectedParents | public void expandSelectedParents()(Code) | | Expand a branch in the tree of the selected 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 |
getSelected | public TreeControlNode getSelected()(Code) | | Get the last node selected.
the current node selected |
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 | 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 |
|
|