prefuse.util.ui
Class PrefuseTableModel

java.lang.Object
  extended by prefuse.util.ui.PrefuseTableModel
All Implemented Interfaces:
java.util.EventListener, javax.swing.table.TableModel, TableListener

public class PrefuseTableModel
extends java.lang.Object
implements javax.swing.table.TableModel, TableListener

TableModel implementation that serves as an adapter between a prefuse Table instance and a JTable component.


Constructor Summary
PrefuseTableModel(Table table)
          Creates a new PrefuseTableModel
 
Method Summary
 void addTableModelListener(javax.swing.event.TableModelListener l)
           
 java.lang.Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int columnIndex)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void removeTableModelListener(javax.swing.event.TableModelListener l)
           
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
           
 void tableChanged(Table t, int start, int end, int col, int type)
          Notification that a table has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefuseTableModel

public PrefuseTableModel(Table table)
Creates a new PrefuseTableModel

Parameters:
table - the underlying prefuse table
Method Detail

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface javax.swing.table.TableModel
See Also:
TableModel.getColumnCount()

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel
See Also:
TableModel.getRowCount()

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
See Also:
TableModel.isCellEditable(int, int)

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
See Also:
TableModel.getColumnClass(int)

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Specified by:
getValueAt in interface javax.swing.table.TableModel
See Also:
TableModel.getValueAt(int, int)

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface javax.swing.table.TableModel
See Also:
TableModel.setValueAt(java.lang.Object, int, int)

getColumnName

public java.lang.String getColumnName(int columnIndex)
Specified by:
getColumnName in interface javax.swing.table.TableModel
See Also:
TableModel.getColumnName(int)

addTableModelListener

public void addTableModelListener(javax.swing.event.TableModelListener l)
Specified by:
addTableModelListener in interface javax.swing.table.TableModel
See Also:
TableModel.addTableModelListener(javax.swing.event.TableModelListener)

removeTableModelListener

public void removeTableModelListener(javax.swing.event.TableModelListener l)
Specified by:
removeTableModelListener in interface javax.swing.table.TableModel
See Also:
TableModel.removeTableModelListener(javax.swing.event.TableModelListener)

tableChanged

public void tableChanged(Table t,
                         int start,
                         int end,
                         int col,
                         int type)
Description copied from interface: TableListener
Notification that a table has changed.

Specified by:
tableChanged in interface TableListener
Parameters:
t - the table 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:
TableListener.tableChanged(prefuse.data.Table, int, int, int, int)


Copyright © 2007 Regents of the University of California