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

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

public class SortOrder
extends java.lang.Object

Sort order descriptor. Contains column and direction references.

Since:
7.4
Author:
Vaadin Ltd

Constructor Summary
SortOrder(Grid.Column<?,?> column)
          Create a sort order descriptor with a default sorting direction value of SortDirection.ASCENDING.
SortOrder(Grid.Column<?,?> column, com.vaadin.shared.data.sort.SortDirection direction)
          Create a sort order descriptor.
 
Method Summary
 Grid.Column<?,?> getColumn()
          Returns the GridColumn reference given in the constructor.
 com.vaadin.shared.data.sort.SortDirection getDirection()
          Returns the SortDirection value given in the constructor.
 SortOrder getOpposite()
          Returns a new SortOrder object with the sort direction reversed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortOrder

public SortOrder(Grid.Column<?,?> column)
Create a sort order descriptor with a default sorting direction value of SortDirection.ASCENDING.

Parameters:
column - a grid column descriptor object

SortOrder

public SortOrder(Grid.Column<?,?> column,
                 com.vaadin.shared.data.sort.SortDirection direction)
Create a sort order descriptor.

Parameters:
column - a grid column descriptor object
direction - a sorting direction value (ascending or descending)
Method Detail

getColumn

public Grid.Column<?,?> getColumn()
Returns the GridColumn reference given in the constructor.

Returns:
a grid column reference

getDirection

public com.vaadin.shared.data.sort.SortDirection getDirection()
Returns the SortDirection value given in the constructor.

Returns:
a sort direction value

getOpposite

public SortOrder getOpposite()
Returns a new SortOrder object with the sort direction reversed.

Returns:
a new sort order object


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