|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.webapp.taglib.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 | |
---|---|
static String |
ID_PREFIX
|
protected int |
mi_Id
|
protected 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 | |
---|---|
protected void |
autoRefresh(TreeControlNode p_AddedNode)
Search the added node in the removed list and if it's found, copy the expanded info. |
void |
disableAutoRefresh()
Disable auto-refresh mode. |
void |
enableAutoRefresh()
Enable auto-refresh mode. |
void |
expandSelectedParents()
Expand a branch in the tree of the selected node. |
TreeControlNode |
findNode(String name)
Find and return the TreeControlNode for the specified
node name, if it exists; otherwise, return null . |
TreeControlNode |
getRoot()
|
TreeControlNode |
getSelected()
Get the last node selected. |
int |
getWidth()
The current displayable "width" of this tree (that is, the maximum depth of the visible part of the tree). |
String |
newId()
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ID_PREFIX
protected HashMap registry
protected TreeControlNode selected
protected int mi_Id
protected TreeControlNode root
Constructor Detail |
---|
public TreeControl()
public TreeControl(TreeControlNode root)
root
- The new root nodeMethod Detail |
---|
public TreeControlNode getRoot()
protected void setRoot(TreeControlNode root)
public int getWidth()
public TreeControlNode findNode(String name)
TreeControlNode
for the specified
node name, if it exists; otherwise, return null
.
name
- Name of the TreeControlNode
to be returnedpublic void selectNode(String name)
node
- Name of the node to mark as selected, or null
if there should be no currently selected nodepublic TreeControlNode getSelected()
public void expandSelectedParents()
public String newId()
public void disableAutoRefresh()
public void enableAutoRefresh()
protected void autoRefresh(TreeControlNode p_AddedNode)
p_AddedNode
- The added node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |