T
- type of the Objects in the backing list.public class ListDataProvider<T> extends Object implements IRowDataProvider<T>
List
containing POJO(s) as a backing data source.
By default a bean at position 'X' in the list is displayed in
row 'X' in the table. The properties of the bean are used to
populate the columns. A IColumnPropertyResolver
is used to
retrieve column data from the bean properties.IColumnPropertyResolver
Modifier and Type | Field and Description |
---|---|
protected IColumnAccessor<T> |
columnAccessor |
protected List<T> |
list |
Constructor and Description |
---|
ListDataProvider(List<T> list,
IColumnAccessor<T> columnAccessor) |
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount() |
Object |
getDataValue(int columnIndex,
int rowIndex)
Gets the value at the given column and row index.
|
List<T> |
getList() |
int |
getRowCount() |
T |
getRowObject(int rowIndex) |
int |
indexOfRowObject(T rowObject) |
void |
setDataValue(int columnIndex,
int rowIndex,
Object newValue)
Sets the value at the given column and row index.
|
protected IColumnAccessor<T> columnAccessor
public ListDataProvider(List<T> list, IColumnAccessor<T> columnAccessor)
public int getColumnCount()
getColumnCount
in interface IDataProvider
public int getRowCount()
getRowCount
in interface IDataProvider
public Object getDataValue(int columnIndex, int rowIndex)
IDataProvider
getDataValue
in interface IDataProvider
public void setDataValue(int columnIndex, int rowIndex, Object newValue)
IDataProvider
setDataValue
in interface IDataProvider
public T getRowObject(int rowIndex)
getRowObject
in interface IRowDataProvider<T>
public int indexOfRowObject(T rowObject)
indexOfRowObject
in interface IRowDataProvider<T>
Copyright © 2013. All Rights Reserved.