Package io.jmix.ui.component
Class Tree.SelectionEvent<E>
java.lang.Object
java.util.EventObject
io.jmix.ui.component.Tree.SelectionEvent<E>
- All Implemented Interfaces:
HasUserOriginated,Serializable
Event sent when the selection changes. It specifies what in a selection has changed, and where the
selection took place.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSelectionEvent(Tree<E> component, Set<E> oldSelection, boolean userOriginated) Constructor for a selection event. -
Method Summary
Modifier and TypeMethodDescriptiongetAdded()ASetof all the items that became selected.ASetof all the items that were selected before the selection was changed.ASetof all the items that became deselected.ASetof all the items that are currently selected.booleanReturns whether this event was triggered by user interaction or programmatically.Methods inherited from class java.util.EventObject
toString
-
Field Details
-
selected
-
oldSelection
-
userOriginated
protected final boolean userOriginated
-
-
Constructor Details
-
SelectionEvent
Constructor for a selection event.- Parameters:
component- the DataGrid from which this event originatesoldSelection- the old set of selected itemsuserOriginated-trueif an event is a result of user interaction,falseif from the API call
-
-
Method Details
-
getSource
- Overrides:
getSourcein classEventObject
-
getAdded
ASetof all the items that became selected. Note: this excludes all items that might have been previously selected.- Returns:
- a set of the items that became selected
-
getRemoved
ASetof all the items that became deselected. Note: this excludes all items that might have been previously deselected.- Returns:
- a set of the items that became deselected
-
getSelected
ASetof all the items that are currently selected.- Returns:
- a set of the items that are currently selected
-
getOldSelection
ASetof all the items that were selected before the selection was changed.- Returns:
- a set of items selected before the selection was changed
-
isUserOriginated
public boolean isUserOriginated()Description copied from interface:HasUserOriginatedReturns whether this event was triggered by user interaction or programmatically.- Specified by:
isUserOriginatedin interfaceHasUserOriginated- Returns:
trueif this event originates by user interaction,falseotherwise.
-