|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.argouml.ui.PerspectiveSupport | +--org.argouml.ui.TreeModelSupport | +--org.argouml.ui.TreeModelComposite
This class is the TreeModel for the navigator and todo list panels.
It is called Composite because there are a set of rules that determine how to link parents to children in the tree. Those rules can now be found in PerspectiveSupport.
$Id: TreeModelComposite.java,v 1.16 2003/06/29 23:47:02 linus Exp $
Field Summary | |
protected java.lang.Object |
_root
root of the model |
Fields inherited from class org.argouml.ui.TreeModelSupport |
_listenerList |
Fields inherited from class org.argouml.ui.PerspectiveSupport |
_goRules, _name, _rules |
Constructor Summary | |
TreeModelComposite(java.lang.String name)
needs documenting |
Method Summary | |
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Finds the each of the children of a parent in the tree. |
int |
getChildCount(java.lang.Object parent)
needs documenting |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
needs documenting |
java.lang.Object |
getRoot()
needs documenting |
boolean |
isLeaf(java.lang.Object node)
Returns true if node is a leaf. |
void |
setRoot(java.lang.Object r)
needs documenting |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
Empty implementation - not used. |
Methods inherited from class org.argouml.ui.TreeModelSupport |
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeStructureChanged, fireTreeStructureChanged, fireTreeStructureChanged, fireTreeStructureChanged, removeTreeModelListener |
Methods inherited from class org.argouml.ui.PerspectiveSupport |
addSubTreeModel, getName, getRegisteredRules, getSubTreeModels, registerRule, removeSubTreeModel, setName, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.swing.tree.TreeModel |
addTreeModelListener, removeTreeModelListener |
Field Detail |
protected java.lang.Object _root
Constructor Detail |
public TreeModelComposite(java.lang.String name)
Method Detail |
public java.lang.Object getRoot()
getRoot
in interface javax.swing.tree.TreeModel
public java.lang.Object getChild(java.lang.Object parent, int index)
getChild
in interface javax.swing.tree.TreeModel
parent
- in the treeindex
- of child to find
public int getChildCount(java.lang.Object parent)
getChildCount
in interface javax.swing.tree.TreeModel
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
getIndexOfChild
in interface javax.swing.tree.TreeModel
public boolean isLeaf(java.lang.Object node)
If none of the subTreeModels is not a leaf, then we are not a leaf.
isLeaf
in interface javax.swing.tree.TreeModel
node
- a node in the tree, obtained from this data source
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
Messaged when the user has altered the value for the item identified by path to newValue. If newValue signifies a truly new value the model should post a treeNodesChanged event.
valueForPathChanged
in interface javax.swing.tree.TreeModel
path
- path to the node that the user has altered.newValue
- the new value from the TreeCellEditor.public void setRoot(java.lang.Object r)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2003 (20030919) | ArgoUML Project Home | ArgoUML Cookbook |