org.objectweb.jonas.webapp.taglib.TreeControl Class Reference

Collaboration diagram for org.objectweb.jonas.webapp.taglib.TreeControl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TreeControl ()
 TreeControl (TreeControlNode root)
int getWidth ()
TreeControlNode findNode (String name)
void selectNode (String name)
TreeControlNode getSelected ()
void expandSelectedParents ()
void disableAutoRefresh ()
void enableAutoRefresh ()

Protected Member Functions

void autoRefresh (TreeControlNode p_AddedNode)

Protected Attributes

HashMap registry = new HashMap()
TreeControlNode selected = null
TreeControlNode root = null

Package Functions

void addNode (TreeControlNode node) throws IllegalArgumentException
int getWidth (TreeControlNode node)
void removeNode (TreeControlNode node)
void addRemovedList (TreeControlNode p_RemovedNode)

Detailed Description

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

Craig R. McClanahan

Version:
$Revision: 1.4

Definition at line 78 of file TreeControl.java.


Constructor & Destructor Documentation

org.objectweb.jonas.webapp.taglib.TreeControl.TreeControl  ) 
 

Construct a new instance with no predefined root node.

Definition at line 86 of file TreeControl.java.

org.objectweb.jonas.webapp.taglib.TreeControl.TreeControl TreeControlNode  root  ) 
 

Construct a new instance with the specified root node.

Parameters:
root The new root node

Definition at line 96 of file TreeControl.java.


Member Function Documentation

void org.objectweb.jonas.webapp.taglib.TreeControl.addNode TreeControlNode  node  )  throws IllegalArgumentException [package]
 

Register the specified node in our registry of the complete tree.

Parameters:
node The TreeControlNode to be registered
Exceptions:
IllegalArgumentException if the name of this node is not unique

Definition at line 222 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControl.autoRefresh(), org.objectweb.jonas.webapp.taglib.TreeControlNode.getName(), org.objectweb.jonas.webapp.taglib.TreeControl.registry, and org.objectweb.jonas.webapp.taglib.TreeControlNode.setTree().

Referenced by org.objectweb.jonas.webapp.taglib.TreeControlNode.addChild().

Here is the call graph for this function:

void org.objectweb.jonas.webapp.taglib.TreeControl.addRemovedList TreeControlNode  p_RemovedNode  )  [package]
 

Add the removed node in the removed list.

Parameters:
p_RemovedNode The removed node

Definition at line 318 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControlNode.getName().

Referenced by org.objectweb.jonas.webapp.taglib.TreeControl.removeNode().

Here is the call graph for this function:

void org.objectweb.jonas.webapp.taglib.TreeControl.autoRefresh TreeControlNode  p_AddedNode  )  [protected]
 

Search the added node in the removed list and if it's found, copy the expanded info.

Parameters:
p_AddedNode The added node

Definition at line 329 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControlNode.getName(), org.objectweb.jonas.webapp.taglib.TreeControlNode.isExpanded(), and org.objectweb.jonas.webapp.taglib.TreeControlNode.setExpanded().

Referenced by org.objectweb.jonas.webapp.taglib.TreeControl.addNode().

Here is the call graph for this function:

void org.objectweb.jonas.webapp.taglib.TreeControl.disableAutoRefresh  ) 
 

Disable auto-refresh mode.

Definition at line 293 of file TreeControl.java.

Referenced by org.objectweb.jonas.webapp.jonasadmin.catalina.CatalinaBaseAction.refreshConnectorsTree(), org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshJoramTree(), org.objectweb.jonas.webapp.jonasadmin.logging.BaseLoggerAction.refreshLoggersTree(), org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshMBeansTree(), org.objectweb.jonas.webapp.jonasadmin.security.BaseSecurityAction.refreshSecurityTree(), and org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshServiceTree().

void org.objectweb.jonas.webapp.taglib.TreeControl.enableAutoRefresh  ) 
 

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.

Definition at line 309 of file TreeControl.java.

Referenced by org.objectweb.jonas.webapp.jonasadmin.catalina.CatalinaBaseAction.refreshConnectorsTree(), org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshJoramTree(), org.objectweb.jonas.webapp.jonasadmin.logging.BaseLoggerAction.refreshLoggersTree(), org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshMBeansTree(), org.objectweb.jonas.webapp.jonasadmin.security.BaseSecurityAction.refreshSecurityTree(), and org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshServiceTree().

void org.objectweb.jonas.webapp.taglib.TreeControl.expandSelectedParents  ) 
 

Expand a branch in the tree of the selected node.

Definition at line 195 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControlNode.getParent(), org.objectweb.jonas.webapp.taglib.TreeControl.getSelected(), and org.objectweb.jonas.webapp.taglib.TreeControlNode.setExpanded().

Referenced by org.objectweb.jonas.webapp.jonasadmin.WhereAreYou.selectNameNode().

Here is the call graph for this function:

TreeControlNode org.objectweb.jonas.webapp.taglib.TreeControl.findNode String  name  ) 
 

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

