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
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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetDataValue(int columnIndex, int rowIndex) Gets the value at the given column and row index.getList()intgetRowObject(int rowIndex) intindexOfRowObject(T rowObject) voidsetDataValue(int columnIndex, int rowIndex, Object newValue) Sets the value at the given column and row index.
-
Field Details
-
list
-
columnAccessor
-
-
Constructor Details
-
ListDataProvider
-
-
Method Details
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceIDataProvider- Returns:
- The number of columns this
IDataProviderhandles.
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceIDataProvider- Returns:
- The number of rows this
IDataProviderhandles.
-
getDataValue
Description copied from interface:IDataProviderGets the value at the given column and row index.- Specified by:
getDataValuein interfaceIDataProvider- Parameters:
columnIndex- The column index of the cell whose value is requested.rowIndex- The row index of the cell whose value is requested.- Returns:
- The data value associated with the specified cell coordintates.
-
setDataValue
Description copied from interface:IDataProviderSets the value at the given column and row index. Optional operation. Should throw UnsupportedOperationException if this operation is not supported.- Specified by:
setDataValuein interfaceIDataProvider- Parameters:
columnIndex- The column index of the cell whose value should be changed.rowIndex- The row index of the cell whose value should be changed.newValue- The new value that should be set.
-
getRowObject
- Specified by:
getRowObjectin interfaceIRowDataProvider<T>
-
indexOfRowObject
- Specified by:
indexOfRowObjectin interfaceIRowDataProvider<T>
-
getList
-