org.tbee.swing.jdbc
Class RowSetTableModelForEdit
java.lang.Object
javax.swing.table.AbstractTableModel
org.tbee.swing.table.AbstractTableModel
org.tbee.swing.table.AbstractTableModelForEdit
org.tbee.swing.jdbc.RowSetTableModelForEdit
- All Implemented Interfaces:
- Serializable, EventListener, RowSetListener, TableModel, TableModelForEdit
public class RowSetTableModelForEdit
- extends AbstractTableModelForEdit
- implements TableModel, RowSetListener
Implements an TableModelForEdit on top of a JDBC RowSet
- Version:
- $Revision: 1.12 $
- 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 |
SOURCECODE_VERSION
public static final String SOURCECODE_VERSION
- Standard variable for determining version of a class file.
- See Also:
- Constant Field Values
RowSetTableModelForEdit
public RowSetTableModelForEdit(RowSet rowSet)
getRowSet
public RowSet getRowSet()
setRowSet
public void setRowSet(RowSet value)
getColumnLabel
public String getColumnLabel(int idx)
setColumnLabel
public void setColumnLabel(int idx,
String value)
getColumnTrim
public boolean getColumnTrim(int idx)
setColumnTrim
public void setColumnTrim(int idx,
boolean value)
isColumnEditable
public boolean isColumnEditable(int idx)
setColumnEditable
public void setColumnEditable(int idx,
boolean value)
isEditable
public boolean isEditable()
setEditable
public void setEditable(boolean value)
getAllowSetValue
public boolean getAllowSetValue()
setAllowSetValue
public void setAllowSetValue(boolean value)
getDataIsValid
public boolean getDataIsValid()
setDataIsValid
public void setDataIsValid(boolean value)
getInitialValue
public Object getInitialValue(int colIdx)
- It is required for the RowSet to have all not nullable fields initialized with correct values
acceptChanges
public void acceptChanges()
throws SQLException
- Only valid for CachedRowSet: performs a acceptChanges and tries to give some sensible errors.
- 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 colIdx)
- Specified by:
getColumnName in interface TableModel- Overrides:
getColumnName in class AbstractTableModel
getColumnClass
public Class getColumnClass(int colIdx)
- Specified by:
getColumnClass in interface TableModel- Overrides:
getColumnClass in class AbstractTableModel
isCellEditable
public boolean isCellEditable(int rowIndex,
int colIdx)
- Specified by:
isCellEditable in interface TableModel- Overrides:
isCellEditable in class AbstractTableModel
getValueAt
public Object getValueAt(int rowIndex,
int columnIndex)
- Specified by:
getValueAt in interface TableModel
setValueAt
public void setValueAt(Object value,
int rowIndex,
int columnIndex)
- Specified by:
setValueAt in interface TableModel- Overrides:
setValueAt in class AbstractTableModel
addRowAt
public int addRowAt(int rowIdx)
- Specified by:
addRowAt in interface TableModelForEdit
deleteRowAt
public void deleteRowAt(int rowIdx)
- Specified by:
deleteRowAt in interface TableModelForEdit
getErrorMessageAt
public String getErrorMessageAt(int arg0,
int arg1)
- Specified by:
getErrorMessageAt in interface TableModelForEdit- Overrides:
getErrorMessageAt in class AbstractTableModelForEdit
getWarnMessageAt
public String getWarnMessageAt(int arg0,
int arg1)
- Specified by:
getWarnMessageAt in interface TableModelForEdit- Overrides:
getWarnMessageAt in class AbstractTableModelForEdit
rowSetChanged
public void rowSetChanged(RowSetEvent arg0)
- Specified by:
rowSetChanged in interface RowSetListener
rowChanged
public void rowChanged(RowSetEvent arg0)
- Specified by:
rowChanged in interface RowSetListener
cursorMoved
public void cursorMoved(RowSetEvent arg0)
- Specified by:
cursorMoved in interface RowSetListener
Copyright © 2012 KnowledgePlaza. All Rights Reserved.