Class MetaSchemeTableModelImpl

A TableModel to hold org.kaiwitte.workbench.data.MetaRecords.

Synopsis

 public final class MetaSchemeTableModelImpl extends AbstractTableModel
    implements MetaSchemeTableModel {
  public MetaSchemeTableModelImpl(MetaScheme scheme);
  public void addRecord(org.kaiwitte.workbench.data.MetaRecord[] r);
  public String getColumnName(int column);
  public Class getColumnClass(int column);
  public void clear();
  public MetaScheme getScheme();
  public MetaRecord getRecord(int row);
  public void delete(int row);
  public void delete(MetaRecord record);
  public void update(MetaRecord record,
                     int index);

  public int getRowCount();
  public int getColumnCount();
  public Object getValueAt(int rowIndex,
                           int columnIndex);

}

Methods inherited from javax.swing.table.AbstractTableModel: addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt

Methods inherited from java.lang.Object: clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait

Inheritance Path. java.lang.Object-> javax.swing.table.AbstractTableModel-> org.kaiwitte.workbench.ui.model.MetaSchemeTableModelImpl

MetaSchemeTableModelImpl(MetaScheme)

Synopsis: public MetaSchemeTableModelImpl(org.kaiwitte.workbench.data.MetaS\
cheme scheme);

Parameters

scheme

the MetaScheme that defines the structure of this TableModel

Exceptions

NullPointerException

iff scheme == null

Creates a new instance.

addRecord(MetaRecord[])

Synopsis: public void addRecord(org.kaiwitte.workbench.data.MetaRecord[] r)\
;

Specified by: Method addRecord in interface MetaSchemeTableModel

Parameters

r

the new record

Adds a record as a table row.

clear()

Synopsis: public void clear();

Specified by: Method clear in interface MetaSchemeTableModel

Removes all entries.

delete(int)

Synopsis: public void delete(int row);

Specified by: Method delete in interface MetaSchemeTableModel

Parameters

row

row

the row number, 0-based

Exceptions

IndexOutOfBoundsException

iff row < 0 or row > the maximum index

Deletes the MetaRecord in the specified row.

delete(MetaRecord)

Synopsis: public void delete(org.kaiwitte.workbench.data.MetaRecord record)\
;

Specified by: Method delete in interface MetaSchemeTableModel

Parameters

record

a MetaRecord to be deleted

Deletes the specified MetaRecord.

getRecord(int)

Synopsis: public MetaRecord getRecord(int row);

Specified by: Method getRecord in interface MetaSchemeTableModel

Parameters

row

the row number, 0-based

return

the MetaRecord in the specified row

Exceptions

IndexOutOfBoundsException

iff row < 0 or row > the maximum index

Returns the MetaRecord in the specified row.

getScheme()

Synopsis: public MetaScheme getScheme();

Specified by: Method getScheme in interface MetaSchemeTableModel

Parameters

return

the scheme

Returns the scheme that defines this table model's structure.

update(MetaRecord, int)

Synopsis: public void update(org.kaiwitte.workbench.data.MetaRecord record,

                             int index);

Specified by: Method update in interface MetaSchemeTableModel

Parameters

record

a MetaRecord to be updated

index

the index of the record

Exceptions

IndexOutOfBoundsException

iff index < 0 or index > the maximum index

Updates the MetaRecord at the specified index.