com.vaadin.client.widget.grid.selection.
Class SelectionEvent<T>
- java.lang.Object
-
- com.google.web.bindery.event.shared.Event<H>
-
- com.google.gwt.event.shared.GwtEvent<SelectionHandler>
-
- com.vaadin.client.widget.grid.selection.SelectionEvent<T>
-
Type Parameters:
T
- the type of the items in the Gridpublic class SelectionEvent<T> extends com.google.gwt.event.shared.GwtEvent<SelectionHandler>
Event object describing a change in Grid row selection state.
Since:
7.4
Author:
Vaadin Ltd
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
com.google.gwt.event.shared.GwtEvent.Type<H extends Object>
-
-
Constructor Summary
Constructors Constructor Description SelectionEvent(Grid<T> grid, Collection<T> added, Collection<T> removed, boolean batched)
Creates an event where several rows have been added or removed.
SelectionEvent(Grid<T> grid, T added, T removed, boolean batched)
Creates an event with a single added or removed row.
-
Method Summary
All Methods Modifier and Type Method Description protected void
dispatch(SelectionHandler handler)
Collection<T>
getAdded()
Gets all rows added to the selection since the last
SelectionEvent
.com.google.gwt.event.shared.GwtEvent.Type<SelectionHandler>
getAssociatedType()
Collection<T>
getRemoved()
Gets all rows removed from the selection since the last
SelectionEvent
.Grid<T>
getSource()
Gets a reference to the Grid object that fired this event.
static com.google.gwt.event.shared.GwtEvent.Type<SelectionHandler>
getType()
Gets a type identifier for this event.
boolean
isBatchedSelection()
Checks if this selection change event is fired during a batched selection/deselection operation.
-
-
-
Constructor Detail
-
SelectionEvent
public SelectionEvent(Grid<T> grid, T added, T removed, boolean batched)
Creates an event with a single added or removed row.
Parameters:
grid
- grid reference, used for getSourceadded
- the added row, ornull
if a row was not addedremoved
- the removed row, ornull
if a row was not removedbatched
- whether or not this selection change event is triggered during a batched selection/deselection actionSee Also:
SelectionModel.Multi.Batched
-
SelectionEvent
public SelectionEvent(Grid<T> grid, Collection<T> added, Collection<T> removed, boolean batched)
Creates an event where several rows have been added or removed.
Parameters:
grid
- Grid reference, used for getSourceadded
- a collection of added rows, ornull
if no rows were addedremoved
- a collection of removed rows, ornull
if no rows were removedbatched
- whether or not this selection change event is triggered during a batched selection/deselection actionSee Also:
SelectionModel.Multi.Batched
-
-
Method Detail
-
getSource
public Grid<T> getSource()
Gets a reference to the Grid object that fired this event.
Overrides:
getSource
in classcom.google.gwt.event.shared.GwtEvent<SelectionHandler>
Returns:
a grid reference
-
getAdded
public Collection<T> getAdded()
Gets all rows added to the selection since the last
SelectionEvent
.Returns:
a collection of added rows. Empty collection if no rows were added.
-
getRemoved
public Collection<T> getRemoved()
Gets all rows removed from the selection since the last
SelectionEvent
.Returns:
a collection of removed rows. Empty collection if no rows were removed.
-
getType
public static com.google.gwt.event.shared.GwtEvent.Type<SelectionHandler> getType()
Gets a type identifier for this event.
Returns:
a
GwtEvent.Type
identifier.
-
getAssociatedType
public com.google.gwt.event.shared.GwtEvent.Type<SelectionHandler> getAssociatedType()
Specified by:
getAssociatedType
in classcom.google.gwt.event.shared.GwtEvent<SelectionHandler>
-
dispatch
protected void dispatch(SelectionHandler handler)
Specified by:
dispatch
in classcom.google.gwt.event.shared.GwtEvent<SelectionHandler>
-
isBatchedSelection
public boolean isBatchedSelection()
Checks if this selection change event is fired during a batched selection/deselection operation.
Returns:
true
if this event is fired during a batched selection/deselection operation
-
-