public class CollectionGridDataSource extends java.lang.Object implements GridDataSource
| Constructor and Description |
|---|
CollectionGridDataSource(java.util.Collection collection) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAvailableRows()
Returns the number of rows available in the data source.
|
java.lang.Class |
getRowType()
Returns the type of the first element in the list, or null if the list is empty.
|
java.lang.Object |
getRowValue(int index)
Returns the row value at the provided index.
|
void |
prepare(int startIndex,
int endIndex,
java.util.List<SortConstraint> sortConstraints)
Invoked to allow the source to prepare to present values.
|
public CollectionGridDataSource(java.util.Collection collection)
public int getAvailableRows()
GridDataSourcegetAvailableRows in interface GridDataSourcepublic void prepare(int startIndex, int endIndex, java.util.List<SortConstraint> sortConstraints)
GridDataSourceprepare in interface GridDataSourcestartIndex - the starting index to be retrievedendIndex - the ending index to be retrievedsortConstraints - identify how data is to be sortedpublic java.lang.Class getRowType()
getRowType in interface GridDataSourcepublic java.lang.Object getRowValue(int index)
GridDataSourceGridDataSource.getAvailableRows() may return a different number of rows than are actually available (i.e., the database
was changed between calls to GridDataSource.getAvailableRows() and the call to GridDataSource.prepare(int, int,
java.util.List)). In that case, this method should return null for any out-of-range indexes.getRowValue in interface GridDataSource${project.version} - Copyright © 2003-2015 The Apache Software Foundation.