程序包 weka.gui.sql
类 ResultSetTableModel
java.lang.Object
weka.gui.sql.ResultSetTableModel
- 所有已实现的接口:
TableModel
The model for an SQL ResultSet.
- 版本:
- $Revision: 7059 $
- 作者:
- FracPete (fracpete at waikato dot ac dot nz)
-
构造器概要
构造器构造器说明initializes the model, retrieves all rows.ResultSetTableModel
(ResultSet rs, int rows) initializes the model, retrieves only the given amount of rows (0 means all). -
方法概要
修饰符和类型方法说明void
adds a listener to the list that is notified each time a change to data model occurs.void
finalize()
frees up the memory.getColumnClass
(int columnIndex) returns the most specific superclass for all the cell values in the column (always String).int
returns the number of columns in the model.getColumnName
(int columnIndex) returns the name of the column at columnIndex.int
returns the number of rows in the model.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
removes a listener from the list that is notified each time a change to the data model occurs.void
setValueAt
(Object aValue, int rowIndex, int columnIndex) sets the value in the cell at columnIndex and rowIndex to aValue.
-
构造器详细资料
-
ResultSetTableModel
initializes the model, retrieves all rows.- 参数:
rs
- the ResultSet to get the data from
-
ResultSetTableModel
initializes the model, retrieves only the given amount of rows (0 means all).- 参数:
rs
- the ResultSet to get the data fromrows
- the maximum number of rows to retrieve, 0 retrieves all
-
-
方法详细资料
-
addTableModelListener
adds a listener to the list that is notified each time a change to data model occurs.- 指定者:
addTableModelListener
在接口中TableModel
- 参数:
l
- the listener to add
-
getColumnClass
returns the most specific superclass for all the cell values in the column (always String).- 指定者:
getColumnClass
在接口中TableModel
- 参数:
columnIndex
- the index of the column- 返回:
- the class
-
getColumnCount
public int getColumnCount()returns the number of columns in the model.- 指定者:
getColumnCount
在接口中TableModel
- 返回:
- the number of columns
-
getColumnName
returns the name of the column at columnIndex.- 指定者:
getColumnName
在接口中TableModel
- 参数:
columnIndex
- the index of the column- 返回:
- the name
-
getRowCount
public int getRowCount()returns the number of rows in the model.- 指定者:
getRowCount
在接口中TableModel
- 返回:
- the number of data rows
-
getValueAt
returns the value for the cell at columnindex and rowIndex.- 指定者:
getValueAt
在接口中TableModel
- 参数:
rowIndex
- the row of the cellcolumnIndex
- the column of the cell- 返回:
- the data value
-
isNullAt
public boolean isNullAt(int rowIndex, int columnIndex) checks whether the value of the cell is NULL.- 参数:
rowIndex
- the row of the cellcolumnIndex
- the column of the cell- 返回:
- true if the cell value is NULL
-
isNumericAt
public boolean isNumericAt(int columnIndex) returns whether the column at the given index is numeric.- 参数:
columnIndex
- the column to check- 返回:
- whether the column is numeric
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) returns true if the cell at rowindex and columnindexis editable.- 指定者:
isCellEditable
在接口中TableModel
- 参数:
rowIndex
- the row of the cellcolumnIndex
- the column of the cell- 返回:
- always false
-
removeTableModelListener
removes a listener from the list that is notified each time a change to the data model occurs.- 指定者:
removeTableModelListener
在接口中TableModel
- 参数:
l
- the listener to remove
-
setValueAt
sets the value in the cell at columnIndex and rowIndex to aValue. Ignored.- 指定者:
setValueAt
在接口中TableModel
- 参数:
aValue
- the value to set - ignoredrowIndex
- the row of the cellcolumnIndex
- the column of the cell
-
finalize
frees up the memory.- 抛出:
Throwable
- if something goes wrong
-