T - Selection item typepublic interface MultiSelect<T> extends Selectable<T>, Input<Set<T>>, ItemSet
Selectable component in which multiple items can be selected at the same time. Selecting an item adds it to
the selection.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 |
|---|---|
void |
deselect(Iterable<T> items)
Removes the given items from the set of currently selected items.
|
default void |
deselect(T... items)
Removes the given items from the set of currently selected items.
|
default void |
deselect(T item)
Deselects the given item.
|
default Optional<T> |
getFirstSelectedItem()
Get the first selected item.
|
default Selectable.SelectionMode |
getSelectionMode()
Get the selection mode
|
static <T> OptionsMultiSelectConfigurator.OptionsMultiSelectInputBuilder<T,T> |
options(Class<T> type)
Gets a builder to create a options
MultiSelect, which uses a CheckboxGroup as input
component. |
static <T,ITEM> OptionsMultiSelectConfigurator.OptionsMultiSelectInputBuilder<T,ITEM> |
options(Class<T> type,
Class<ITEM> itemType,
ItemConverter<T,ITEM> itemConverter)
Gets a builder to create a options
MultiSelect, which uses a CheckboxGroup as input
component. |
static <T> OptionsMultiSelectConfigurator.PropertyOptionsMultiSelectInputBuilder<T> |
options(com.holonplatform.core.property.Property<T> selectionProperty)
Gets a builder to create a
Property model based options MultiSelect, which uses a
CheckboxGroup as input component. |
static <T> OptionsMultiSelectConfigurator.PropertyOptionsMultiSelectInputBuilder<T> |
options(com.holonplatform.core.property.Property<T> selectionProperty,
Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)
Gets a builder to create a
Property model based options MultiSelect, which uses a
CheckboxGroup as input component. |
void |
select(Iterable<T> items)
Adds the given item to the set of currently selected items.
|
default void |
select(T... items)
Adds the given item to the set of currently selected items.
|
default void |
select(T item)
Selects the given item.
|
void |
selectAll()
Selects all available the items.
|
addSelectionListener, deselectAll, getSelectedItems, isSelectedasHasValue, boolean_, builder, builder, create, create, 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, singleSimpleSelect, singleSimpleSelect, singleSimpleSelect, singleSimpleSelect, string, stringAreaaddValueChangeListener, clear, getEmptyValue, getValue, getValueIfPresent, isEmpty, setValuegetValue, hasValueChangeModecreate, getComponent, getElement, hasEnabled, hasLabel, hasSize, hasStyle, hasValidation, isVisible, setVisiblevoid select(Iterable<T> items)
By default this does not clear any previous selection. To do that, use Selectable.deselectAll().
items - Items to select (not null)default void select(T... items)
By default this does not clear any previous selection. To do that, use Selectable.deselectAll().
items - Items to select (not null)void deselect(Iterable<T> items)
items - Items to deselect (not null)default void deselect(T... items)
items - Items to deselect (not null)void selectAll()
default Selectable.SelectionMode getSelectionMode()
SelectablegetSelectionMode in interface Selectable<T>default Optional<T> getFirstSelectedItem()
SelectablegetFirstSelectedItem in interface Selectable<T>default void select(T item)
Selectable
When in Selectable.SelectionMode.SINGLE, any previously selected item is deselected.
select in interface Selectable<T>item - the item to select (not null)default void deselect(T item)
Selectabledeselect in interface Selectable<T>item - the item to deselect (not null)static <T> OptionsMultiSelectConfigurator.OptionsMultiSelectInputBuilder<T,T> options(Class<T> type)
MultiSelect, which uses a CheckboxGroup as input
component.
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)OptionsMultiSelectConfigurator.OptionsMultiSelectInputBuilderstatic <T,ITEM> OptionsMultiSelectConfigurator.OptionsMultiSelectInputBuilder<T,ITEM> options(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)
MultiSelect, which uses a CheckboxGroup as input
component.
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)OptionsMultiSelectConfigurator.OptionsMultiSelectInputBuilderstatic <T> OptionsMultiSelectConfigurator.PropertyOptionsMultiSelectInputBuilder<T> options(com.holonplatform.core.property.Property<T> selectionProperty)
Property model based options MultiSelect, which uses a
CheckboxGroup as input component.T - Value typeselectionProperty - The property to use to represent the selection value (not null)OptionsMultiSelectConfigurator.PropertyOptionsMultiSelectInputBuilderstatic <T> OptionsMultiSelectConfigurator.PropertyOptionsMultiSelectInputBuilder<T> options(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)
Property model based options MultiSelect, which uses a
CheckboxGroup as input component.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
itemOptionsMultiSelectConfigurator.PropertyOptionsMultiSelectInputBuilderCopyright © 2019 The Holon Platform. All rights reserved.