| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TreeModel
| Method Summary | |
|---|---|
|  Object | getChild(Object parent,
         int index)Return the child of parentat indexindexin the parent's child array. | 
|  int | getChildCount(Object parent)Answer the number of children of parent. | 
|  int | getIndexOfChild(Object parent,
                Object child)Return the index of child in parent. | 
|  Object | getRoot()Return the root of the tree. | 
|  Collection | getTreeModelListeners()Answer the mutable collection of tree model listeners. | 
|  boolean | isLeaf(Object node)Answer trueifnodeis a leaf. | 
|  void | valueForPathChanged(TreePath path,
                    Object newValue)Called when the value for the item identified by pathhas changed tonewValue. | 
| Method Detail | 
|---|
Object getRoot()
Object getChild(Object parent,
                int index)
parent at index index
 in the parent's child array.
parent - a node in the tree
parent at index indexint getChildCount(Object parent)
parent.
parent - a node in the tree
parentboolean isLeaf(Object node)
true if node is a leaf.
node - a node in the tree
node is a leaf
void valueForPathChanged(TreePath path,
                         Object newValue)
path has changed to newValue.
 If newValue signifies a truly new value
 the model should post a treeNodesChanged event.
path - path to the node that has been alterednewValue - the new value from the TreeCellEditor
int getIndexOfChild(Object parent,
                    Object child)
parent - a node in the treechild - the node we are interested in
child or parent are nullCollection getTreeModelListeners()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||