com.antelmann.sql
Class RowItemTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.antelmann.sql.RowItemTableModel
- All Implemented Interfaces:
- EditableComponent, Serializable, TableModel
public class RowItemTableModel
- extends AbstractTableModel
- implements EditableComponent
the implementation requires that the columns are properly set on all
RowItem objects used within the model.
- Author:
- Holger Antelmann
- See Also:
- Serialized Form
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, 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 |
RowItemTableModel
public RowItemTableModel(List<RowItem> list)
refresh
public void refresh(List<RowItem> list)
setEditable
public void setEditable(boolean flag)
- Specified by:
setEditable in interface EditableComponent
isEditable
public boolean isEditable()
- Specified by:
isEditable in interface EditableComponent
getRowAt
public RowItem getRowAt(int row)
getListView
public List<RowItem> getListView()
- creates and returns an unmodifiable view of the embedded list
getDirtyRows
public Collection<RowItem> getDirtyRows()
- creates a list of RowItems that are marked dirty
saveDirtyRows
public void saveDirtyRows(Connection con)
throws SQLException
- Throws:
SQLException
getRowCount
public int getRowCount()
- Specified by:
getRowCount in interface TableModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount in interface TableModel
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnName in interface TableModel- Overrides:
getColumnName in class AbstractTableModel
getColumnClass
public Class<?> getColumnClass(int column)
- Specified by:
getColumnClass in interface TableModel- Overrides:
getColumnClass in class AbstractTableModel
getValueAt
public Object getValueAt(int row,
int column)
- Specified by:
getValueAt in interface TableModel
isCellEditable
public boolean isCellEditable(int row,
int column)
- Specified by:
isCellEditable in interface TableModel- Overrides:
isCellEditable in class AbstractTableModel
setValueAt
public void setValueAt(Object value,
int row,
int column)
- Specified by:
setValueAt in interface TableModel- Overrides:
setValueAt in class AbstractTableModel
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads