Version: 1.1.1

org.biomoby.service.dashboard.treetable
Class AbstractTreeTableModel

java.lang.Object
  extended by org.biomoby.service.dashboard.treetable.AbstractTreeTableModel
All Implemented Interfaces:
TreeModel, TreeTableModel
Direct Known Subclasses:
DataTypeModel

public abstract class AbstractTreeTableModel
extends Object
implements TreeTableModel

An abstract implementation of the TreeTableModel interface, handling the list of listeners.

Inspired by http://java.sun.com/products/jfc/tsc/articles/treetable1/index.html.

Version:
$Id: AbstractTreeTableModel.java,v 1.2 2006/02/04 09:24:42 senger Exp $
Author:
Philip Milne, Martin Senger

Constructor Summary
AbstractTreeTableModel(Object root)
           
 
Method Summary
 void addTreeModelListener(TreeModelListener l)
           
 Class getColumnClass(int column)
          Returns the type for column number column.
 int getIndexOfChild(Object parent, Object child)
           
 Object getRoot()
           
 boolean isCellEditable(Object node, int column)
          By default, make the column with the Tree in it the only editable one.
 boolean isLeaf(Object node)
           
 void removeTreeModelListener(TreeModelListener l)
           
 void setValueAt(Object aValue, Object node, int column)
          Sets the value for node node, at column number column.
 void valueForPathChanged(TreePath path, Object newValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.biomoby.service.dashboard.treetable.TreeTableModel
getColumnCount, getColumnName, getValueAt
 
Methods inherited from interface javax.swing.tree.TreeModel
getChild, getChildCount
 

Constructor Detail

AbstractTreeTableModel

public AbstractTreeTableModel(Object root)
Method Detail

getRoot

public Object getRoot()
Specified by:
getRoot in interface TreeModel

isLeaf

public boolean isLeaf(Object node)
Specified by:
isLeaf in interface TreeModel

valueForPathChanged

public void valueForPathChanged(TreePath path,
                                Object newValue)
Specified by:
valueForPathChanged in interface TreeModel

getIndexOfChild

public int getIndexOfChild(Object parent,
                           Object child)
Specified by:
getIndexOfChild in interface TreeModel

addTreeModelListener

public void addTreeModelListener(TreeModelListener l)
Specified by:
addTreeModelListener in interface TreeModel

removeTreeModelListener

public void removeTreeModelListener(TreeModelListener l)
Specified by:
removeTreeModelListener in interface TreeModel

getColumnClass

public Class getColumnClass(int column)
Description copied from interface: TreeTableModel
Returns the type for column number column.

Specified by:
getColumnClass in interface TreeTableModel

isCellEditable

public boolean isCellEditable(Object node,
                              int column)
By default, make the column with the Tree in it the only editable one. Making this column editable causes the JTable to forward mouse and keyboard events in the Tree column to the underlying JTree.

Specified by:
isCellEditable in interface TreeTableModel

setValueAt

public void setValueAt(Object aValue,
                       Object node,
                       int column)
Description copied from interface: TreeTableModel
Sets the value for node node, at column number column.

Specified by:
setValueAt in interface TreeTableModel

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010