T
- the item typepublic class RadioButtonGroupDataView<T> extends AbstractDataView<T>
component, dataProviderSupplier, NULL_IDENTIFIER_ERROR_MESSAGE, NULL_ITEM_ERROR_MESSAGE
Constructor and Description |
---|
RadioButtonGroupDataView(SerializableSupplier<? extends DataProvider<T,?>> dataProviderSupplier,
RadioButtonGroup radioButtonGroup)
Constructs a new DataView.
|
RadioButtonGroupDataView(SerializableSupplier<? extends DataProvider<T,?>> dataProviderSupplier,
RadioButtonGroup radioButtonGroup,
SerializableConsumer<IdentifierProvider<T>> identifierChangedCallback)
Constructs a new DataView.
|
Modifier and Type | Method and Description |
---|---|
T |
getItem(int index)
Gets the item at the given index from the data available to the
component.
|
protected Class<?> |
getSupportedDataProviderType()
Returns supported
DataProvider type for this DataView . |
void |
setIdentifierProvider(IdentifierProvider<T> identifierProvider)
Sets an identifier provider, which returns an identifier for the given
item.
|
addItemCountChangeListener, equals, getIdentifierProvider, getItems, refreshAll, refreshItem, verifyDataProviderType
public RadioButtonGroupDataView(SerializableSupplier<? extends DataProvider<T,?>> dataProviderSupplier, RadioButtonGroup radioButtonGroup)
dataProviderSupplier
- data provider supplierradioButtonGroup
- radioButton group instance for this DataViewpublic RadioButtonGroupDataView(SerializableSupplier<? extends DataProvider<T,?>> dataProviderSupplier, RadioButtonGroup radioButtonGroup, SerializableConsumer<IdentifierProvider<T>> identifierChangedCallback)
dataProviderSupplier
- data provider supplierradioButtonGroup
- radioButton group instance for this DataViewidentifierChangedCallback
- callback method which should be called when identifierProvider
is changedprotected Class<?> getSupportedDataProviderType()
AbstractDataView
DataProvider
type for this DataView
.getSupportedDataProviderType
in class AbstractDataView<T>
public T getItem(int index)
DataView
index
- item index numberpublic 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 © 2021. All rights reserved.