|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--voji.ui.JResultTable.ResultTableModel
This is the table model for ResultTables
| Field Summary | |
protected java.lang.Object[][] |
data
The internal data |
protected java.util.Vector |
formats
The formats of the columns |
protected int |
maxRows
The maximum number of rows |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
JResultTable.ResultTableModel()
Constructs a ResultTableModel with empty data |
|
| Method Summary | |
void |
addFormat(DataFormat format)
Adds a new format |
int |
getColumnCount()
|
int |
getID(int row)
Returns the ID of the specified row |
int |
getRow(int id)
Looks for the row with the specified ID |
int |
getRowCount()
|
java.lang.Object |
getValueAt(int row,
int column)
|
void |
setData(java.sql.ResultSet resultSet)
Sets the data of this model. |
void |
setMaxRows(int maxRows)
Sets the maximum number of rows accepted by setData(). |
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int maxRows
protected java.util.Vector formats
protected java.lang.Object[][] data
| Constructor Detail |
public JResultTable.ResultTableModel()
| Method Detail |
public int getRowCount()
public int getColumnCount()
public java.lang.Object getValueAt(int row,
int column)
row - the row whose value is to be queriedcolumn - the column whose value is to be queried
public int getID(int row)
row - the index of the row
setData().public int getRow(int id)
id - the ID of the row
setData().public void setMaxRows(int maxRows)
setData().
maxRows - the maximum number of rows
or -1 for no maximumpublic void addFormat(DataFormat format)
format - the DataFormat to use for the next column
public void setData(java.sql.ResultSet resultSet)
throws java.sql.SQLException
resultSet - the ResultSet where to take the data from
java.sql.SQLException - if there is an SQLException
while working with resultSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||