com.holonplatform.vaadin.components

## Interface MultiSelect<T>

- Type Parameters:
    `T` - Selection item type
  All Superinterfaces:
    HasComponent, Input<Set<T>>, ItemSet, Selectable<T>, Serializable, ValueComponent<Set<T>>, ValueHolder<Set<T>>, ValueHolder.MaySupportValueChangeMode

      public interface MultiSelect<T>
      extends Selectable<T>, Input<Set<T>>, ItemSet

  A `Selectable` component in which multiple items can be selected at the same time. Selecting an item adds it to the selection.
  Since:
    5.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.components.Selectable

      `Selectable.SelectionEvent<T>, Selectable.SelectionListener<T>, Selectable.SelectionMode`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.components.Input

      `Input.InputFieldPropertyRenderer<T,F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component>, Input.InputPropertyRenderer<T>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.components.ValueHolder

      `ValueHolder.MaySupportValueChangeMode, ValueHolder.ValueChangeEvent<V>, ValueHolder.ValueChangeListener<V>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.components.ItemSet

      `ItemSet.ItemCaptionGenerator<ITEM>, ItemSet.ItemDescriptionGenerator<ITEM>, ItemSet.ItemIconGenerator<ITEM>`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> MultiSelectInputBuilder.GenericMultiSelectInputBuilder<T>` | `builder(Class<? extends T> type, BaseSelectInputBuilder.RenderingMode renderingMode)` Gets a builder to create a `MultiSelect`.
    `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> BaseSelectModeMultiSelectInputBuilder.SelectModeMultiSelectInputBuilder<T>` | `list(Class<? extends T> type)` Gets a builder to create a `MultiSelect` using `BaseSelectInputBuilder.RenderingMode.SELECT`.
    `static <T> BaseSelectModeMultiPropertySelectInputBuilder.SelectModeMultiPropertySelectInputBuilder<T>` | `list(com.holonplatform.core.property.Property<T> selectProperty)` Gets a builder to create a `MultiSelect` with a `PropertyBox` items data source with `Property` as item properties using `BaseSelectInputBuilder.RenderingMode.SELECT`.
    `static <T> BaseSelectModeMultiSelectInputBuilder.OptionsModeMultiSelectInputBuilder<T>` | `options(Class<? extends T> type)` Gets a builder to create a `MultiSelect` using `BaseSelectInputBuilder.RenderingMode.OPTIONS`.
    `static <T> BaseSelectModeMultiPropertySelectInputBuilder.OptionsModeMultiPropertySelectInputBuilder<T>` | `options(com.holonplatform.core.property.Property<T> selectProperty)` Gets a builder to create a `MultiSelect` with a `PropertyBox` items data source with `Property` as item properties using `BaseSelectInputBuilder.RenderingMode.OPTIONS`.
    `static <T> MultiPropertySelectInputBuilder.GenericMultiPropertySelectInputBuilder<T>` | `property(com.holonplatform.core.property.Property<T> selectProperty, BaseSelectInputBuilder.RenderingMode renderingMode)` Gets a builder to create a `MultiSelect` with a `PropertyBox` items data source with `Property` as item properties.
    `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.

    - ### Methods inherited from interface com.holonplatform.vaadin.components.Selectable

      `addSelectionListener, deselectAll, getSelectedItems, isSelected`

    - ### Methods inherited from interface com.holonplatform.vaadin.components.Input

      `focus, from, from, from, from, from, getValueChangeMode, getValueChangeTimeout, isReadOnly, isRequired, isValueChangeModeSupported, setReadOnly, setRequired, setValueChangeMode, setValueChangeTimeout`

    - ### Methods inherited from interface com.holonplatform.vaadin.components.ValueHolder

      `addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, getValueIfPresent, isEmpty, setValue`

    - ### Methods inherited from interface com.holonplatform.vaadin.components.ValueComponent

      `getValue`

    - ### Methods inherited from interface com.holonplatform.vaadin.components.HasComponent

      `getComponent`

    - ### Methods inherited from interface com.holonplatform.vaadin.components.ItemSet

      `refresh`

