Cytoscape 3.0.1 API

org.cytoscape.util.swing
Class TreeTableModelAdapter

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.cytoscape.util.swing.TreeTableModelAdapter
All Implemented Interfaces:
Serializable, TableModel

public final class TreeTableModelAdapter
extends AbstractTableModel

This is a wrapper class takes a TreeTableModel and implements the table model interface. The implementation is trivial, with all of the event dispatching support provided by the superclass: the AbstractTableModel.

Version:
1.2 10/27/98
Author:
Philip Milne, Scott Violet
See Also:
Serialized Form
Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree)
          Creates a new TreeTableModelAdapter object.
 
Method Summary
protected  void delayedFireTableDataChanged()
          Invokes fireTableDataChanged after all the pending events have been processed.
 Class getColumnClass(int column)
          Returns the class of the column at the given column number.
 int getColumnCount()
          Returns the number of columns in the TreeTabelModel.
 String getColumnName(int column)
          Returns the column name at the given column number.
 int getRowCount()
          Returns the number of rows in the JTree.
 Object getValueAt(int row, int column)
          Returns the value at the given row and column.
 boolean isCellEditable(int row, int column)
          Returns whether the cell at the given location is editable.
 void setValueAt(Object value, int row, int column)
          Sets the value at the given row and column..
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeTableModelAdapter

public TreeTableModelAdapter(TreeTableModel treeTableModel,
                             JTree tree)
Creates a new TreeTableModelAdapter object.

Parameters:
treeTableModel - The tree table model.
tree - The tree itself.
Method Detail

getColumnCount

public int getColumnCount()
Returns the number of columns in the TreeTabelModel.

Returns:
the int number of columns in the TreeTabelModel.

getColumnName

public String getColumnName(int column)
Returns the column name at the given column number.

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel
Parameters:
column - The column number.
Returns:
The name of the column,.

getColumnClass

public Class getColumnClass(int column)
Returns the class of the column at the given column number.

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel
Parameters:
column - The column number.
Returns:
The class of the column.

getRowCount

public int getRowCount()
Returns the number of rows in the JTree.

Returns:
The int number of rows in the JTree.

getValueAt

public Object getValueAt(int row,
                         int column)
Returns the value at the given row and column.

Parameters:
row - The row number.
column - The column number.
Returns:
The value at the given location.

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Returns whether the cell at the given location is editable.

Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel
Parameters:
row - The row number.
column - The column number.
Returns:
True if the cell is editable, false otherwise.

setValueAt

public void setValueAt(Object value,
                       int row,
                       int column)
Sets the value at the given row and column..

Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel
Parameters:
value - The value to set to.
row - The row number.
column - The column number.

delayedFireTableDataChanged

protected void delayedFireTableDataChanged()
Invokes fireTableDataChanged after all the pending events have been processed. SwingUtilities.invokeLater is used to handle this.


Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.