org.norvelle.textcite.gui.adapter
Class TableModelAdapter

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.norvelle.textcite.gui.adapter.TableModelAdapter
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Direct Known Subclasses:
CitationTableModelAdapter

public class TableModelAdapter
extends javax.swing.table.AbstractTableModel

TableModelAdapter: Provides a wrapper for a TableModelAdaptee, so that data structures can be kept entirely separate from all GUI elements. This Adapter passes messages on to the adaptee, and handles a few GUI issues, like managing the currently selected item, etc.

Author:
Erik Norvelle
See Also:
Serialized Form

Field Summary
protected  TableModelAdaptee adaptee
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TableModelAdapter(TableModelAdaptee adaptee)
           
 
Method Summary
 void destroy()
           
 int getColumnCount()
           
 int getRowCount()
          Returns the number of rows *after* applying the current filter.
 java.lang.Object getValueAt(int row, int column)
          Given a numeric row and column value, return the value that corresponds to the location in the table model
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

adaptee

protected TableModelAdaptee adaptee
Constructor Detail

TableModelAdapter

public TableModelAdapter(TableModelAdaptee adaptee)
Method Detail

destroy

public void destroy()

getRowCount

public int getRowCount()
Returns the number of rows *after* applying the current filter. If you want *all* the Citations in the list, use getSize();


getColumnCount

public int getColumnCount()

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Given a numeric row and column value, return the value that corresponds to the location in the table model

Parameters:
row - The row of the requested object
column - The column number of the data field requested from the object.