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
Constructors -
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()voidonColumnSort(ColumnSortEvent event) Called whenColumnSortEventis fired.voidsetComparator(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.HandlerCalled whenColumnSortEventis fired.- Specified by:
onColumnSortin interfaceColumnSortEvent.Handler- Parameters:
event- theColumnSortEventthat was fired
-
setComparator
Set the comparator used to sort the specified column in ascending order.- Parameters:
column- theColumncomparator- theComparatorto use for theColumn
-
setList
-