|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.gui.sql.ResultSetTableModel
public class ResultSetTableModel
The model for an SQL ResultSet.
Constructor Summary | |
---|---|
ResultSetTableModel(java.sql.ResultSet rs)
initializes the model, retrieves all rows |
|
ResultSetTableModel(java.sql.ResultSet rs,
int rows)
initializes the model, retrieves only the given amount of rows (0 means all) |
Method Summary | |
---|---|
void |
addTableModelListener(javax.swing.event.TableModelListener l)
adds a listener to the list that is notified each time a change to data model occurs |
void |
finalize()
frees up the memory |
java.lang.Class |
getColumnClass(int columnIndex)
returns the most specific superclass for all the cell values in the column (always String) |
int |
getColumnCount()
returns the number of columns in the model |
java.lang.String |
getColumnName(int columnIndex)
returns the name of the column at columnIndex |
int |
getRowCount()
returns the number of rows in the model |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
returns the value for the cell at columnindex and rowIndex |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
returns true if the cell at rowindex and columnindexis editable |
boolean |
isNullAt(int rowIndex,
int columnIndex)
checks whether the value of the cell is NULL |
boolean |
isNumericAt(int columnIndex)
returns whether the column at the given index is numeric |
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
removes a listener from the list that is notified each time a change to the data model occurs |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
sets the value in the cell at columnIndex and rowIndex to aValue. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultSetTableModel(java.sql.ResultSet rs)
rs
- the ResultSet to get the data frompublic ResultSetTableModel(java.sql.ResultSet rs, int rows)
rs
- the ResultSet to get the data fromrows
- the maximum number of rows to retrieve, 0 retrieves allMethod Detail |
---|
public void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener
in interface javax.swing.table.TableModel
public java.lang.Class getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
public boolean isNullAt(int rowIndex, int columnIndex)
public boolean isNumericAt(int columnIndex)
columnIndex
- the column to check
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
public void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener
in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |