|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.swing.components.tree.DefaultTreeNode
public class DefaultTreeNode
General-purpose tree node that contains a parent tree node link and a list of child tree nodes.
| Field Summary | |
|---|---|
protected javax.swing.tree.TreeNode |
parent
Parent tree node |
| Constructor Summary | |
|---|---|
DefaultTreeNode()
Default constructor. |
|
DefaultTreeNode(javax.swing.tree.TreeNode parent)
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addChild(DefaultTreeNode child)
Adds a child. |
java.util.Enumeration |
children()
Returns an Enumeration off all children. |
void |
clearChilds()
Clears the child list. |
boolean |
getAllowsChildren()
Returns false. |
javax.swing.tree.TreeNode |
getChildAt(int index)
Returns the child at the given position. |
int |
getChildCount()
Returns the number of children in the entry. |
java.util.List |
getChildList()
Gets the child list. |
int |
getIndex(javax.swing.tree.TreeNode treeNode)
Returns the index of this child node. |
javax.swing.tree.TreeNode |
getParent()
Gets the parent tree node. |
void |
insertChild(DefaultTreeNode child,
int index)
Inserts a child into the child list. |
boolean |
isLeaf()
Determines if this is a leaf node. |
void |
removeChild(DefaultTreeNode child)
Removes a child. |
void |
setChildList(java.util.List childList)
Sets the child list. |
void |
setParent(javax.swing.tree.TreeNode parent)
Sets the parent tree node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.swing.tree.TreeNode parent
| Constructor Detail |
|---|
public DefaultTreeNode()
public DefaultTreeNode(javax.swing.tree.TreeNode parent)
parent - Parent tree node| Method Detail |
|---|
public java.util.Enumeration children()
children in interface javax.swing.tree.TreeNodepublic int getIndex(javax.swing.tree.TreeNode treeNode)
getIndex in interface javax.swing.tree.TreeNodetreeNode - The tree node
public boolean isLeaf()
isLeaf in interface javax.swing.tree.TreeNodepublic javax.swing.tree.TreeNode getChildAt(int index)
getChildAt in interface javax.swing.tree.TreeNodeindex - The 0-based position
public int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodepublic boolean getAllowsChildren()
getAllowsChildren in interface javax.swing.tree.TreeNodepublic javax.swing.tree.TreeNode getParent()
getParent in interface javax.swing.tree.TreeNodepublic void setParent(javax.swing.tree.TreeNode parent)
public void addChild(DefaultTreeNode child)
child - The child to add
public void insertChild(DefaultTreeNode child,
int index)
child - The child to addindex - 0-based index of the node the should preceede the new childpublic void removeChild(DefaultTreeNode child)
child - The child to removepublic void clearChilds()
public java.util.List getChildList()
TreeNode objectspublic void setChildList(java.util.List childList)
childList - A list of TreeNode objects
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||