|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.ucl.cs.emofocl.jmibrowser.DAGTreeModel
public abstract class DAGTreeModel
Manages a tree to represent a rooted directed acyclic graph
Constructor Summary | |
---|---|
protected |
DAGTreeModel()
|
Method Summary | |
---|---|
protected int |
addChild(DAGNode parent,
Object child,
boolean fire)
|
protected void |
addLink(Object parent,
Object child,
boolean fire)
|
void |
addTreeModelListener(TreeModelListener l)
|
void |
fireNodesChanged(TreeModelEvent e)
|
void |
fireNodesInserted(TreeModelEvent e)
|
void |
fireNodesRemoved(TreeModelEvent e)
|
void |
fireStructureChanged(TreeModelEvent e)
|
Object |
getChild(Object parent,
int index)
|
int |
getChildCount(Object parent)
|
protected Object[] |
getChildren(DAGNode parent)
|
int |
getIndexOfChild(Object parent,
Object child)
|
protected Object[][] |
getPaths(Object object)
Returns the set of all paths from the root |
Object |
getRoot()
|
boolean |
isLeaf(Object node)
|
protected abstract void |
nodeUnreachable(Object node)
Callback when a node becomes unreachable. |
protected abstract void |
populateNode(DAGNode parent)
This method should be overridden to find children if they are not previously known. |
protected void |
removeLink(Object parent,
Object child)
|
protected int |
removeNode(DAGNode node)
|
protected int |
removeNode(DAGNode node,
boolean fire)
|
void |
removeTreeModelListener(TreeModelListener l)
|
protected void |
setLink(Object parent,
Object child)
|
void |
setRoot(Object root)
|
void |
valueForPathChanged(TreePath path,
Object newValue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DAGTreeModel()
Method Detail |
---|
public Object getRoot()
getRoot
in interface TreeModel
TreeModel.getRoot()
public void setRoot(Object root)
protected Object[] getChildren(DAGNode parent)
protected abstract void populateNode(DAGNode parent)
parent
- protected void addLink(Object parent, Object child, boolean fire)
protected void removeLink(Object parent, Object child)
protected void setLink(Object parent, Object child)
protected int addChild(DAGNode parent, Object child, boolean fire)
protected int removeNode(DAGNode node)
protected int removeNode(DAGNode node, boolean fire)
protected abstract void nodeUnreachable(Object node)
node
- protected Object[][] getPaths(Object object)
child
-
public Object getChild(Object parent, int index)
getChild
in interface TreeModel
TreeModel.getChild(java.lang.Object, int)
public int getChildCount(Object parent)
getChildCount
in interface TreeModel
TreeModel.getChildCount(java.lang.Object)
public boolean isLeaf(Object node)
isLeaf
in interface TreeModel
TreeModel.isLeaf(java.lang.Object)
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
TreeModel.valueForPathChanged(javax.swing.tree.TreePath, java.lang.Object)
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
TreeModel.getIndexOfChild(java.lang.Object, java.lang.Object)
public void addTreeModelListener(TreeModelListener l)
addTreeModelListener
in interface TreeModel
TreeModel.addTreeModelListener(javax.swing.event.TreeModelListener)
public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener
in interface TreeModel
TreeModel.removeTreeModelListener(javax.swing.event.TreeModelListener)
public void fireNodesChanged(TreeModelEvent e)
TreeModelListener.treeNodesChanged(javax.swing.event.TreeModelEvent)
public void fireNodesInserted(TreeModelEvent e)
TreeModelListener.treeNodesInserted(javax.swing.event.TreeModelEvent)
public void fireNodesRemoved(TreeModelEvent e)
TreeModelListener.treeNodesRemoved(javax.swing.event.TreeModelEvent)
public void fireStructureChanged(TreeModelEvent e)
TreeModelListener.treeStructureChanged(javax.swing.event.TreeModelEvent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |