com.vaadin.flow.data.selection.
Interface SelectionEvent<C extends Component,T>
Type Parameters:
T
- the data type of the selection model
C
- the component type
All Superinterfaces:
All Known Implementing Classes:
A selection event that unifies the way to access to selection event for multi selection and single selection components (in case when only one selected item is required).
Since:
1.0
Author:
Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionGets all the currently selected items.
Get first selected data item.
The component on which the Event initially occurred.
boolean
Checks if this event originated from the client side.
-
Method Details
-
getFirstSelectedItem
Get first selected data item.
This is the same as
SingleSelectionEvent.getSelectedItem()
in case of single selection.Returns:
the first selected item.
-
getAllSelectedItems
Gets all the currently selected items.
This method applies more to multiselection - for single select it returns either an empty set or a set containing the only selected item.
Returns:
return all the selected items, if any, never
null
-
getSource
C getSource()The component on which the Event initially occurred.
Returns:
The component on which the Event initially occurred.
-
isFromClient
boolean isFromClient()Checks if this event originated from the client side.
Returns:
true
if the event originated from the client side,false
otherwise
-