Class DbSmallTableModel

All Implemented Interfaces:
RowObjectTableModel<DBRecord>, SelectionStorage<DBRecord>, SortedTableModel, Serializable, TableModel

public class DbSmallTableModel extends AbstractSortedTableModel<DBRecord>
See Also:
  • Constructor Details

    • DbSmallTableModel

      public DbSmallTableModel(Table table)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: RowObjectTableModel
      Returns the name of this model
      Returns:
      the name of this model
    • getColumnClass

      public Class<?> getColumnClass(int columnIndex)
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
    • getColumnCount

      public int getColumnCount()
    • getColumnName

      public String getColumnName(int columnIndex)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • getRowCount

      public int getRowCount()
      Specified by:
      getRowCount in interface TableModel
      Overrides:
      getRowCount in class AbstractGTableModel<DBRecord>
    • isCellEditable

      public boolean isCellEditable(int rowIndex, int columnIndex)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
    • getColumnValueForRow

      public Object getColumnValueForRow(DBRecord rec, int columnIndex)
      Description copied from interface: RowObjectTableModel
      Implementors are expected to return a value at the given column index for the specified row object. This is essentially a more specific version of the TableModel.getValueAt(int, int) that allows this class's comparator objects to work.
      Parameters:
      rec - The object that represents a given row.
      columnIndex - The column index for which a value is requested.
      Returns:
      a value at the given column index for the specified row object.
    • getModelData

      public List<DBRecord> getModelData()
      Description copied from interface: RowObjectTableModel
      Implementors should return the current data of the model. For models that support filtering, this will be the filtered version of the data. Furthermore, the data should be the underlying data and not a copy, as this method will potentially sort the given data.

      For those subclasses using an array, you may use the Arrays class to create a list backed by the array (Arrays.asList(Object...)).

      Returns:
      the model data.
    • isSortable

      public boolean isSortable(int columnIndex)
      Description copied from interface: SortedTableModel
      Returns true if the specified columnIndex is sortable.
      Parameters:
      columnIndex - the column index
      Returns:
      true if the specified columnIndex is sortable