- - ### Method Detail

    - #### select

          void select(Iterable<T> items)

      Adds the given item to the set of currently selected items.

      By default this does not clear any previous selection. To do that, use `Selectable.deselectAll()`.

      Parameters:
        `items` - Items to select (not null)

    - #### select

          default void select(T... items)

      Adds the given item to the set of currently selected items.

      By default this does not clear any previous selection. To do that, use `Selectable.deselectAll()`.

      Parameters:
        `items` - Items to select (not null)

    - #### deselect

          void deselect(Iterable<T> items)

      Removes the given items from the set of currently selected items.
      Parameters:
        `items` - Items to deselect (not null)

    - #### deselect

          default void deselect(T... items)

      Removes the given items from the set of currently selected items.
      Parameters:
        `items` - Items to deselect (not null)

    - #### selectAll

          void selectAll()

      Selects all available the items.

    - #### getSelectionMode

          default Selectable.SelectionMode getSelectionMode()

      Description copied from interface: `Selectable`
      Get the selection mode
      Specified by:
        `getSelectionMode` in interface `Selectable<T>`
      Returns:
        the selection mode

    - #### getFirstSelectedItem

          default Optional<T> getFirstSelectedItem()

      Description copied from interface: `Selectable`
      Get the first selected item.
      Specified by:
        `getFirstSelectedItem` in interface `Selectable<T>`
      Returns:
        the first selected item, empty if none

    - #### select

          default void select(T item)

      Description copied from interface: `Selectable`
      Selects the given item. If the item is already selected, does nothing.

      When in `Selectable.SelectionMode.SINGLE`, any previously selected item is deselected.

      Specified by:
        `select` in interface `Selectable<T>`
      Parameters:
        `item` - the item to select (not null)

    - #### deselect

          default void deselect(T item)

      Description copied from interface: `Selectable`
      Deselects the given item. If the item is not currently selected, does nothing.
      Specified by:
        `deselect` in interface `Selectable<T>`
      Parameters:
        `item` - the item to deselect (not null)

    - #### builder

          static <T> MultiSelectInputBuilder.GenericMultiSelectInputBuilder<T> builder(Class<? extends T> type,
                                                                                       BaseSelectInputBuilder.RenderingMode renderingMode)

      Gets a builder to create a `MultiSelect`.
      Type Parameters:
        `T` - Selection value type
      Parameters:
        `type` - Selection value type
        `renderingMode` - Rendering mode
      Returns:
        `MultiSelect` builder

    - #### options

          static <T> BaseSelectModeMultiSelectInputBuilder.OptionsModeMultiSelectInputBuilder<T> options(Class<? extends T> type)

      Gets a builder to create a `MultiSelect` using `BaseSelectInputBuilder.RenderingMode.OPTIONS`.
      Type Parameters:
        `T` - Selection value type
      Parameters:
        `type` - Selection value type
      Returns:
        `MultiSelect` builder

    - #### list

          static <T> BaseSelectModeMultiSelectInputBuilder.SelectModeMultiSelectInputBuilder<T> list(Class<? extends T> type)

      Gets a builder to create a `MultiSelect` using `BaseSelectInputBuilder.RenderingMode.SELECT`.
      Type Parameters:
        `T` - Selection value type
      Parameters:
        `type` - Selection value type
      Returns:
        `MultiSelect` builder

    - #### property

          static <T> MultiPropertySelectInputBuilder.GenericMultiPropertySelectInputBuilder<T> property(com.holonplatform.core.property.Property<T> selectProperty,
                                                                                                        BaseSelectInputBuilder.RenderingMode renderingMode)

      Gets a builder to create a `MultiSelect` with a `PropertyBox` items data source with `Property` as item properties.
      Type Parameters:
        `T` - Selection value type
      Parameters:
        `selectProperty` - Property to select (not null)
        `renderingMode` - Rendering mode
      Returns:
        `MultiSelect` builder

    - #### options

          static <T> BaseSelectModeMultiPropertySelectInputBuilder.OptionsModeMultiPropertySelectInputBuilder<T> options(com.holonplatform.core.property.Property<T> selectProperty)

      Gets a builder to create a `MultiSelect` with a `PropertyBox` items data source with `Property` as item properties using `BaseSelectInputBuilder.RenderingMode.OPTIONS`.
      Type Parameters:
        `T` - Selection value type
      Parameters:
        `selectProperty` - Property to select (not null)
      Returns:
        `MultiSelect` builder

    - #### list

          static <T> BaseSelectModeMultiPropertySelectInputBuilder.SelectModeMultiPropertySelectInputBuilder<T> list(com.holonplatform.core.property.Property<T> selectProperty)

      Gets a builder to create a `MultiSelect` with a `PropertyBox` items data source with `Property` as item properties using `BaseSelectInputBuilder.RenderingMode.SELECT`.
      Type Parameters:
        `T` - Selection value type
      Parameters:
        `selectProperty` - Property to select (not null)
      Returns:
        `MultiSelect` builder

Copyright © 2019 The Holon Platform. All rights reserved.