Class ColumnSortEvent
- java.lang.Object
-
- com.google.web.bindery.event.shared.Event<H>
-
- com.google.gwt.event.shared.GwtEvent<ColumnSortEvent.Handler>
-
- com.google.gwt.user.cellview.client.ColumnSortEvent
-
public class ColumnSortEvent extends GwtEvent<ColumnSortEvent.Handler>
Represents a column sort event.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ColumnSortEvent.AsyncHandler
A default handler used with views attached to asynchronous data providers such asAsyncDataProvider
.static interface
ColumnSortEvent.Handler
Handler forColumnSortEvent
.static class
ColumnSortEvent.ListHandler<T>
A default handler used to sort aList
backing a table.-
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
GwtEvent.Type<H>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ColumnSortEvent(ColumnSortList sortList)
Construct a newColumnSortEvent
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dispatch(ColumnSortEvent.Handler handler)
Should only be called byHandlerManager
.static ColumnSortEvent
fire(HasHandlers source, ColumnSortList sortList)
Fires a column sort event on all registered handlers in the handler manager.GwtEvent.Type<ColumnSortEvent.Handler>
getAssociatedType()
Returns theEvent.Type
used to register this event, allowing anEventBus
to find handlers of the appropriate class.Column<?,?>
getColumn()
Get theColumn
that was sorted.ColumnSortList
getColumnSortList()
Get theColumnSortList
that contains the ordered list of sorted columns.static GwtEvent.Type<ColumnSortEvent.Handler>
getType()
Gets the type associated with this event.boolean
isSortAscending()
Check if theColumn
is sorted in ascending order.-
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, getSource, isLive, kill, revive
-
Methods inherited from class com.google.web.bindery.event.shared.Event
setSource, toDebugString, toString
-
-
-
-
Constructor Detail
-
ColumnSortEvent
protected ColumnSortEvent(ColumnSortList sortList)
Construct a newColumnSortEvent
.- Parameters:
sortList
- theColumnSortList
-
-
Method Detail
-
fire
public static ColumnSortEvent fire(HasHandlers source, ColumnSortList sortList)
Fires a column sort event on all registered handlers in the handler manager. If no such handlers exist, this implementation will do nothing.- Parameters:
source
- the source of the eventsortList
- theColumnSortList
of sorted columns- Returns:
- the
ColumnSortEvent
that was fired
-
getType
public static GwtEvent.Type<ColumnSortEvent.Handler> getType()
Gets the type associated with this event.- Returns:
- returns the handler type
-
getAssociatedType
public GwtEvent.Type<ColumnSortEvent.Handler> getAssociatedType()
Description copied from class:Event
Returns theEvent.Type
used to register this event, allowing anEventBus
to find handlers of the appropriate class.- Specified by:
getAssociatedType
in classGwtEvent<ColumnSortEvent.Handler>
- Returns:
- the type
-
getColumn
public Column<?,?> getColumn()
Get theColumn
that was sorted.- Returns:
- the sorted
Column
, or null if not sorted
-
getColumnSortList
public ColumnSortList getColumnSortList()
Get theColumnSortList
that contains the ordered list of sorted columns.- Returns:
- the
ColumnSortList
-
isSortAscending
public boolean isSortAscending()
Check if theColumn
is sorted in ascending order.- Returns:
- true if ascending, false if descending or not sorted
-
dispatch
protected void dispatch(ColumnSortEvent.Handler handler)
Description copied from class:GwtEvent
Should only be called byHandlerManager
. In other words, do not use or call.- Specified by:
dispatch
in classGwtEvent<ColumnSortEvent.Handler>
- Parameters:
handler
- handler- See Also:
EventBus.dispatchEvent(Event, Object)
-
-