public class ObjectTableModel extends DefaultTableModel
columnIdentifiers, dataVector
listenerList
Constructor and Description |
---|
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,
Class<?> _objClass,
Functor[] readFunctors,
Functor[] writeFunctors,
Class<?>[] editorClasses,
boolean cellEditable)
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.
|
Modifier and Type | Method and Description |
---|---|
void |
addRow(Object value) |
boolean |
checkFunctors(Object _value,
Class<?> caller)
Check all registered functors.
|
void |
clearData() |
Class<?> |
getColumnClass(int arg0) |
int |
getColumnCount() |
String |
getColumnName(int col) |
Object |
getObjectList() |
List<Object> |
getObjectListAsList() |
int |
getRowCount() |
Object |
getValueAt(int row,
int col) |
void |
insertRow(Object value,
int index) |
boolean |
isCellEditable(int arg0,
int arg1) |
Iterator<?> |
iterator() |
void |
moveRow(int start,
int end,
int to) |
void |
removeRow(int row) |
void |
setRows(Iterable<?> rows) |
void |
setValueAt(Object cellValue,
int row,
int col) |
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, newDataAvailable, newRowsAdded, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public ObjectTableModel(String[] headers, Class<?> _objClass, Functor[] readFunctors, Functor[] writeFunctors, Class<?>[] editorClasses)
headers
- - Column names_objClass
- - Object class that will be usedreadFunctors
- - used to get the valueswriteFunctors
- - used to set the valueseditorClasses
- - class for each columnpublic ObjectTableModel(String[] headers, Class<?> _objClass, Functor[] readFunctors, Functor[] writeFunctors, Class<?>[] editorClasses, boolean cellEditable)
headers
- - Column names_objClass
- - Object class that will be usedreadFunctors
- - used to get the valueswriteFunctors
- - used to set the valueseditorClasses
- - class for each columncellEditable
- - if cell must editable (false to allow double click on cell)public ObjectTableModel(String[] headers, Functor[] readFunctors, Functor[] writeFunctors, Class<?>[] editorClasses)
headers
- - Column namesreadFunctors
- - used to get the valueswriteFunctors
- - used to set the valueseditorClasses
- - class for each columnpublic Iterator<?> iterator()
public void clearData()
public void addRow(Object value)
public void insertRow(Object value, int index)
public int getColumnCount()
getColumnCount
in interface TableModel
getColumnCount
in class DefaultTableModel
public String getColumnName(int col)
getColumnName
in interface TableModel
getColumnName
in class DefaultTableModel
public int getRowCount()
getRowCount
in interface TableModel
getRowCount
in class DefaultTableModel
public Object getValueAt(int row, int col)
getValueAt
in interface TableModel
getValueAt
in class DefaultTableModel
public boolean isCellEditable(int arg0, int arg1)
isCellEditable
in interface TableModel
isCellEditable
in class DefaultTableModel
public void moveRow(int start, int end, int to)
moveRow
in class DefaultTableModel
public void removeRow(int row)
removeRow
in class DefaultTableModel
public void setValueAt(Object cellValue, int row, int col)
setValueAt
in interface TableModel
setValueAt
in class DefaultTableModel
public Class<?> getColumnClass(int arg0)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public boolean checkFunctors(Object _value, Class<?> caller)
** 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.public Object getObjectList()
public void setRows(Iterable<?> rows)
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.