org.eclipse.nebula.widgets.nattable.data
Class ListDataProvider<T>
java.lang.Object
org.eclipse.nebula.widgets.nattable.data.ListDataProvider<T>
- Type Parameters:
T
- type of the Objects in the backing list.
- All Implemented Interfaces:
- IDataProvider, IRowDataProvider<T>
- Direct Known Subclasses:
- AbstractFilterListDataProvider, ColumnStructureUpdatesExampleGridLayer.ListDataProviderExample, DefaultBodyDataProvider, GlazedListsDataProvider
public class ListDataProvider<T>
- extends Object
- implements IRowDataProvider<T>
Enables the use of a 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.
- See Also:
IColumnPropertyResolver
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
list
protected List<T> list
columnAccessor
protected IColumnAccessor<T> columnAccessor
ListDataProvider
public ListDataProvider(List<T> list,
IColumnAccessor<T> columnAccessor)
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interface IDataProvider
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interface IDataProvider
getDataValue
public Object getDataValue(int columnIndex,
int rowIndex)
- Description copied from interface:
IDataProvider
- Gets the value at the given column and row index.
- Specified by:
getDataValue
in interface IDataProvider
- Returns:
- the data value associated with the specified cell
setDataValue
public void setDataValue(int columnIndex,
int rowIndex,
Object newValue)
- Description copied from interface:
IDataProvider
- Sets the value at the given column and row index. Optional operation.
Should throw UnsupportedOperationException if this operation is not
supported.
- Specified by:
setDataValue
in interface IDataProvider
getRowObject
public T getRowObject(int rowIndex)
- Specified by:
getRowObject
in interface IRowDataProvider<T>
indexOfRowObject
public int indexOfRowObject(T rowObject)
- Specified by:
indexOfRowObject
in interface IRowDataProvider<T>
getList
public List<T> getList()
Copyright © 2015. All rights reserved.