org.apache.jorphan.gui
Class ObjectTableModel
DefaultTableModel
org.apache.jorphan.gui.ObjectTableModel
public class ObjectTableModel
extends DefaultTableModel
The ObjectTableModel is a TableModel whose rows are objects;
columns are defined as Functors on the object.
ObjectTableModel(String[] headers, Class _objClass, Functor[] readFunctors, Functor[] writeFunctors, Class[] editorClasses) - The ObjectTableModel is a TableModel whose rows are objects;
columns are defined as Functors on the object.
|
ObjectTableModel(String[] headers, Functor[] readFunctors, Functor[] writeFunctors, Class[] editorClasses) - The ObjectTableModel is a TableModel whose rows are objects;
columns are defined as Functors on the object.
|
ObjectTableModel
public ObjectTableModel(String[] headers,
Class _objClass,
Functor[] readFunctors,
Functor[] writeFunctors,
Class[] editorClasses)
The ObjectTableModel is a TableModel whose rows are objects;
columns are defined as Functors on the object.
headers
- - Column names_objClass
- - Object class that will be usedreadFunctors
- - used to get the valueswriteFunctors
- - used to set the valueseditorClasses
- - class for each column
ObjectTableModel
public ObjectTableModel(String[] headers,
Functor[] readFunctors,
Functor[] writeFunctors,
Class[] editorClasses)
The ObjectTableModel is a TableModel whose rows are objects;
columns are defined as Functors on the object.
headers
- - Column namesreadFunctors
- - used to get the valueswriteFunctors
- - used to set the valueseditorClasses
- - class for each column
addRow
public void addRow(Object value)
checkFunctors
public boolean checkFunctors(Object _value,
Class caller)
Check all registered functors.
** only for use in unit test code **
_value
- - an instance of the table model row data item
(if null, use the class passed to the constructor).caller
- - class of caller.
- false if at least one Functor cannot be found.
clearData
public void clearData()
getColumnClass
public Class getColumnClass(int arg0)
getColumnCount
public int getColumnCount()
getColumnName
public String getColumnName(int col)
getRowCount
public int getRowCount()
getValueAt
public Object getValueAt(int row,
int col)
insertRow
public void insertRow(Object value,
int index)
isCellEditable
public boolean isCellEditable(int arg0,
int arg1)
iterator
public Iterator iterator()
moveRow
public void moveRow(int start,
int end,
int to)
removeRow
public void removeRow(int row)
setValueAt
public void setValueAt(Object cellValue,
int row,
int col)
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.