T
- data typepublic class CheckboxGroupListDataView<T> extends AbstractListDataView<T>
component, dataProviderSupplier, NULL_IDENTIFIER_ERROR_MESSAGE
Constructor and Description |
---|
CheckboxGroupListDataView(SerializableSupplier<DataProvider<T,?>> dataProviderSupplier,
CheckboxGroup<T> checkboxGroup,
SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
Creates a new in-memory data view for Checkbox Group and verifies the
passed data provider is compatible with this data view implementation.
|
CheckboxGroupListDataView(SerializableSupplier<DataProvider<T,?>> dataProviderSupplier,
CheckboxGroup<T> checkboxGroup,
SerializableConsumer<IdentifierProvider<T>> identifierChangedCallback,
SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
Creates a new in-memory data view for Checkbox Group 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 CheckboxGroupListDataView(SerializableSupplier<DataProvider<T,?>> dataProviderSupplier, CheckboxGroup<T> checkboxGroup, SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
dataProviderSupplier
- data provider suppliercheckboxGroup
- checkbox group instance for this DataViewfilterOrSortingChangedCallback
- callback, which is being invoked when the CheckboxGroup's
filtering or sorting changes, not null
public CheckboxGroupListDataView(SerializableSupplier<DataProvider<T,?>> dataProviderSupplier, CheckboxGroup<T> checkboxGroup, SerializableConsumer<IdentifierProvider<T>> identifierChangedCallback, SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
dataProviderSupplier
- data provider suppliercheckboxGroup
- checkbox group instance for this DataViewidentifierChangedCallback
- callback method which should be called when identifierProvider
is changedfilterOrSortingChangedCallback
- callback, which is being invoked when the CheckboxGroup'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.