ColumnSortEvent.ListHandler (GWT Javadoc)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.user.cellview.client
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 java.lang.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
`ColumnSortEvent.ListHandler(java.util.List<T> list)`

Method Summary
`java.util.Comparator<T>` | `getComparator(Column<T,?> column)` Returns the comparator that has been set for the specified column, or null if no comparator has been set.
`java.util.List<T>` | `getList()`
`void` | `onColumnSort(ColumnSortEvent event)` Called when `ColumnSortEvent` is fired.
`void` | `setComparator(Column<T,?> column, java.util.Comparator<T> comparator)` Set the comparator used to sort the specified column in ascending order.
`void` | `setList(java.util.List<T> list)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ColumnSortEvent.ListHandler

    public ColumnSortEvent.ListHandler(java.util.List<T> list)

Method Detail

### getComparator

    public java.util.Comparator<T> getComparator(Column<T,?> column)

  Returns the comparator that has been set for the specified column, or null if no comparator has been set.

  Parameters:
    `column` - the `Column`

### getList

    public java.util.List<T> getList()

### onColumnSort

    public void onColumnSort(ColumnSortEvent event)

  Description copied from interface: `ColumnSortEvent.Handler`
  Called when `ColumnSortEvent` is fired.

  Specified by:
    `onColumnSort` in interface `ColumnSortEvent.Handler`
  Parameters:
    `event` - the `ColumnSortEvent` that was fired

### setComparator

    public void setComparator(Column<T,?> column,
                              java.util.Comparator<T> comparator)

  Set the comparator used to sort the specified column in ascending order.

  Parameters:
    `column` - the `Column`
    `comparator` - the `Comparator` to use for the `Column`

### setList

    public void setList(java.util.List<T> list)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD