T - Grid row data typepublic class ListSorter<T> extends Object
ListDataSource in-memory
data source.| Constructor and Description |
|---|
ListSorter(Grid<T> grid) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearComparators()
Remove all comparator mappings.
|
<C> Comparator<C> |
getComparator(Grid.Column<C,T> column)
Retrieve the comparator assigned for a specific grid column.
|
void |
removeFromGrid()
Detach this Sorter from the Grid.
|
<C> void |
setComparator(Grid.Column<C,T> column,
Comparator<C> comparator)
Assign or remove a comparator for a column.
|
public void removeFromGrid()
public <C> void setComparator(Grid.Column<C,T> column, Comparator<C> comparator)
column - a grid column. May not be null.comparator - comparator method for the values returned by the grid column.
If null, any existing comparator is removed.public <C> Comparator<C> getComparator(Grid.Column<C,T> column)
column - a grid column. May not be null.public void clearComparators()
Copyright © 2016 Vaadin Ltd. All rights reserved.