T
- item typepublic class SelectListDataView<T> extends AbstractListDataView<T>
Select
with in-memory list data.
Provides information on the data and allows operations on it.component, dataProviderSupplier, NULL_IDENTIFIER_ERROR_MESSAGE
Constructor and Description |
---|
SelectListDataView(SerializableSupplier<DataProvider<T,?>> dataProviderSupplier,
Select<T> select,
SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
Creates a new in-memory data view for Select and verifies the passed data
provider is compatible with this data view implementation.
|
SelectListDataView(SerializableSupplier<DataProvider<T,?>> dataProviderSupplier,
Select<T> select,
SerializableConsumer<IdentifierProvider<T>> identifierChangedCallback,
SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
Creates a new in-memory data view for Select and verifies the passed data
provider is compatible with this data view implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
setIdentifierProvider(IdentifierProvider<T> identifierProvider)
Sets an identifier provider, which returns an identifier for the given
item.
|
addFilter, addItem, addItemAfter, addItemBefore, addItems, addItemsAfter, addItemsBefore, addSortComparator, addSortOrder, contains, getDataProvider, getItem, getItemCount, getItems, getNextItem, getPreviousItem, getSupportedDataProviderType, removeFilters, removeItem, removeItems, removeSorting, setFilter, setSortComparator, setSortOrder, validateItemIndex
addItemCountChangeListener, equals, getIdentifierProvider, refreshAll, refreshItem, verifyDataProviderType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addItemCountChangeListener, refreshAll, refreshItem
public SelectListDataView(SerializableSupplier<DataProvider<T,?>> dataProviderSupplier, Select<T> select, SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
dataProviderSupplier
- supplier from which the DataProvider can be gottenselect
- select component that the dataView is bound tofilterOrSortingChangedCallback
- callback, which is being invoked when the Select's filtering
or sorting changes, not null
public SelectListDataView(SerializableSupplier<DataProvider<T,?>> dataProviderSupplier, Select<T> select, SerializableConsumer<IdentifierProvider<T>> identifierChangedCallback, SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
dataProviderSupplier
- supplier from which the DataProvider can be gottenselect
- select component that the dataView is bound toidentifierChangedCallback
- callback method which should be called when identifierProvider
is changedfilterOrSortingChangedCallback
- callback, which is being invoked when the Select's filtering
or sorting changes, not null
public void setIdentifierProvider(IdentifierProvider<T> identifierProvider)
DataView
dataView.setIdentifiedProvider(Item::getId);
.setIdentifierProvider
in interface DataView<T>
setIdentifierProvider
in class AbstractDataView<T>
identifierProvider
- function that returns the non-null identifier for a given itemCopyright © 2022. All rights reserved.