Class 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 Details

    • prototype

      protected Object prototype
    • rowHeaderPrototype

      protected Object rowHeaderPrototype
  • Constructor Details

    • ExactTableModel

      public ExactTableModel()
  • Method Details

    • getValueAt

      public final Object getValueAt(int rowIndex, int columnIndex)
      Specified by:
      getValueAt in interface TableModel
    • getPrototype

      public Object getPrototype(int columnIndex)
      Specified by:
      getPrototype in interface PrototypedTableModel
      Returns:
      a prototypical data item for column i. This is typically a maximum-length item used for autmatically sizing columns.
    • getValueAtImpl

      protected abstract Object getValueAtImpl(int rowIndex, int columnIndex)
      Returns:
      the object at (rowIndex, columnIndex)
    • getRowName

      protected abstract Object getRowName(int rowIndex)
      Returns:
      the header for row rowIndex
    • clear

      public void clear(int row, int col)