|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dist1.acb.ACBpoint.TopicsModel
TreeModel used by the JTree in order to display hiearchical model of the Topics
Constructor Summary | |
TopicsModel(Topic rootTopic)
Creates a new instance of TopicsModel |
Method Summary | |
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes. |
protected void |
fireTreeStructureChanged(Topic oldRoot)
The only event raised by this model is TreeStructureChanged with the root as path, ie the whole tree has changed. |
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Returns the child of parent at index index in the parent's child array. |
int |
getChildCount(java.lang.Object parent)
Returns the number of children of parent. |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
Returns the index of child in parent. |
java.lang.Object |
getRoot()
Returns the root of the tree. |
boolean |
isLeaf(java.lang.Object node)
Returns true if node is a leaf. |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
Removes a listener previously added with addTreeModelListener(). |
void |
showAncestor(boolean b,
java.lang.Object newRoot)
Used to toggle between show ancestors/show descendant and to change the root of the tree. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TopicsModel(Topic rootTopic)
Method Detail |
public void showAncestor(boolean b, java.lang.Object newRoot)
protected void fireTreeStructureChanged(Topic oldRoot)
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener
in interface javax.swing.tree.TreeModel
public java.lang.Object getChild(java.lang.Object parent, int index)
getChild
in interface javax.swing.tree.TreeModel
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 java.lang.Object getRoot()
getRoot
in interface javax.swing.tree.TreeModel
public boolean isLeaf(java.lang.Object node)
isLeaf
in interface javax.swing.tree.TreeModel
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener
in interface javax.swing.tree.TreeModel
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
valueForPathChanged
in interface javax.swing.tree.TreeModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |