public abstract class AbstractConfigTreeNode extends Object implements ConfigTreeNode
Modifier and Type | Method and Description |
---|---|
void |
add(ConfigTreeNode node)
Adds the given node to the tree model.
|
Enumeration |
children()
Returns the children of the receiver as an
Enumeration . |
boolean |
getAllowsChildren()
Returns true if the receiver allows children.
|
TreeNode |
getChildAt(int childIndex)
Returns the child
TreeNode at index childIndex . |
int |
getChildCount()
Returns the number of children
TreeNode s the receiver contains. |
int |
getIndex(TreeNode node)
Returns the index of
node in the receivers children. |
String |
getName()
Return the name of the node.
|
TreeNode |
getParent()
Return the parent of this node or null if there is no parent.
|
boolean |
isLeaf()
Returns true if the receiver is a leaf.
|
void |
setParent(TreeNode parent)
Defines the parent of this node, or null if the node should not have a parent.
|
public void add(ConfigTreeNode node)
node
- the new node that should be added.public TreeNode getChildAt(int childIndex)
TreeNode
at index childIndex
.getChildAt
in interface TreeNode
childIndex
- the index of the child node within this parent node.public int getChildCount()
TreeNode
s the receiver contains.getChildCount
in interface TreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface TreeNode
public int getIndex(TreeNode node)
node
in the receivers children. If the receiver does not contain
node
, -1 will be returned.public boolean isLeaf()
public Enumeration children()
Enumeration
.public String getName()
getName
in interface ConfigTreeNode
public TreeNode getParent()
getParent
in interface TreeNode
TreeNode.getParent()
public void setParent(TreeNode parent)
setParent
in interface ConfigTreeNode
parent
- the new parent or null.