org.owasp.webscarab.util.swing
Class ExtensibleTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.owasp.webscarab.util.swing.ExtensibleTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Direct Known Subclasses:
ConversationTableModel

public abstract class ExtensibleTableModel
extends javax.swing.table.AbstractTableModel

Author:
knoppix
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ExtensibleTableModel()
          Creates a new instance of ExtensibleTableModel
 
Method Summary
 void addColumn(ColumnDataModel column)
           
 java.lang.Class getColumnClass(int column)
          Returns the most specific superclass for all the cell values in the column.
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
          Returns the name of the column at columnIndex.
abstract  java.lang.Object getKeyAt(int row)
           
abstract  int getRowCount()
           
 java.lang.Object getValueAt(int row, int column)
           
protected  java.lang.Object getValueAt(java.lang.Object key, int column)
           
abstract  int indexOfKey(java.lang.Object key)
           
 void removeColumn(ColumnDataModel column)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensibleTableModel

public ExtensibleTableModel()
Creates a new instance of ExtensibleTableModel

Method Detail

getRowCount

public abstract int getRowCount()

getKeyAt

public abstract java.lang.Object getKeyAt(int row)

indexOfKey

public abstract int indexOfKey(java.lang.Object key)

addColumn

public void addColumn(ColumnDataModel column)

removeColumn

public void removeColumn(ColumnDataModel column)

getColumnCount

public int getColumnCount()

getColumnName

public java.lang.String getColumnName(int column)
Returns the name of the column at columnIndex. This is used to initialize the table's column header name. Note: this name does not need to be unique; two columns in a table can have the same name.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
column - the index of the column
Returns:
the name of the column

getColumnClass

public java.lang.Class getColumnClass(int column)
Returns the most specific superclass for all the cell values in the column. This is used by the JTable to set up a default renderer and editor for the column.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
column - the index of the column
Returns:
the common ancestor class of the object values in the model.

getValueAt

protected java.lang.Object getValueAt(java.lang.Object key,
                                      int column)

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)