|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.GraphTreeModel
This class represents a flat tree model for a graph. The treemodel consist of one root node whose children are the nodes of the graph.
Constructor Summary | |
GraphTreeModel(Graph graph)
Creates a model for a given Graph |
Method Summary | |
void |
addTreeModelListener(TreeModelListener l)
Adds a listener to this model. |
Object |
getChild(Object parent,
int index)
If parent is the root node then then node at index in the graph is returned. |
int |
getChildCount(Object parent)
If parent is the root then the number of nodes in the graph is returned. |
int |
getIndexOfChild(Object parent,
Object child)
Returns the index of the node in the graph. |
Object |
getRoot()
Returns the dummy root node. |
boolean |
isLeaf(Object node)
Whether or not the node is a leaf in the tree. |
void |
postEvent()
Sends out a TreeModelEvent to all registered listeners. |
void |
removeTreeModelListener(TreeModelListener l)
Removes a listener from this model. |
void |
valueForPathChanged(TreePath path,
Object newValue)
Does nothing yet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphTreeModel(Graph graph)
Method Detail |
public Object getChild(Object parent, int index)
getChild
in interface TreeModel
public int getChildCount(Object parent)
getChildCount
in interface TreeModel
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
public Object getRoot()
getRoot
in interface TreeModel
public boolean isLeaf(Object node)
isLeaf
in interface TreeModel
public void addTreeModelListener(TreeModelListener l)
addTreeModelListener
in interface TreeModel
public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener
in interface TreeModel
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
public void postEvent()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |