arlut.csd.JTree
Class treeNode
java.lang.Object
|
+--arlut.csd.JTree.treeNode
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- BaseNode, BaseNode, CatTreeNode, FieldNode, InvidNode, SpaceNode
- public class treeNode
- extends java.lang.Object
- implements java.lang.Cloneable
treeNode is a node in the treeCanvas widget. A treeNode consists of
a text string with pointers to maintain its place in the tree displayed
by the treeCanvas.
- See Also:
treeCanvas
|
Constructor Summary |
treeNode(treeNode parent,
java.lang.String text,
treeNode insertAfter,
boolean expandable)
|
treeNode(treeNode parent,
java.lang.String text,
treeNode insertAfter,
boolean expandable,
int openImage,
int closedImage)
|
treeNode(treeNode parent,
java.lang.String text,
treeNode insertAfter,
boolean expandable,
int openImage,
int closedImage,
treeMenu menu)
|
| Methods inherited from class java.lang.Object |
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
text
java.lang.String text
expandable
boolean expandable
expanded
boolean expanded
selected
boolean selected
openImage
int openImage
closedImage
int closedImage
boxX1
int boxX1
boxX2
int boxX2
boxY1
int boxY1
boxY2
int boxY2
parent
treeNode parent
child
treeNode child
prevSibling
treeNode prevSibling
nextSibling
treeNode nextSibling
menu
treeMenu menu
tree
treeControl tree
row
int row
childStack
java.util.Stack childStack
treeNode
public treeNode(treeNode parent,
java.lang.String text,
treeNode insertAfter,
boolean expandable,
int openImage,
int closedImage,
treeMenu menu)
- Parameters:
parent - Parent node to insert this node under, null if this is the root nodetext - Content of this nodeinsertAfter - sibling to insert this node after, null if this is the root nodeexpandable - this node is a folder node, and should always have a +/- boxopenImage - Index of treeCanvas image used to display this node if it is not expandedopenImage - Index of treeCanvas image used to display this node if it is expandedmenu - Popup menu to attach to this node
treeNode
public treeNode(treeNode parent,
java.lang.String text,
treeNode insertAfter,
boolean expandable,
int openImage,
int closedImage)
- Parameters:
parent - Parent node to insert this node under, null if this is the root nodetext - Content of this nodeinsertAfter - sibling to insert this node after, null if this is the root nodeexpandable - this node is a folder node, and should always have a +/- boxopenImage - Index of treeCanvas image used to display this node if it is not expandedopenImage - Index of treeCanvas image used to display this node if it is expanded
treeNode
public treeNode(treeNode parent,
java.lang.String text,
treeNode insertAfter,
boolean expandable)
- Parameters:
parent - Parent node to insert this node under, null if this is the root nodetext - Content of this nodeinsertAfter - sibling to insert this node after, null if this is the root nodeexpandable - this node is a folder node, and should always have a +/- box
clone
public java.lang.Object clone()
- This method does a full clone of this object. Code that clones a
treeNode may want to call resetNode() on the result to prepare
the node for re-insertion into the tree.
- Overrides:
clone in class java.lang.Object
- See Also:
treeControl.moveNode(arlut.csd.JTree.treeNode, arlut.csd.JTree.treeNode,, arlut.csd.JTree.treeNode,, boolean)
resetNode
public void resetNode()
- This clears this node's fields relating to the node's state and
position in the tree.
- See Also:
treeControl.moveNode(arlut.csd.JTree.treeNode, arlut.csd.JTree.treeNode,, arlut.csd.JTree.treeNode,, boolean)
getText
public java.lang.String getText()
setText
public void setText(java.lang.String text)
setMenu
public void setMenu(treeMenu menu)
- This method allows you to change the popup menu
on a tree node.
setImages
public void setImages(int openImage,
int closedImage)
setOpenImage
public void setOpenImage(int openImage)
setClosedImage
public void setClosedImage(int closedImage)
getOpenImage
public int getOpenImage()
getClosedImage
public int getClosedImage()
getParent
public treeNode getParent()
getPrevSibling
public treeNode getPrevSibling()
getChild
public treeNode getChild()
getChild
public treeNode getChild(java.lang.String key)
- Returns the child node with name 'key',
if there is any such.
getNextSibling
public treeNode getNextSibling()
isOpen
public boolean isOpen()