Package com.vaadin.flow.component.grid
Class GridNoneSelectionModel<T>
java.lang.Object
com.vaadin.flow.component.grid.GridNoneSelectionModel<T>
- Type Parameters:
T- the grid bean type
- All Implemented Interfaces:
GridSelectionModel<T>,SelectionModel<Grid<T>,,T> Serializable
Selection model implementation for disabling selection in Grid.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.data.selection.SelectionModel
SelectionModel.Multi<C extends Component,T>, SelectionModel.Single<C extends Component, T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSelectionListener(SelectionListener<Grid<T>, T> listener) Adds a generic listener to this selection model, accepting both single and multiselection events.voidDeselects the given item.voidDeselects all currently selected items, if any.voiddeselectFromClient(T item) Handles the deselection of an item that originates from the client.Get first selected data item.Returns an immutable set of the currently selected items.voidSelects the given item.voidselectFromClient(T item) Handles the selection of an item that originates from the client.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.data.selection.SelectionModel
isSelected
-
Constructor Details
-
GridNoneSelectionModel
public GridNoneSelectionModel()
-
-
Method Details
-
getSelectedItems
Description copied from interface:SelectionModelReturns an immutable set of the currently selected items. It is safe to invoke otherSelectionModelmethods while iterating over the set.Implementation note: the iteration order of the items in the returned set should be well-defined and documented by the implementing class.
- Specified by:
getSelectedItemsin interfaceSelectionModel<Grid<T>,T> - Returns:
- the items in the current selection, not null
-
getFirstSelectedItem
Description copied from interface:SelectionModelGet first selected data item.This is the same as
SelectionModel.Single.getSelectedItem()in case of single selection and the first selected item fromSelectionModel.getSelectedItems()in case of multiselection.- Specified by:
getFirstSelectedItemin interfaceSelectionModel<Grid<T>,T> - Returns:
- the first selected item.
-
select
Description copied from interface:SelectionModelSelects the given item. Depending on the implementation, may cause other items to be deselected. If the item is already selected, does nothing.- Specified by:
selectin interfaceSelectionModel<Grid<T>,T> - Parameters:
item- the item to select, not null
-
deselect
Description copied from interface:SelectionModelDeselects the given item. If the item is not currently selected, does nothing.- Specified by:
deselectin interfaceSelectionModel<Grid<T>,T> - Parameters:
item- the item to deselect, not null
-
deselectAll
public void deselectAll()Description copied from interface:SelectionModelDeselects all currently selected items, if any.- Specified by:
deselectAllin interfaceSelectionModel<Grid<T>,T>
-
selectFromClient
Description copied from interface:GridSelectionModelHandles the selection of an item that originates from the client.- Specified by:
selectFromClientin interfaceGridSelectionModel<T>- Parameters:
item- the item being selected
-
deselectFromClient
Description copied from interface:GridSelectionModelHandles the deselection of an item that originates from the client.- Specified by:
deselectFromClientin interfaceGridSelectionModel<T>- Parameters:
item- the item being deselected
-
addSelectionListener
Description copied from interface:SelectionModelAdds a generic listener to this selection model, accepting both single and multiselection events.- Specified by:
addSelectionListenerin interfaceSelectionModel<Grid<T>,T> - Parameters:
listener- the listener to add, notnull- Returns:
- a registration handle for removing the listener
-