|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.skeleton.model.node.AbstractTreeNode
public abstract class AbstractTreeNode
The abstract superclass for all tree node classes in Skeleton (Pro).
Constructor Summary | |
---|---|
AbstractTreeNode(NavigationNode parent,
Object model)
Constructs a tree node for the given parent and model. |
Method Summary | |
---|---|
void |
add(NavigationNode child)
Adds the given child to the list of this node's children. |
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. |
Icon |
getIcon(boolean selected)
Returns this node's icon for the given selection state. |
int |
getIndex(TreeNode node)
Returns the index of node in the receivers children. |
Object |
getModel()
Returns this node's model. |
abstract String |
getName()
Returns this node's name. |
TreeNode |
getParent()
Returns the parent TreeNode of the receiver. |
boolean |
isLeaf()
Returns true if the receiver is a leaf. |
String |
toString()
Returns a string representation for this node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractTreeNode(NavigationNode parent, Object model)
parent
- this node's parentmodel
- the domain object associated with this nodeMethod Detail |
---|
public boolean getAllowsChildren()
getAllowsChildren
in interface TreeNode
public TreeNode getChildAt(int childIndex)
TreeNode
at index
childIndex
.
getChildAt
in interface TreeNode
public int getChildCount()
TreeNode
s the receiver
contains.
getChildCount
in interface TreeNode
public Enumeration children()
Enumeration
.
children
in interface TreeNode
Enumeration
.public int getIndex(TreeNode node)
node
in the receivers children.
If the receiver does not contain node
, -1 will be
returned.
getIndex
in interface TreeNode
public TreeNode getParent()
TreeNode
of the receiver.
getParent
in interface TreeNode
TreeNode
of the receiver.public boolean isLeaf()
isLeaf
in interface TreeNode
public abstract String getName()
getName
in interface NavigationNode
public Icon getIcon(boolean selected)
getIcon
in interface NavigationNode
selected
- true for selected node, false for deselected
public Object getModel()
FlangeNode
may implement getFlange
.
getModel
in interface NavigationNode
public void add(NavigationNode child)
child
- the node to add as this node's childpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |