T - Selection item typepublic interface SingleSelect<T> extends Selectable<T>, Input<T>, ItemSet
Selectable component in which at most one item can be selected at a time.Selectable.SelectionEvent<T>, Selectable.SelectionListener<T>, Selectable.SelectionModeInput.InputPropertyRenderer<T>, Input.InputValueConversionException, Input.PropertyHandler<P,T,V extends com.vaadin.flow.component.HasValue<?,T>,C extends com.vaadin.flow.component.Component>ValueHolder.ValueChangeEvent<V>, ValueHolder.ValueChangeListener<V,E extends ValueHolder.ValueChangeEvent<V>>| Modifier and Type | Method and Description |
|---|---|
static <T> SelectModeSingleSelectInputBuilder.ItemSelectModeSingleSelectInputBuilder<T,T> |
create(Class<T> type)
Gets a builder to create a
SingleSelect. |
static <T,ITEM> SelectModeSingleSelectInputBuilder.ItemSelectModeSingleSelectInputBuilder<T,ITEM> |
create(Class<T> type,
Class<ITEM> itemType,
ItemConverter<T,ITEM> itemConverter)
Gets a builder to create a
SingleSelect. |
static <T> SelectModeSingleSelectInputBuilder.PropertySelectModeSingleSelectInputBuilder<T> |
create(com.holonplatform.core.property.Property<T> selectionProperty)
Gets a builder to create a
SingleSelect, using given selection Property. |
static <T> SelectModeSingleSelectInputBuilder.PropertySelectModeSingleSelectInputBuilder<T> |
create(com.holonplatform.core.property.Property<T> selectionProperty,
Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)
Gets a builder to create a
SingleSelect, using given selection Property and converter. |
default void |
deselectAll()
Deselects all currently selected items, if any.
|
default Optional<T> |
getFirstSelectedItem()
Get the first selected item.
|
Optional<T> |
getSelectedItem()
Get the currently selected item.
|
default Set<T> |
getSelectedItems()
Get an immutable set of the currently selected items.
|
default Selectable.SelectionMode |
getSelectionMode()
Get the selection mode
|
static <T> OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,T> |
options(Class<T> type)
Gets a builder to create a
SingleSelect using the options rendering mode, i.e. a radio button
group. |
static <T,ITEM> OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,ITEM> |
options(Class<T> type,
Class<ITEM> itemType,
ItemConverter<T,ITEM> itemConverter)
Gets a builder to create a
SingleSelect using the options rendering mode, i.e. a radio button
group. |
static <T> OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T> |
options(com.holonplatform.core.property.Property<T> selectionProperty)
Gets a builder to create a
SingleSelect, using given selection Property and the options
rendering mode, i.e. a radio button group. |
static <T> OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T> |
options(com.holonplatform.core.property.Property<T> selectionProperty,
Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)
Gets a builder to create a
SingleSelect, using given selection Property, a converter and the
options rendering mode, i.e. a radio button group. |
addSelectionListener, deselect, isSelected, selectasHasValue, boolean_, builder, builder, date, dateTime, enumMultiSelect, enumOptionSelect, enumSelect, focus, from, from, from, from, from, hasInvalidChangeEventNotifier, hasPlaceholder, hasTitle, isReadOnly, isRequired, localDate, localDateTime, localTime, multiOptionSelect, multiOptionSelect, multiOptionSelect, multiOptionSelect, number, password, setReadOnly, setRequired, singleOptionSelect, singleOptionSelect, singleOptionSelect, singleOptionSelect, singleSelect, singleSelect, singleSelect, singleSelect, string, stringAreaaddValueChangeListener, clear, getEmptyValue, getValue, getValueIfPresent, isEmpty, setValuegetValue, hasValueChangeModecreate, getComponent, getElement, hasEnabled, hasLabel, hasSize, hasStyle, hasValidation, isVisible, setVisibleOptional<T> getSelectedItem()
default Selectable.SelectionMode getSelectionMode()
SelectablegetSelectionMode in interface Selectable<T>default Set<T> getSelectedItems()
SelectableThe iteration order of the items in the returned set is implementation dependent.
getSelectedItems in interface Selectable<T>default Optional<T> getFirstSelectedItem()
SelectablegetFirstSelectedItem in interface Selectable<T>default void deselectAll()
SelectabledeselectAll in interface Selectable<T>static <T> SelectModeSingleSelectInputBuilder.ItemSelectModeSingleSelectInputBuilder<T,T> create(Class<T> type)
SingleSelect.
This builder can be used when the selection items type and the selection value type are consistent. Use
create(Class, Class, ItemConverter) if not.
create in interface Input<T>T - Value typetype - Selection value type (not null)SelectModeSingleSelectInputBuilder.ItemSelectModeSingleSelectInputBuilderstatic <T,ITEM> SelectModeSingleSelectInputBuilder.ItemSelectModeSingleSelectInputBuilder<T,ITEM> create(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)
SingleSelect.
This builder can be used when the selection items type and the selection value type are not consistent (i.e. of
different type). When the the selection item and the selection value types are consistent, the
create(Class) method can be used.
T - Value typeITEM - Item typetype - Selection value type (not null)itemType - Selection items type (not null)itemConverter - The item converter to use to convert a selection item into a selection (Input) value and
back (not null)SelectModeSingleSelectInputBuilder.ItemSelectModeSingleSelectInputBuilderstatic <T> SelectModeSingleSelectInputBuilder.PropertySelectModeSingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty)
SingleSelect, using given selection Property.create in interface Input<T>T - Value typeselectionProperty - The property to use to represent the selection value (not null)SelectModeSingleSelectInputBuilder.PropertySelectModeSingleSelectInputBuilderPropertyRendererRegistrystatic <T> SelectModeSingleSelectInputBuilder.PropertySelectModeSingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)
SingleSelect, using given selection Property and converter.T - Value typeselectionProperty - The property to use to represent the selection value (not null)itemConverter - The function to use to convert a selection value into the corresponding PropertyBox
itemSelectModeSingleSelectInputBuilder.PropertySelectModeSingleSelectInputBuilderstatic <T> OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,T> options(Class<T> type)
SingleSelect using the options rendering mode, i.e. a radio button
group.
This builder can be used when the selection items type and the selection value type are consistent. Use
options(Class, Class, ItemConverter) if not.
T - Value typetype - Selection value type (not null)OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilderstatic <T,ITEM> OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,ITEM> options(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)
SingleSelect using the options rendering mode, i.e. a radio button
group.
This builder can be used when the selection items type and the selection value type are not consistent (i.e. of
different type). When the the selection item and the selection value types are consistent, the
options(Class) method can be used.
T - Value typeITEM - Item typetype - Selection value type (not null)itemType - Selection items type (not null)itemConverter - The item converter to use to convert a selection item into a selection (Input) value and
back (not null)OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilderstatic <T> OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T> options(com.holonplatform.core.property.Property<T> selectionProperty)
SingleSelect, using given selection Property and the options
rendering mode, i.e. a radio button group.T - Value typeselectionProperty - The property to use to represent the selection value (not null)OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilderstatic <T> OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T> options(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)
SingleSelect, using given selection Property, a converter and the
options rendering mode, i.e. a radio button group.T - Value typeselectionProperty - The property to use to represent the selection value (not null)itemConverter - The function to use to convert a selection value into the corresponding PropertyBox
itemOptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilderCopyright © 2019 The Holon Platform. All rights reserved.