org.kaiwitte.workbench.ui.model
Interface MetaSchemeTableModel

All Superinterfaces:
javax.swing.table.TableModel
All Known Implementing Classes:
MetaSchemeTableModelImpl

public interface MetaSchemeTableModel
extends javax.swing.table.TableModel

A TableModel to hold MetaRecords.


Method Summary
 void addRecord(MetaRecord... r)
          Adds a record as a table row.
 void clear()
          Removes all entries.
 void delete(int row)
          Deletes the MetaRecord in the specified row.
 void delete(MetaRecord record)
          Deletes the specified MetaRecord.
 MetaRecord getRecord(int row)
          Returns the MetaRecord in the specified row.
 MetaScheme getScheme()
          Returns the scheme that defines this table model's structure.
 void update(MetaRecord record, int index)
          Updates the MetaRecord at the specified index.
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Method Detail

addRecord

void addRecord(MetaRecord... r)
Adds a record as a table row.

Parameters:
r - the new record

clear

void clear()
Removes all entries.


getScheme

MetaScheme getScheme()
Returns the scheme that defines this table model's structure.

Returns:
the scheme

getRecord

MetaRecord getRecord(int row)
Returns the MetaRecord in the specified row.

Parameters:
row - the row number, 0-based
Returns:
the MetaRecord in the specified row
Throws:
java.lang.IndexOutOfBoundsException - iff row < 0 or row > the maximum index

delete

void delete(int row)
Deletes the MetaRecord in the specified row.

Parameters:
row - the row number, 0-based
Throws:
java.lang.IndexOutOfBoundsException - iff row < 0 or row > the maximum index

delete

void delete(MetaRecord record)
Deletes the specified MetaRecord.

Parameters:
record - a MetaRecord to be deleted

update

void update(MetaRecord record,
            int index)
Updates the MetaRecord at the specified index.

Parameters:
record - a MetaRecord to be updated
index - the index of the record
Throws:
java.lang.IndexOutOfBoundsException - iff index < 0 or index > the maximum index