com.jidesoft.database
Class CrudTableModelAdapter
java.lang.Object
javax.swing.table.AbstractTableModel
com.jidesoft.grid.TableModelWrapperImpl
com.jidesoft.database.CrudTableModelAdapter
- All Implemented Interfaces:
- CrudRowOperations, CrudTableModel, ColumnIdentifierTableModel, ContextSensitiveTableModel, EditorStyleTableModel, IndexChangeEventGenerator, MultiTableModel, NavigableModel, SpanModel, StyleModel, TableModelWrapper, Serializable, EventListener, TableModelListener, TableModel
public class CrudTableModelAdapter
- extends TableModelWrapperImpl
- implements CrudTableModel
An adapter class for the interface CrudTableModel
for easy implementation.
- See Also:
- Serialized Form
Method Summary |
void |
deleteRow(int rowIndex)
Delete data of a designated row. |
void |
insertRow(Record record)
Add a row to the table model. |
Record |
readRow(int rowIndex)
Read data of a designated row. |
void |
updateRow(int rowIndex,
Record record)
Update data of a designated row with data. |
Methods inherited from class com.jidesoft.grid.TableModelWrapperImpl |
addIndexChangeListener, createCompoundTableModelEvent, fireIndexChanged, fireIndexChanging, fireTableCellsUpdated, fireTableChanged, getActualModel, getCellClassAt, getCellSpanAt, getCellStyleAt, getColumnClass, getColumnCount, getColumnIdentifier, getColumnName, getColumnType, getConverterContextAt, getEditorContextAt, getEditorStyleAt, getIndexChangeListeners, getRowCount, getTableIndex, getValueAt, isCellEditable, isCellSpanOn, isCellStyleOn, isNavigableAt, isNavigationOn, removeIndexChangeListener, setValueAt, tableCellsUpdated, tableChanged, tableDataChanged, tableDataChanged, tableRowsDeleted, tableRowsInserted, tableRowsUpdated, tableStructureChanged |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrudTableModelAdapter
public CrudTableModelAdapter(TableModel tableModel)
CrudTableModelAdapter
public CrudTableModelAdapter(TableModel tableModel,
CrudRowOperations crudOperations)
insertRow
public void insertRow(Record record)
throws Exception
- Description copied from interface:
CrudRowOperations
- Add a row to the table model.
- Specified by:
insertRow
in interface CrudRowOperations
- Parameters:
record
- the data structure
- Throws:
Exception
- if encouting any database update error
readRow
public Record readRow(int rowIndex)
throws Exception
- Description copied from interface:
CrudRowOperations
- Read data of a designated row.
- Specified by:
readRow
in interface CrudRowOperations
- Parameters:
rowIndex
- the row index
- Returns:
- the data structure
- Throws:
Exception
- if encouting any database read error
updateRow
public void updateRow(int rowIndex,
Record record)
throws Exception
- Description copied from interface:
CrudRowOperations
- Update data of a designated row with data.
- Specified by:
updateRow
in interface CrudRowOperations
- Parameters:
rowIndex
- the row indexrecord
- the data array
- Throws:
Exception
- if encouting any database update error
deleteRow
public void deleteRow(int rowIndex)
throws Exception
- Description copied from interface:
CrudRowOperations
- Delete data of a designated row.
- Specified by:
deleteRow
in interface CrudRowOperations
- Parameters:
rowIndex
- the row index
- Throws:
Exception
- if encouting any database update error.