com.vaadin.client.widget.grid.sort
Class Sort

java.lang.Object
  extended by com.vaadin.client.widget.grid.sort.Sort

public class Sort
extends java.lang.Object

Fluid Sort descriptor object.

Since:
7.4
Author:
Vaadin Ltd

Method Summary
 java.util.List<SortOrder> build()
          Build a sort order list.
static Sort by(Grid.Column<?,?> column)
          Start building a Sort order by sorting a provided column in ascending order.
static Sort by(Grid.Column<?,?> column, com.vaadin.shared.data.sort.SortDirection direction)
          Start building a Sort order by sorting a provided column.
 Sort then(Grid.Column<?,?> column)
          Continue building a Sort order.
 Sort then(Grid.Column<?,?> column, com.vaadin.shared.data.sort.SortDirection direction)
          Continue building a Sort order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

by

public static Sort by(Grid.Column<?,?> column)
Start building a Sort order by sorting a provided column in ascending order.

Parameters:
column - a grid column object reference
Returns:
a sort instance, typed to the grid data type

by

public static Sort by(Grid.Column<?,?> column,
                      com.vaadin.shared.data.sort.SortDirection direction)
Start building a Sort order by sorting a provided column.

Parameters:
column - a grid column object reference
direction - indicator of sort direction - either ascending or descending
Returns:
a sort instance, typed to the grid data type

then

public Sort then(Grid.Column<?,?> column)
Continue building a Sort order. The provided column is sorted in ascending order if the previously added columns have been evaluated as equals.

Parameters:
column - a grid column object reference
Returns:
a sort instance, typed to the grid data type

then

public Sort then(Grid.Column<?,?> column,
                 com.vaadin.shared.data.sort.SortDirection direction)
Continue building a Sort order. The provided column is sorted in specified order if the previously added columns have been evaluated as equals.

Parameters:
column - a grid column object reference
direction - indicator of sort direction - either ascending or descending
Returns:
a sort instance, typed to the grid data type

build

public java.util.List<SortOrder> build()
Build a sort order list. This method is called internally by Grid when calling com.vaadin.client.ui.grid.Grid#sort(Sort), but can also be called manually to create a SortOrder list, which can also be provided directly to Grid.

Returns:
a sort order list.


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.