Class ExactTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
table.ExactTableModel
- All Implemented Interfaces:
Serializable, TableModel, ModelHandlesRowHeader, PrototypedTableModel
- Direct Known Subclasses:
CacheSectionPanel.ClassSwitchTableModel, ClassSwitchSectionPanel.ClassSwitchTableModel, NumberOfCustomersPanel.PopulationVectorTableModel, PAResultsWindow.ValuesTableModel, SimulationPanel.PreloadTableModel
public abstract class ExactTableModel
extends AbstractTableModel
implements ModelHandlesRowHeader, PrototypedTableModel
An utility abstract class implementing a framework for RowHeader-aware TableModels with identical column prototypes. Subclasses must
fill in
prototype and rowHeaderPrototype and implement getRowName() and getValueAtImpl().
The latter two need not be row-header aware. For tables with different column types you must override getPrototype to get a correct behavior- See Also:
-
Field Summary
FieldsFields inherited from class AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear(int row, int col) getPrototype(int columnIndex) protected abstract ObjectgetRowName(int rowIndex) final ObjectgetValueAt(int rowIndex, int columnIndex) protected abstract ObjectgetValueAtImpl(int rowIndex, int columnIndex) Methods inherited from class AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TableModel
getColumnCount, getRowCount
-
Field Details
-
prototype
-
rowHeaderPrototype
-
-
Constructor Details
-
ExactTableModel
public ExactTableModel()
-
-
Method Details
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel
-
getPrototype
- Specified by:
getPrototypein interfacePrototypedTableModel- Returns:
- a prototypical data item for column i. This is typically a maximum-length item used for autmatically sizing columns.
-
getValueAtImpl
- Returns:
- the object at (rowIndex, columnIndex)
-
getRowName
- Returns:
- the header for row
rowIndex
-
clear
public void clear(int row, int col)
-