Package persistence

Class DBRecordTable

All Implemented Interfaces:
Serializable, TableModel

public class DBRecordTable extends AbstractTableModel
Implementation of DBRecordTable class, which converts an ArrayList of DBRecords to a TableModel.
See Also:
  • Constructor Details

    • DBRecordTable

      public DBRecordTable(ArrayList<DBRecord> records)
      Constructs a new TableModel from the passed records.
      Parameters:
      records - the ArrayList containing the records
  • Method Details

    • getRowCount

      public int getRowCount()
      Returns the count of rows in the table.
      Returns:
      the count of rows in the table
    • getColumnCount

      public int getColumnCount()
      Returns the count of columns in the table.
      Returns:
      the count of columns in the table
    • getValueAt

      public Object getValueAt(int r, int c)
      Returns a value from the DBRecords at the passed row and column indexes.
      Parameters:
      r - the row's index
      c - the col's index
      Returns:
      the value at the given indexes
    • getColumnName

      public String getColumnName(int i)
      Returns the table's column name at the passed column index.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      Parameters:
      i - the column's index
      Returns:
      the table's column name at the passed column index