edu.iastate.metnet.model
Class CategoryTreeModel

java.lang.Object
  extended by edu.iastate.metnet.model.TreeModelSupport
      extended by edu.iastate.metnet.model.AbstractTreeModel
          extended by edu.iastate.metnet.model.CategoryTreeModel
All Implemented Interfaces:
javax.swing.tree.TreeModel

public class CategoryTreeModel
extends AbstractTreeModel

tree model for pathway category

Author:
Jie Li

Field Summary
(package private) static org.apache.log4j.Logger logger
          log4j facility
 
Constructor Summary
CategoryTreeModel(org._3pq.jgrapht.DirectedGraph classNet)
          default constrcutor
 
Method Summary
 java.lang.Object getChild(java.lang.Object parent, int index)
          return the child node at the index position.
 int getChildCount(java.lang.Object parent)
          get the size of the children
 org._3pq.jgrapht.DirectedGraph getClassNet()
           
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
          get the index of one child
 java.lang.Object getRoot()
          find the root
 boolean isLeaf(java.lang.Object node)
          if it is a leaf
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
           
 
Methods inherited from class edu.iastate.metnet.model.TreeModelSupport
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, removeTreeModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, removeTreeModelListener
 

Field Detail

logger

static org.apache.log4j.Logger logger
log4j facility

Constructor Detail

CategoryTreeModel

public CategoryTreeModel(org._3pq.jgrapht.DirectedGraph classNet)
default constrcutor

Parameters:
classNet - the class net
Method Detail

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
return the child node at the index position.


getChildCount

public int getChildCount(java.lang.Object parent)
get the size of the children


getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
get the index of one child


getRoot

public java.lang.Object getRoot()
find the root


isLeaf

public boolean isLeaf(java.lang.Object node)
if it is a leaf


valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)

getClassNet

public org._3pq.jgrapht.DirectedGraph getClassNet()
Returns:
the classNet