|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--com.objectwave.persist.gui.PersistenceAttributeTableModel
The TableModel interface ispecifies the methods the JTable will use to interrogate a tabular data model.
The JTable can be set up to display any data model which implements the TableModel interface with a couple of lines of code:
TableModel myData = new MyTableModel();
JTable table = new JTable(myData);
JTable,
AbstractTableModel,
Serialized Form| Field Summary |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
PersistenceAttributeTableModel()
|
|
| Method Summary | |
java.lang.Class |
getColumnClass(int columnIndex)
Returns the lowest common denominator Class in the column. |
int |
getColumnCount()
Returns the number of columns managed by the data source object. |
java.lang.String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex. |
int |
getRowCount()
Returns the number of records managed by the data source object. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns an attribute value for the cell at columnIndex and rowIndex. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns true if the cell at rowIndex and columnIndex is editable. |
void |
setSubject(Persistence p)
|
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Sets an attribute value for the record in the cell at columnIndex and rowIndex. |
| 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 |
public PersistenceAttributeTableModel()
| Method Detail |
public java.lang.Class getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelpublic int getColumnCount()
getRowCount()public java.lang.String getColumnName(int columnIndex)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumnIndex - the index of column
public int getRowCount()
getColumnCount()
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
rowIndex - the row whose value is to be looked upcolumnIndex - the column whose value is to be looked up
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelrowIndex - the row whose value is to be looked upcolumnIndex - the column whose value is to be looked up
#setValueAt()public void setSubject(Persistence p)
public void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelaValue - the new valuerowIndex - the row whose value is to be changedcolumnIndex - the column whose value is to be changed#getValueAt(),
#isCellEditable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||