|
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--vipratech.beans.standardbeans.TreeNode
This is a single node in the TreeView panel. It displays text and optionally one of two images depending on its state, collapsed or expanded. It also may have an object associated with it that doesn't get displayed.
TreeView
, Serialized FormConstructor Summary | |
TreeNode()
Constructs a default TreeNode. |
|
TreeNode(java.lang.String text,
java.awt.Image collapsedImage,
java.awt.Image expandedImage,
TreeView treeView)
Constructs a TreeNode with the given text label, and collapsed and expanded images. |
|
TreeNode(java.lang.String text,
TreeView treeView)
Constructs a TreeNode with the given text label. |
Method Summary | |
void |
collapse()
Sets a flag indicating that this node is not expanded. |
void |
expand()
Sets a flag indicating that this node is expanded, if it is expandable. |
TreeNode |
getChild()
Gets the child of this node. |
java.lang.Object |
getDataObject()
Gets the object associated with this node. |
int |
getDepth()
Gets the depth of this node as previously noted. |
java.awt.Image |
getImage()
Gets the proper image for this node in its current state, expanded or collapsed. |
TreeNode |
getParent()
Gets the parent of this node. |
TreeNode |
getSibling()
Gets the next sibling of this node. |
java.lang.String |
getText()
Gets the current text label for this node. |
boolean |
isExpandable()
Determines whether this node is expandable. |
boolean |
isExpanded()
Determines whether this node is expanded. |
void |
setCollapsedImage(java.awt.Image image)
Sets the image to use for this node when it is not expanded. |
void |
setDataObject(java.lang.Object theObject)
Sets an object to associate with this node. |
void |
setExpandedImage(java.awt.Image image)
Sets the image to use for this node when it is expanded. |
void |
setText(java.lang.String s)
Sets a new text label for this node. |
void |
toggle()
Toggles the node state between collapsed and expanded, if the node is expandable. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public TreeNode()
public TreeNode(java.lang.String text, TreeView treeView)
text
- the text to display for this nodetreeView
- the instance of TreeView whose node this is.
Typically "this"public TreeNode(java.lang.String text, java.awt.Image collapsedImage, java.awt.Image expandedImage, TreeView treeView)
text
- the text to display for this nodecollapsedImage
- the image to use when this node is collapsed, hiding
all of its child nodesexpandedImage
- the image to use when this node is expanded, showing
all of its child nodestreeView
- the instance of TreeView whose node this is.
Typically "this"Method Detail |
public int getDepth()
public boolean isExpanded()
public boolean isExpandable()
public void expand()
public void collapse()
public void toggle()
public java.awt.Image getImage()
public void setExpandedImage(java.awt.Image image)
image
- the image to use when this node is expandedsetCollapsedImage(java.awt.Image)
,
getImage()
public void setCollapsedImage(java.awt.Image image)
image
- the image to use when this node is collapsedsetExpandedImage(java.awt.Image)
,
getImage()
public java.lang.String getText()
setText(java.lang.String)
public void setText(java.lang.String s)
s
- the new text label for this nodegetText()
public java.lang.Object getDataObject()
setDataObject(java.lang.Object)
public void setDataObject(java.lang.Object theObject)
theObject
- an object to associate with this nodegetDataObject()
public TreeNode getParent()
getChild()
,
getSibling()
public TreeNode getChild()
getParent()
,
getSibling()
public TreeNode getSibling()
getChild()
,
getParent()
|
dathe@chemie.uni-leipzig.de" | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |