client.SQLAccess
Class CustomTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by client.SQLAccess.CustomTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class CustomTableModel
extends javax.swing.table.AbstractTableModel

Author:
Mariano Tepper
See Also:
Serialized Form
 

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
CustomTableModel(SQLInterface sqli)
           
 
Method Summary
 java.lang.Class<?> getColumnClass(int c)
           
 int getColumnCount()
           
 int getColumnCount(java.sql.ResultSet resultSet)
           
 java.lang.String getColumnName(int col)
           
 java.lang.String[] getColumnNames()
           
 java.lang.String[] getColumnNames(java.sql.ResultSet resultSet, int columnCount)
           
 java.lang.String getName()
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int col)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 boolean setData()
           
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomTableModel

public CustomTableModel(SQLInterface sqli)
Method Detail

getColumnCount

public int getColumnCount(java.sql.ResultSet resultSet)

getColumnNames

public java.lang.String[] getColumnNames(java.sql.ResultSet resultSet,
                                         int columnCount)
                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

setData

public boolean setData()
                throws java.sql.SQLException
Throws:
java.sql.SQLException

getName

public java.lang.String getName()

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getColumnName

public java.lang.String getColumnName(int col)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getColumnNames

public java.lang.String[] getColumnNames()

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)

getColumnClass

public java.lang.Class<?> getColumnClass(int c)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel