|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.jurvis.swing.table.JvAbstractObjectTableModel
org.jurvis.swing.table.JvDefaultObjectTableModel
public class JvDefaultObjectTableModel
A JvObjectTableModel is a TableModel in which each
row is actually a single object (which implements JvObjectTableRow.
The columns of a row typically represent different fields of the row object.
Use JvMappedObjectTableModel instead of this class because
JvMappedObjectTableModel does not need a a
JvObjectTableRow object needed for each row.
JvObjectTableRow,
Serialized Form| Field Summary | |
|---|---|
protected List |
rowData
The List of JvObjectTableRow objects. |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
JvDefaultObjectTableModel(List rowData)
Construct a JvObjectTableModel with the given row data. |
|
| Method Summary | |
|---|---|
void |
addRow(JvObjectTableRow row)
Adds a row to the end of the model. |
protected JvObjectTableRow |
getRowAt(int row)
Return the JvObjectTableRow for the specified row. |
int |
getRowCount()
Returns the number of rows in this data table. |
void |
remove(int row,
int col)
Method called when the drop operation is MOVE. |
void |
removeRow(int row)
Removes the row at row from the model. |
| Methods inherited from class org.jurvis.swing.table.JvAbstractObjectTableModel |
|---|
getColumnClass, getColumnCount, getEmptyCollection, getObjectAt, getValueAt, isCellEditable, setValueAt |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.table.TableModel |
|---|
addTableModelListener, getColumnName, removeTableModelListener |
| Field Detail |
|---|
protected List rowData
List of JvObjectTableRow objects.
| Constructor Detail |
|---|
public JvDefaultObjectTableModel(List rowData)
JvObjectTableModel with the given row data.
rowData - the List containing the data of this model| Method Detail |
|---|
protected final JvObjectTableRow getRowAt(int row)
JvObjectTableRow for the specified row.
getRowAt in class JvAbstractObjectTableModelrow - the index of the desired row
JvObjectTableRow for the specified rowpublic int getRowCount()
public void addRow(JvObjectTableRow row)
row - data of the row being addedpublic void removeRow(int row)
row from the model. Notification
of the row being removed will be sent to all the listeners.
row - the row index of the row to be removed
public void remove(int row,
int col)
JvObjectTableModel, each row corresponds to a single object,
so the column index is ignored and removeRow(int) is called.
row - the row index of the data that will be removedcol - the column index of the data that will be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||