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
Modifier and TypeFieldDescriptionprotected final boolean
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionSelectionEvent
(Tree<E> component, Set<E> oldSelection, boolean userOriginated) Constructor for a selection event. -
Method Summary
Modifier and TypeMethodDescriptiongetAdded()
ASet
of all the items that became selected.ASet
of all the items that were selected before the selection was changed.ASet
of all the items that became deselected.ASet
of all the items that are currently selected.boolean
Returns 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
-true
if an event is a result of user interaction,false
if from the API call
-
-
Method Details
-
getSource
- Overrides:
getSource
in classEventObject
-
getAdded
ASet
of 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
ASet
of 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
ASet
of all the items that are currently selected.- Returns:
- a set of the items that are currently selected
-
getOldSelection
ASet
of 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:HasUserOriginated
Returns whether this event was triggered by user interaction or programmatically.- Specified by:
isUserOriginated
in interfaceHasUserOriginated
- Returns:
true
if this event originates by user interaction,false
otherwise.
-