com.vaadin.client.ui.grid.selection
Class SelectionChangeEvent<T>

java.lang.Object
  extended by com.google.web.bindery.event.shared.Event<H>
      extended by com.google.gwt.event.shared.GwtEvent<SelectionChangeHandler>
          extended by com.vaadin.client.ui.grid.selection.SelectionChangeEvent<T>

public class SelectionChangeEvent<T>
extends com.google.gwt.event.shared.GwtEvent<SelectionChangeHandler>

Event object describing a change in Grid row selection state.

Since:
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>
 
Constructor Summary
SelectionChangeEvent(Grid<T> grid, java.util.Collection<T> added, java.util.Collection<T> removed, boolean batched)
          Creates an event where several rows have been added or removed.
SelectionChangeEvent(Grid<T> grid, T added, T removed, boolean batched)
          Creates an event with a single added or removed row.
 
Method Summary
protected  void dispatch(SelectionChangeHandler handler)
           
 java.util.Collection<T> getAdded()
          Get all rows added to the selection since the last SelectionChangeEvent.
 com.google.gwt.event.shared.GwtEvent.Type<SelectionChangeHandler> getAssociatedType()
           
 java.util.Collection<T> getRemoved()
          Get all rows removed from the selection since the last SelectionChangeEvent.
 Grid<T> getSource()
          Get a reference to the Grid object that fired this event.
static com.google.gwt.event.shared.GwtEvent.Type<SelectionChangeHandler> getType()
          Gets a type identifier for this event.
 boolean isBatchedSelection()
          Checks if this selection change event is fired during a batched selection/deselection operation.
 
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, isLive, kill, revive
 
Methods inherited from class com.google.web.bindery.event.shared.Event
setSource, toDebugString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectionChangeEvent

public SelectionChangeEvent(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 getSource
added - the added row, or null if a row was not added
removed - the removed row, or null if a row was not removed
batched - whether or not this selection change event is triggered during a batched selection/deselection action
See Also:
SelectionModel.Multi.Batched

SelectionChangeEvent

public SelectionChangeEvent(Grid<T> grid,
                            java.util.Collection<T> added,
                            java.util.Collection<T> removed,
                            boolean batched)
Creates an event where several rows have been added or removed.

Parameters:
grid - Grid reference, used for getSource
added - a collection of added rows, or null if no rows were added
removed - a collection of removed rows, or null if no rows were removed
batched - whether or not this selection change event is triggered during a batched selection/deselection action
See Also:
SelectionModel.Multi.Batched
Method Detail

getSource

public Grid<T> getSource()
Get a reference to the Grid object that fired this event.

Returns:
a grid reference

getAdded

public java.util.Collection<T> getAdded()
Get all rows added to the selection since the last SelectionChangeEvent.

Returns:
a collection of added rows. Empty collection if no rows were added.

getRemoved

public java.util.Collection<T> getRemoved()
Get all rows removed from the selection since the last SelectionChangeEvent.

Returns:
a collection of removed rows. Empty collection if no rows were removed.

getType

public static com.google.gwt.event.shared.GwtEvent.Type<SelectionChangeHandler> getType()
Gets a type identifier for this event.

Returns:
a Type identifier.

getAssociatedType

public com.google.gwt.event.shared.GwtEvent.Type<SelectionChangeHandler> getAssociatedType()
Overrides:
getAssociatedType in class com.google.gwt.event.shared.GwtEvent<SelectionChangeHandler>

dispatch

protected void dispatch(SelectionChangeHandler handler)
Specified by:
dispatch in class com.google.gwt.event.shared.GwtEvent<SelectionChangeHandler>

isBatchedSelection

public boolean isBatchedSelection()
Checks if this selection change event is fired during a batched selection/deselection operation.

Returns:
true iff this event is fired during a batched selection/deselection operation


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.