com.vaadin.client.widget.grid.sort
Class SortEvent<T>

java.lang.Object
  extended by com.google.web.bindery.event.shared.Event<H>
      extended by com.google.gwt.event.shared.GwtEvent<SortHandler<?>>
          extended by com.vaadin.client.widget.grid.sort.SortEvent<T>

public class SortEvent<T>
extends com.google.gwt.event.shared.GwtEvent<SortHandler<?>>

A sort event, fired by the Grid when it needs its data source to provide data sorted in a specific manner.

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>
 
Constructor Summary
SortEvent(Grid<T> grid, java.util.List<SortOrder> order, boolean userOriginated)
          Creates a new Sort Event.
 
Method Summary
protected  void dispatch(SortHandler<?> handler)
           
 com.google.gwt.event.shared.GwtEvent.Type<SortHandler<?>> getAssociatedType()
           
 Grid<T> getGrid()
          Get access to the Grid that fired this event
 java.util.List<SortOrder> getOrder()
          Get the sort ordering that is to be applied to the Grid
 Grid<T> getSource()
          Get access to the Grid that fired this event
static com.google.gwt.event.shared.GwtEvent.Type<SortHandler<?>> getType()
          Static access to the GWT event type identifier associated with this Event class
 boolean isUserOriginated()
          Returns whether this event originated from actions done by the user.
 
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

SortEvent

public SortEvent(Grid<T> grid,
                 java.util.List<SortOrder> order,
                 boolean userOriginated)
Creates a new Sort Event. All provided parameters are final, and passed on as-is.

Parameters:
grid - a grid reference
order - an array dictating the desired sort order of the data source
originator - a value indicating where this event originated from
Method Detail

getAssociatedType

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

getType

public static com.google.gwt.event.shared.GwtEvent.Type<SortHandler<?>> getType()
Static access to the GWT event type identifier associated with this Event class

Returns:
a type object, uniquely describing this event type.

getSource

public Grid<T> getSource()
Get access to the Grid that fired this event

Returns:
the grid instance

getGrid

public Grid<T> getGrid()
Get access to the Grid that fired this event

Returns:
the grid instance

getOrder

public java.util.List<SortOrder> getOrder()
Get the sort ordering that is to be applied to the Grid

Returns:
a list of sort order objects

isUserOriginated

public boolean isUserOriginated()
Returns whether this event originated from actions done by the user.

Returns:
true if sort event originated from user interaction

dispatch

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


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