程序包 weka.gui.sql

类 ResultSetTableModel

java.lang.Object
weka.gui.sql.ResultSetTableModel
所有已实现的接口:
TableModel

public class ResultSetTableModel extends Object implements TableModel
The model for an SQL ResultSet.
版本:
$Revision: 7059 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
  • 构造器详细资料

    • ResultSetTableModel

      public ResultSetTableModel(ResultSet rs)
      initializes the model, retrieves all rows.
      参数:
      rs - the ResultSet to get the data from
    • ResultSetTableModel

      public ResultSetTableModel(ResultSet rs, int rows)
      initializes the model, retrieves only the given amount of rows (0 means all).
      参数:
      rs - the ResultSet to get the data from
      rows - the maximum number of rows to retrieve, 0 retrieves all
  • 方法详细资料

    • addTableModelListener

      public void addTableModelListener(TableModelListener l)
      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

      public Class getColumnClass(int columnIndex)
      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

      public String getColumnName(int columnIndex)
      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

      public Object getValueAt(int rowIndex, int columnIndex)
      returns the value for the cell at columnindex and rowIndex.
      指定者:
      getValueAt 在接口中 TableModel
      参数:
      rowIndex - the row of the cell
      columnIndex - 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 cell
      columnIndex - 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 cell
      columnIndex - the column of the cell
      返回:
      always false
    • removeTableModelListener

      public void removeTableModelListener(TableModelListener l)
      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

      public void setValueAt(Object aValue, int rowIndex, int columnIndex)
      sets the value in the cell at columnIndex and rowIndex to aValue. Ignored.
      指定者:
      setValueAt 在接口中 TableModel
      参数:
      aValue - the value to set - ignored
      rowIndex - the row of the cell
      columnIndex - the column of the cell
    • finalize

      public void finalize() throws Throwable
      frees up the memory.
      抛出:
      Throwable - if something goes wrong