|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel org.afcs.warts.gui.TableDescriptionModel
The TableDescriptionModel class wraps a
TableDescription
instance
in an implementation of javax.swing.table.TableModel
allowing
GUIs to include a Swing version of the database table report generated by
TableDescriptionReport
.
LICENSE: This code is released to the public domain and may be used for any purpose whatsoever without permission or acknowledgment.
Field Summary |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
TableDescriptionModel(TableDescription tableDescription)
Creates a new instance with the specified database table description providing the data for the Swing table. |
Method Summary | |
int |
getColumnCount()
Returns the number of columns in the model (which is always 6). |
java.lang.String |
getColumnName(int columnIndex)
Returns the name of the specified column in the model. |
int |
getRowCount()
Returns the number of rows in the table, which is equal to the number of columns in the database table. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the data at in the table model at the specified row and column indices. |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TableDescriptionModel(TableDescription tableDescription)
tableDescription
- The database table providing the data to model.
java.lang.NullPointerException
- If tableDescription is null.Method Detail |
public int getRowCount()
public int getColumnCount()
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getRowCount()
and getColumnCount()
.
rowIndex
- The row to get data from.columnIndex
- The column to get data from.
public java.lang.String getColumnName(int columnIndex)
columnIndex
- The column to get the name for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |