Class ColumnSortEvent.ListHandler<T>
java.lang.Object
com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler<T>
- Type Parameters:
T
- the data type of the list
- All Implemented Interfaces:
EventHandler
,ColumnSortEvent.Handler
- Enclosing class:
ColumnSortEvent
public static class ColumnSortEvent.ListHandler<T>
extends Object
implements ColumnSortEvent.Handler
A default handler used to sort a List
backing a table. If the
sorted column has an associated Comparator
, the list is sorted
using the comparator.
This can be used in conjunction with
ListDataProvider
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetComparator
(Column<T, ?> column) Returns the comparator that has been set for the specified column, or null if no comparator has been set.getList()
void
onColumnSort
(ColumnSortEvent event) Called whenColumnSortEvent
is fired.void
setComparator
(Column<T, ?> column, Comparator<T> comparator) Set the comparator used to sort the specified column in ascending order.void
-
Constructor Details
-
ListHandler
-
-
Method Details
-
getComparator
Returns the comparator that has been set for the specified column, or null if no comparator has been set.- Parameters:
column
- theColumn
-
getList
-
onColumnSort
Description copied from interface:ColumnSortEvent.Handler
Called whenColumnSortEvent
is fired.- Specified by:
onColumnSort
in interfaceColumnSortEvent.Handler
- Parameters:
event
- theColumnSortEvent
that was fired
-
setComparator
Set the comparator used to sort the specified column in ascending order.- Parameters:
column
- theColumn
comparator
- theComparator
to use for theColumn
-
setList
-