|
Diamond Control Suite 3.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
diamondedge.swing.grid.AbstractGridRowModel
diamondedge.swing.grid.ResultSetTableModel
public class ResultSetTableModel
You do not want to make the RowHeaderVisible or set individual RowHeights or turn sorting on when there is a large amount of data.
This requires drivers which support JDBC 2.0 scrollable cursors. If scrollable cursors are not available then you can load the data into the Grid using DsGrid.loadResultSet()
DsGrid.loadResultSet(java.sql.ResultSet, boolean),
Serialized Form| Field Summary |
|---|
| Fields inherited from class diamondedge.swing.grid.AbstractGridRowModel |
|---|
curRow |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
ResultSetTableModel(Connection con,
String sql)
|
|
ResultSetTableModel(ResultSet rs)
|
|
| Method Summary | |
|---|---|
void |
cancelChanges()
Cancels any edits that have been made to the current row. |
void |
finalize()
|
int |
getCacheSize()
Returns the number of column values that will be cached. |
int |
getColumn(String colName)
|
int |
getColumnCount()
Returns the number of columns in this data table. |
String |
getColumnName(int column)
Returns the column name. |
ResultSet |
getResultSet()
|
int |
getRowCount()
Returns the number of rows in this data table. |
Object |
getValueAt(int row,
int column)
|
boolean |
isCellEditable(int row,
int column)
Returns true if the cell at row and column is editable. |
boolean |
isChanged()
Returns true if any edits or changes have been made to the current row. |
boolean |
isEditable()
Returns whether any cells can be edited by the user. |
void |
saveChanges()
Save any edits or changes that have been made to the current row. |
void |
setCacheSize(int cacheSize)
Sets the number of column values that will be cached. |
void |
setChanged(boolean markChanged)
If set to true then the current row will be marked to be saved. |
void |
setEditable(boolean editable)
Returns whether the user can edit any cell. |
void |
setResultSet(Connection con,
String sql)
A ResultSet will be created based on the given connection and SQL query. |
void |
setResultSet(ResultSet rs)
Sets the ResultSet to be used to retrieve the data from. |
void |
setRowPosition(int rowNumber)
Sets the current record number for the database cursor. |
void |
setValueAt(Object val,
int row,
int column)
|
void |
updateRow()
|
| Methods inherited from class diamondedge.swing.grid.AbstractGridRowModel |
|---|
addGridRowListener, fireRowChanged, getRowPosition, removeGridRowListener |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface diamondedge.swing.grid.GridRowModel |
|---|
addGridRowListener, getRowPosition, removeGridRowListener |
| Constructor Detail |
|---|
public ResultSetTableModel(ResultSet rs)
throws SQLException
SQLException
public ResultSetTableModel(Connection con,
String sql)
throws SQLException
SQLException| Method Detail |
|---|
public void finalize()
finalize in class Objectpublic void setRowPosition(int rowNumber)
setRowPosition in interface GridRowModelsetRowPosition in class AbstractGridRowModelpublic boolean isEditable()
public void setEditable(boolean editable)
public ResultSet getResultSet()
public void setResultSet(ResultSet rs)
throws SQLException
SQLException
public void setResultSet(Connection con,
String sql)
throws SQLException
SQLExceptionpublic int getCacheSize()
public void setCacheSize(int cacheSize)
public int getRowCount()
getRowCount in interface TableModel
public Object getValueAt(int row,
int column)
getValueAt in interface TableModel
public void setValueAt(Object val,
int row,
int column)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic void cancelChanges()
cancelChanges in interface GridRowModelpublic void saveChanges()
saveChanges in interface GridRowModelpublic boolean isChanged()
isChanged in interface GridRowModelpublic void setChanged(boolean markChanged)
setChanged in interface GridRowModel
public boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrow - the row whose value is to be looked upcolumn - the column whose value is to be looked up
setValueAt(java.lang.Object, int, int)
public void updateRow()
throws SQLException
SQLExceptionpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic int getColumn(String colName)
|
Diamond Control Suite 3.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||