Interface SelectionModel.Multi<C extends Component,​T>

    • Method Detail

      • select

        default void select​(T item)
        Adds the given item to the set of currently selected items.

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

        If the item was already selected, this is a NO-OP.

        Specified by:
        select in interface SelectionModel<C extends Component,​T>
        Parameters:
        item - the item to add to selection, not null
      • selectItems

        default void selectItems​(T... items)
        Adds the given items to the set of currently selected items.

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

        If the all the items were already selected, this is a NO-OP.

        This is a short-hand for updateSelection(Set, Set) with nothing to deselect.

        Parameters:
        items - to add to selection, not null
      • deselect

        default void deselect​(T item)
        Description copied from interface: SelectionModel
        Deselects the given item. If the item is not currently selected, does nothing.
        Specified by:
        deselect in interface SelectionModel<C extends Component,​T>
        Parameters:
        item - the item to deselect, not null
      • deselectItems

        default void deselectItems​(T... items)
        Removes the given items from the set of currently selected items.

        If the none of the items were selected, this is a NO-OP.

        This is a short-hand for updateSelection(Set, Set) with nothing to select.

        Parameters:
        items - to remove from selection, not null
      • updateSelection

        void updateSelection​(Set<T> addedItems,
                             Set<T> removedItems)
        Updates the selection by adding and removing the given items from it.

        If all the added items were already selected and the removed items were not selected, this is a NO-OP.

        Duplicate items (in both add & remove sets) are ignored.

        Parameters:
        addedItems - the items to add, not null
        removedItems - the items to remove, not null
      • selectAll

        void selectAll()
        Selects all available the items.