prefuse.util.ui
Class JPrefuseTree.PrefuseTreeModel

java.lang.Object
  extended by prefuse.util.ui.JPrefuseTree.PrefuseTreeModel
All Implemented Interfaces:
java.util.EventListener, javax.swing.tree.TreeModel, GraphListener
Enclosing class:
JPrefuseTree

public class JPrefuseTree.PrefuseTreeModel
extends java.lang.Object
implements javax.swing.tree.TreeModel, GraphListener

TreeModel implementation that provides an adapter to a backing prefuse Tree instance.


Constructor Summary
JPrefuseTree.PrefuseTreeModel()
           
 
Method Summary
 void addTreeModelListener(javax.swing.event.TreeModelListener tml)
           
 java.lang.Object getChild(java.lang.Object node, int idx)
           
 int getChildCount(java.lang.Object node)
           
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
           
 java.lang.Object getRoot()
           
 void graphChanged(Graph g, java.lang.String table, int start, int end, int col, int type)
          Notification that a graph has changed.
 boolean isLeaf(java.lang.Object node)
           
 void removeTreeModelListener(javax.swing.event.TreeModelListener tml)
           
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPrefuseTree.PrefuseTreeModel

public JPrefuseTree.PrefuseTreeModel()
Method Detail

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel
See Also:
TreeModel.getRoot()

getChild

public java.lang.Object getChild(java.lang.Object node,
                                 int idx)
Specified by:
getChild in interface javax.swing.tree.TreeModel
See Also:
TreeModel.getChild(java.lang.Object, int)

getChildCount

public int getChildCount(java.lang.Object node)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel
See Also:
TreeModel.getChildCount(java.lang.Object)

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel
See Also:
TreeModel.isLeaf(java.lang.Object)

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel
See Also:
TreeModel.valueForPathChanged(javax.swing.tree.TreePath, java.lang.Object)

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel
See Also:
TreeModel.getIndexOfChild(java.lang.Object, java.lang.Object)

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener tml)
Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel
See Also:
TreeModel.addTreeModelListener(javax.swing.event.TreeModelListener)

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener tml)
Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel
See Also:
TreeModel.removeTreeModelListener(javax.swing.event.TreeModelListener)

graphChanged

public void graphChanged(Graph g,
                         java.lang.String table,
                         int start,
                         int end,
                         int col,
                         int type)
Description copied from interface: GraphListener
Notification that a graph has changed.

Specified by:
graphChanged in interface GraphListener
Parameters:
g - the graph that has changed
table - the particular table within the graph that has changed
start - the starting row index of the changed table region
end - the ending row index of the changed table region
col - the column that has changed, or EventConstants.ALL_COLUMNS if the operation affects all columns
type - the type of modification, one of EventConstants.INSERT, EventConstants.DELETE, or EventConstants.UPDATE.
See Also:
GraphListener.graphChanged(prefuse.data.Graph, java.lang.String, int, int, int, int)


Copyright © 2007 Regents of the University of California