rsramanujam.uis
Class RSRResultSetTableModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--javax.swing.table.DefaultTableModel
              |
              +--rsramanujam.uis.RSRResultSetTableModel

public class RSRResultSetTableModel
extends javax.swing.table.DefaultTableModel

This TableModel returns the date required to populate a JTable with the output of a ResultSet Note : This is a very simple implementation. To enhance functionality, this class can be extended or modified.

Version:
1.0.0 Kamadhenu, an open source repository of user intercace and support utility components Copyright (C) 2002 R Sadagopa Ramanujam This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA R Sadagopa Ramanujam
See Also:
Serialized Form

Field Summary
(package private)  java.util.Vector data
           
(package private)  java.util.Vector parent
           
(package private)  java.lang.String[] titles
           
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
RSRResultSetTableModel(java.sql.ResultSet resultSet)
          This constructor builds the data for the table using the supplied ResultSet.
 
Method Summary
 void buildData(java.sql.ResultSet resultSet)
           
 int getRowCount()
          getRowCount method comment.
 java.lang.Object getValueAt(int row, int column)
          getValueAt method comment.
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, insertRow, insertRow, isCellEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setValueAt
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, removeTableModelListener
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

titles

java.lang.String[] titles

data

java.util.Vector data

parent

java.util.Vector parent
Constructor Detail

RSRResultSetTableModel

public RSRResultSetTableModel(java.sql.ResultSet resultSet)
This constructor builds the data for the table using the supplied ResultSet.
Parameters:
resultSet - - java.sql.ResultSet
Throws:
SQLException - - Thrown when something is wrong with the resultSet related operations.
Method Detail

buildData

public void buildData(java.sql.ResultSet resultSet)
               throws java.sql.SQLException

getRowCount

public int getRowCount()
getRowCount method comment.
Overrides:
getRowCount in class javax.swing.table.DefaultTableModel

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
getValueAt method comment.
Overrides:
getValueAt in class javax.swing.table.DefaultTableModel