Holger's
Java API

com.antelmann.sql
Class JDBCRowModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.antelmann.sql.JDBCTableModel
          extended by com.antelmann.sql.JDBCRowModel
All Implemented Interfaces:
EditableComponent, Refreshable, Closeable, Serializable, TableModel

public class JDBCRowModel
extends JDBCTableModel

JDBCRowModel allows to edit tables where the row is updated only after an explicit method call. This way, the user can edit separate fields in a row before the underlying row is updated.

Since:
10/24/2002
Author:
Holger Antelmann
See Also:
JDBCTableEditor, Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
JDBCRowModel(Connection con, String tableName)
           
 
Method Summary
 Object getValueAt(int row, int column)
           
 void setValueAt(Object value, int row, int column)
           
 void updateRow()
           
 
Methods inherited from class com.antelmann.sql.JDBCTableModel
close, finalize, getColumnClass, getColumnCount, getColumnName, getColumns, getConnection, getParentComponent, getResultSet, getRowCount, getRowItem, getRowItem, getTableName, isCellEditable, isEditable, isInsertMode, isRefreshOnSQLException, refresh, refreshContent, setColumnNames, setEditable, setInsertMode, setParentComponent, setRefreshOnSQLException
 
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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCRowModel

public JDBCRowModel(Connection con,
                    String tableName)
             throws SQLException
Throws:
SQLException
Method Detail

updateRow

public void updateRow()
               throws SQLException
Throws:
SQLException

getValueAt

public Object getValueAt(int row,
                         int column)
Specified by:
getValueAt in interface TableModel
Overrides:
getValueAt in class JDBCTableModel

setValueAt

public void setValueAt(Object value,
                       int row,
                       int column)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class JDBCTableModel


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads