|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface INode
An interface to a node.
| Method Summary | |
|---|---|
void |
addChild(INode child)
Adds a child to the given node as the last child. |
void |
addChild(int index,
INode child)
Adds child to the receiver at index. |
void |
addTreeStructureChangedListener(ITreeStructureChangedListener l)
Adds a listener l to the the listener list. |
INode |
createChild()
Creates a child to the given node as the last child. |
INode |
createChild(java.lang.String name)
Creates a child with a name to the given node as the last child. |
void |
fireTreeStructureChanged(INode node)
Fires the tree structure changed event. |
int |
getAncestorCount()
Returns the count of ancestor nodes. |
java.util.Iterator<INode> |
getAncestors()
Returns ancestors of the receiver. |
java.util.List<INode> |
getAncestorsList()
Returns unmodifiable list of receivers ancestors. |
INode |
getChildAt(int childIndex)
Returns the child node at index childIndex. |
int |
getChildCount()
Returns the number of children INodes. |
int |
getChildIndex(INode child)
Returns the index of node in the receivers children. |
java.util.Iterator<INode> |
getChildren()
Returns the iterator over the children of the receiver. |
java.util.List<INode> |
getChildrenList()
Returns unmodifiable list of receivers children. |
int |
getDescendantCount()
Returns the count of descendant nodes. |
java.util.Iterator<INode> |
getDescendants()
Returns descendants of the receiver. |
java.util.List<INode> |
getDescendantsList()
Returns unmodifiable list of receivers descendants. |
int |
getLevel()
Returns the number of levels above this node -- the distance from the root to this node. |
INodeData |
getNodeData()
Returns interface to the node metadata. |
INode |
getParent()
Returns the parent of the receiver. |
boolean |
hasParent()
Returns true if the receiver has a parent and false otherwise. |
boolean |
isLeaf()
Returns true if the receiver is a leaf. |
void |
removeChild(INode node)
Removes node from the receiver. |
void |
removeChild(int index)
Removes the child at index from the receiver. |
void |
removeFromParent()
Removes the subtree rooted at this node from the tree, giving this node a null parent. |
void |
removeTreeStructureChangedListener(ITreeStructureChangedListener l)
Removes a listener l from the listeners list. |
void |
setParent(INode newParent)
Sets the parent of the receiver to newParent. |
| Methods inherited from interface javax.swing.tree.MutableTreeNode |
|---|
insert, remove, remove, setParent, setUserObject |
| Methods inherited from interface javax.swing.tree.TreeNode |
|---|
children, getAllowsChildren, getIndex |
| Methods inherited from interface it.unitn.disi.smatch.data.matrices.IIndexedObject |
|---|
getIndex, setIndex |
| Method Detail |
|---|
INode getChildAt(int childIndex)
getChildAt in interface javax.swing.tree.TreeNodeint getChildCount()
getChildCount in interface javax.swing.tree.TreeNodeint getChildIndex(INode child)
child - a node to search for
java.util.Iterator<INode> getChildren()
java.util.List<INode> getChildrenList()
INode createChild()
INode createChild(java.lang.String name)
name - a name for a new child
void addChild(INode child)
child - node to add
void addChild(int index,
INode child)
index - index where the child will be addedchild - node to addvoid removeChild(int index)
index - index of a child to removevoid removeChild(INode node)
node - child to removeINode getParent()
getParent in interface javax.swing.tree.TreeNodevoid setParent(INode newParent)
newParent - new parentboolean hasParent()
void removeFromParent()
removeFromParent in interface javax.swing.tree.MutableTreeNodeboolean isLeaf()
isLeaf in interface javax.swing.tree.TreeNodeint getAncestorCount()
java.util.Iterator<INode> getAncestors()
java.util.List<INode> getAncestorsList()
int getLevel()
int getDescendantCount()
java.util.Iterator<INode> getDescendants()
java.util.List<INode> getDescendantsList()
INodeData getNodeData()
void addTreeStructureChangedListener(ITreeStructureChangedListener l)
l to the the listener list.
l - listenervoid removeTreeStructureChangedListener(ITreeStructureChangedListener l)
l from the listeners list.
l - listenervoid fireTreeStructureChanged(INode node)
node - the root of the tree which is changed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||