|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.kaiwitte.workbench.ui.model.MetaSchemeTableModelImpl
public final class MetaSchemeTableModelImpl
A TableModel
to hold MetaRecord
s.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
MetaSchemeTableModelImpl(MetaScheme scheme)
Creates a new instance. |
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 . |
java.lang.Class<?> |
getColumnClass(int column)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int column)
|
MetaRecord |
getRecord(int row)
Returns the MetaRecord in the specified row. |
int |
getRowCount()
|
MetaScheme |
getScheme()
Returns the scheme that defines this table model's structure. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
void |
update(MetaRecord record,
int index)
Updates the MetaRecord at the specified index. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, isCellEditable, removeTableModelListener, setValueAt |
Constructor Detail |
---|
public MetaSchemeTableModelImpl(MetaScheme scheme)
scheme
- the MetaScheme
that defines the
structure of this TableModel
java.lang.NullPointerException
- iff scheme == null
Method Detail |
---|
public void addRecord(MetaRecord... r)
addRecord
in interface MetaSchemeTableModel
r
- the new recordpublic java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
public java.lang.Class<?> getColumnClass(int column)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
public void clear()
clear
in interface MetaSchemeTableModel
public MetaScheme getScheme()
getScheme
in interface MetaSchemeTableModel
public MetaRecord getRecord(int row)
MetaRecord
in the specified row.
getRecord
in interface MetaSchemeTableModel
row
- the row number, 0-based
MetaRecord
in the specified row
java.lang.IndexOutOfBoundsException
- iff row < 0
or row >
the maximum indexpublic void delete(int row)
MetaRecord
in the specified row.
delete
in interface MetaSchemeTableModel
row
- row
- the row number, 0-based
java.lang.IndexOutOfBoundsException
- iff row < 0
or row >
the maximum indexpublic void delete(MetaRecord record)
MetaRecord
.
delete
in interface MetaSchemeTableModel
record
- a MetaRecord to be deleted
public void update(MetaRecord record, int index)
MetaRecord
at the specified index.
update
in interface MetaSchemeTableModel
record
- a MetaRecord to be updated
index
- the index of the record
java.lang.IndexOutOfBoundsException
- iff index < 0
or index >
the maximum indexpublic int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |