public class BeanListTableModel<T> extends TableModel
One can control which properties are exposed (and their order). There is also a convenience constructor for adding a special header row.
Constructor and Description |
---|
BeanListTableModel(java.lang.Class<T> clazz,
java.lang.Iterable<T> list) |
BeanListTableModel(java.lang.Iterable<T> list,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> header) |
BeanListTableModel(java.lang.Iterable<T> list,
java.lang.String... propertyNames) |
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount()
Return the number of columns that can be queried.
|
int |
getRowCount()
Return the number of rows that can be queried.
|
java.lang.Object |
getValue(int row,
int column)
Return the data value to be displayed at a given row and column, which may be null.
|
transpose
public BeanListTableModel(java.lang.Iterable<T> list, java.lang.String... propertyNames)
public BeanListTableModel(java.lang.Iterable<T> list, java.util.LinkedHashMap<java.lang.String,java.lang.Object> header)
public int getRowCount()
TableModel
rowCount-1
inclusive are valid values.getRowCount
in class TableModel
public int getColumnCount()
TableModel
columnCount-1
inclusive are valid values.getColumnCount
in class TableModel
public java.lang.Object getValue(int row, int column)
TableModel
getValue
in class TableModel