|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.webapp.taglib.TreeControlNode
public class TreeControlNode
An individual node of a tree control represented by an instance of
TreeControl
, and rendered by an instance of
TreeControlTag
.
Field Summary | |
---|---|
protected String |
action
The hyperlink to which control will be directed if this node is selected by the user. |
protected ArrayList |
children
The set of child TreeControlNodes for this node, in the
order that they should be displayed. |
protected boolean |
expanded
Is this node currently expanded? |
protected String |
icon
The pathname to the icon file displayed when this node is visible, relative to the image directory for our images. |
protected String |
label
The label that will be displayed when this node is visible. |
protected boolean |
last
Is this the last node in the set of children for our parent node? |
protected String |
name
The unique (within the entire tree) name of this node. |
protected TreeControlNode |
parent
The parent node of this node, or null if this
is the root node. |
protected boolean |
selected
Is this node currently selected? |
protected String |
target
The window target for the hyperlink identified by the action property, if this node is selected
by the user. |
protected TreeControl |
tree
The TreeControl instance representing the
entire tree. |
protected int |
width
The display width necessary to display this item (if it is visible). |
Constructor Summary | |
---|---|
TreeControlNode(String name,
String icon,
String label,
String action,
String target,
boolean expanded)
Construct a new TreeControlNode with the specified parameters. |
|
TreeControlNode(TreeControlNode p_Node)
|
Method Summary | |
---|---|
void |
addChild(int offset,
TreeControlNode child)
Add a new child node at the specified position in the child list. |
void |
addChild(TreeControlNode child)
Add a new child node to the end of the list. |
TreeControlNode[] |
findChildren()
Return the set of child nodes for this node. |
String |
getAction()
|
String |
getIcon()
|
String |
getLabel()
|
String |
getName()
|
TreeControlNode |
getParent()
|
String |
getTarget()
|
TreeControl |
getTree()
|
int |
getWidth()
|
boolean |
isExpanded()
|
boolean |
isLast()
|
boolean |
isLeaf()
Is this a "leaf" node (i.e. |
boolean |
isSelected()
|
void |
remove()
Remove this node from the tree. |
void |
removeChild(int offset)
Remove the child node (and all children of that child) at the specified position in the child list. |
void |
setExpanded(boolean expanded)
|
void |
setSelected(boolean selected)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ArrayList children
TreeControlNodes
for this node, in the
order that they should be displayed.
protected String action
protected boolean expanded
protected String icon
protected String label
protected boolean last
protected String name
protected TreeControlNode parent
null
if this
is the root node.
protected boolean selected
protected String target
action
property, if this node is selected
by the user.
protected TreeControl tree
TreeControl
instance representing the
entire tree.
protected int width
Constructor Detail |
---|
public TreeControlNode(String name, String icon, String label, String action, String target, boolean expanded)
name
- Internal name of this node (must be unique within
the entire tree)icon
- Pathname of the image file for the icon to be displayed
when this node is visible, relative to the image directory
for our imageslabel
- The label that will be displayed to the user if
this node is visibleaction
- The hyperlink to be selected if the user
selects this node, or null
if this node's label should
not be a hyperlinktarget
- The window target in which the action
hyperlink's results will be displayed, or null
for
the current windowexpanded
- Should this node be expanded?public TreeControlNode(TreeControlNode p_Node)
Method Detail |
---|
public String getAction()
public boolean isExpanded()
public void setExpanded(boolean expanded)
public String getIcon()
public String getLabel()
public boolean isLast()
public boolean isLeaf()
public String getName()
public TreeControlNode getParent()
public boolean isSelected()
public void setSelected(boolean selected)
public String getTarget()
public TreeControl getTree()
public int getWidth()
public void addChild(TreeControlNode child) throws IllegalArgumentException
child
- The new child node
IllegalArgumentException
- if the name of the new child
node is not uniquepublic void addChild(int offset, TreeControlNode child) throws IllegalArgumentException
offset
- Zero-relative offset at which the new node
should be insertedchild
- The new child node
IllegalArgumentException
- if the name of the new child
node is not uniquepublic TreeControlNode[] findChildren()
public void remove()
public void removeChild(int offset)
offset
- Zero-relative offset at which the existing
node should be removedpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |