com.antelmann.util.table
Class MethodTableModel<T>
java.lang.Object
javax.swing.table.AbstractTableModel
com.antelmann.util.table.MethodTableModel<T>
- All Implemented Interfaces:
- Serializable, TableModel
public class MethodTableModel<T>
- extends AbstractTableModel
a table model that displays a list of objects based on the return value of
given method names using reflection.
- Author:
- Holger Antelmann
- See Also:
- Serialized Form
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
list
protected final List<T> list
methods
protected Method[] methods
MethodTableModel
public MethodTableModel(List<T> list,
String... methodNames)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
refresh
public void refresh(List<T> list,
String... methodNames)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getList
public List<T> getList()
- returns an unmodifiable view of the embedded list.
getRow
public T getRow(int row)
getRowCount
public int getRowCount()
getColumnCount
public int getColumnCount()
getValueAt
public Object getValueAt(int row,
int column)
getColumnName
public String getColumnName(int column)
- returns the column name which may be altered according to Beans specifications
(i.e. "is" and "get" is removed at the beginning if the following letter is upper-case).
- Specified by:
getColumnName in interface TableModel- Overrides:
getColumnName in class AbstractTableModel
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads