|
||||||||||
| 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
public abstract class JvAbstractObjectTableModel
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.
JvObjectTableRow,
Serialized Form| Field Summary | |
|---|---|
protected List |
rowData
The List of JvObjectTableRow objects. |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
JvAbstractObjectTableModel()
Construct a JvObjectTableModel with the given row data. |
|
| Method Summary | |
|---|---|
Class |
getColumnClass(int columnIndex)
Return the class of object displayed in the specified column. |
int |
getColumnCount()
Returns 0 for the number of columns in this data table. |
Collection |
getEmptyCollection()
Return an empty collection suitable for putting the selected items within. |
Object |
getObjectAt(int row)
Return the domain object associated with the specified row. |
protected abstract JvObjectTableRow |
getRowAt(int row)
Return the JvObjectTableRow for the specified row. |
Object |
getValueAt(int row,
int column)
Returns an attribute value for the cell at row
and column. |
boolean |
isCellEditable(int row,
int column)
Returns true if the cell at row and column is
editable. |
void |
setValueAt(Object value,
int row,
int column)
Sets the object value for the cell at column and
row. |
| 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, getRowCount, removeTableModelListener |
| Field Detail |
|---|
protected List rowData
List of JvObjectTableRow objects.
| Constructor Detail |
|---|
public JvAbstractObjectTableModel()
JvObjectTableModel with the given row data.
| Method Detail |
|---|
protected abstract JvObjectTableRow getRowAt(int row)
JvObjectTableRow for the specified row.
row - the index of the desired row
JvObjectTableRow for the specified rowpublic Object getObjectAt(int row)
getObjectAt in interface JvObjectTableModelrow - the index of the desired row
public Collection getEmptyCollection()
getEmptyCollection in interface JvObjectTableModelArrayListpublic int getColumnCount()
TableColumnModel should not be
created from this TableModel. Columns should be created
using the JvSwingFactory.createTableColumn(javax.swing.JTable, java.lang.String, int) method.
getColumnCount in interface TableModelpublic Class getColumnClass(int columnIndex)
Object is returned.
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelcolumnIndex - the column being queried
public Object getValueAt(int row,
int column)
row
and column.
getValueAt in interface TableModelrow - the row whose value is to be queriedcolumn - the column whose value is to be queried
public void setValueAt(Object value,
int row,
int column)
column and
row. value is the new value. This method
will generate a tableChanged notification.
setValueAt in interface TableModelsetValueAt in class AbstractTableModelvalue - the new value; this can be nullrow - the row whose value is to be changedcolumn - the column whose value is to be changed
public boolean isCellEditable(int row,
int column)
row and column is
editable. Otherwise, setValueAt on the cell will not
change the value of that cell.
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrow - the row whose value to be queriedcolumn - the column whose value to be queried
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||