Definition at line 159 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControl.registry.

Referenced by org.objectweb.jonas.webapp.jonasadmin.TreeAction.execute(), org.objectweb.jonas.webapp.jonasadmin.catalina.CatalinaBaseAction.refreshConnectorsTree(), org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshJoramTree(), org.objectweb.jonas.webapp.jonasadmin.logging.BaseLoggerAction.refreshLoggersTree(), org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshMBeansTree(), org.objectweb.jonas.webapp.jonasadmin.security.BaseSecurityAction.refreshSecurityTree(), org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction.refreshServiceTree(), and org.objectweb.jonas.webapp.taglib.TreeControl.selectNode().

TreeControlNode org.objectweb.jonas.webapp.taglib.TreeControl.getSelected  ) 
 

Get the last node selected.

Returns:
the current node selected

Definition at line 188 of file TreeControl.java.

Referenced by org.objectweb.jonas.webapp.taglib.TreeControl.expandSelectedParents(), org.objectweb.jonas.webapp.jonasadmin.WhereAreYou.getSelectedNameNode(), org.objectweb.jonas.webapp.jonasadmin.WhereAreYou.getSelectedTreeControlNode(), and org.objectweb.jonas.webapp.jonasadmin.WhereAreYou.getUrlToRefreshSelectedNode().

int org.objectweb.jonas.webapp.taglib.TreeControl.getWidth TreeControlNode  node  )  [package]
 

Calculate the width of the subtree below the specified node.

Parameters:
node The node for which to calculate the width

Definition at line 241 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControlNode.findChildren(), org.objectweb.jonas.webapp.taglib.TreeControl.getWidth(), org.objectweb.jonas.webapp.taglib.TreeControlNode.getWidth(), and org.objectweb.jonas.webapp.taglib.TreeControlNode.isExpanded().

Here is the call graph for this function:

int org.objectweb.jonas.webapp.taglib.TreeControl.getWidth  ) 
 

The current displayable "width" of this tree (that is, the maximum depth of the visible part of the tree).

Definition at line 142 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControl.root.

Referenced by org.objectweb.jonas.webapp.taglib.TreeControlTag.doEndTag(), and org.objectweb.jonas.webapp.taglib.TreeControl.getWidth().

void org.objectweb.jonas.webapp.taglib.TreeControl.removeNode TreeControlNode  node  )  [package]
 

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

Definition at line 263 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControl.addRemovedList(), org.objectweb.jonas.webapp.taglib.TreeControlNode.findChildren(), org.objectweb.jonas.webapp.taglib.TreeControlNode.getName(), org.objectweb.jonas.webapp.taglib.TreeControlNode.getParent(), org.objectweb.jonas.webapp.taglib.TreeControl.registry, org.objectweb.jonas.webapp.taglib.TreeControlNode.remove(), org.objectweb.jonas.webapp.taglib.TreeControlNode.removeChild(), org.objectweb.jonas.webapp.taglib.TreeControlNode.setParent(), and org.objectweb.jonas.webapp.taglib.TreeControlNode.setTree().

Referenced by org.objectweb.jonas.webapp.taglib.TreeControlNode.remove(), and org.objectweb.jonas.webapp.taglib.TreeControlNode.removeChild().

Here is the call graph for this function:

void org.objectweb.jonas.webapp.taglib.TreeControl.selectNode String  name  ) 
 

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

Definition at line 172 of file TreeControl.java.

References org.objectweb.jonas.webapp.taglib.TreeControl.findNode(), org.objectweb.jonas.webapp.taglib.TreeControl.selected, and org.objectweb.jonas.webapp.taglib.TreeControlNode.setSelected().

Referenced by org.objectweb.jonas.webapp.jonasadmin.TreeAction.execute(), org.objectweb.jonas.webapp.jonasadmin.SetUpTreeAction.execute(), and org.objectweb.jonas.webapp.jonasadmin.WhereAreYou.selectNameNode().

Here is the call graph for this function:


Member Data Documentation

HashMap org.objectweb.jonas.webapp.taglib.TreeControl.registry = new HashMap() [protected]
 

The collection of nodes that represent this tree, keyed by name.

Definition at line 106 of file TreeControl.java.

Referenced by org.objectweb.jonas.webapp.taglib.TreeControl.addNode(), org.objectweb.jonas.webapp.taglib.TreeControl.findNode(), and org.objectweb.jonas.webapp.taglib.TreeControl.removeNode().

TreeControlNode org.objectweb.jonas.webapp.taglib.TreeControl.root = null [protected]
 

The root node of the entire tree.

Definition at line 121 of file TreeControl.java.

Referenced by org.objectweb.jonas.webapp.taglib.TreeControl.getWidth().

TreeControlNode org.objectweb.jonas.webapp.taglib.TreeControl.selected = null [protected]
 

The most recently selected node.

Definition at line 111 of file TreeControl.java.

Referenced by org.objectweb.jonas.webapp.taglib.TreeControl.selectNode().


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:09:47 2005 for JOnAS by  doxygen 1.3.9.1