com.inmethod.grid.common
Class GridSortState

java.lang.Object
  extended by com.inmethod.grid.common.GridSortState
All Implemented Interfaces:
IGridSortState, Serializable, IClusterable

public class GridSortState
extends Object
implements IGridSortState, IClusterable

An IGridSortState implementation.

Author:
Matej Knopp
See Also:
IGridSortState, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.inmethod.grid.IGridSortState
IGridSortState.Direction, IGridSortState.ISortStateColumn
 
Constructor Summary
GridSortState(AbstractGrid<?,?> grid)
          Constructor.
 
Method Summary
 void clearSortState()
          Resets the entire sort state.
 void clearSortState(String propertyName)
          Clears the sort state for given property.
 List<IGridSortState.ISortStateColumn> getColumns()
          Returns all IGridSortState.ISortStateColumn instances in this state.
 AbstractGrid<?,?> getGrid()
           
 IGridSortState.ISortStateColumn getSortStateForProperty(String propertyName)
          Returns the IGridSortState.ISortStateColumn for given property or null if there is no such entry.
 void setSortState(String propertyName, IGridSortState.Direction direction)
          Sets the sort direction for given property name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridSortState

public GridSortState(AbstractGrid<?,?> grid)
Constructor.

Parameters:
grid - the related grid, not null
Method Detail

clearSortState

public void clearSortState()
Resets the entire sort state.


clearSortState

public void clearSortState(String propertyName)
Clears the sort state for given property.

Parameters:
propertyName -

getSortStateForProperty

public IGridSortState.ISortStateColumn getSortStateForProperty(String propertyName)
Returns the IGridSortState.ISortStateColumn for given property or null if there is no such entry.

Parameters:
propertyName -
Returns:
IGridSortState.ISortStateColumn for given property or null if there is no such entry

setSortState

public void setSortState(String propertyName,
                         IGridSortState.Direction direction)
Sets the sort direction for given property name.

Parameters:
propertyName -
direction -

getColumns

public List<IGridSortState.ISortStateColumn> getColumns()
Returns all IGridSortState.ISortStateColumn instances in this state.

Specified by:
getColumns in interface IGridSortState
Returns:
all IGridSortState.ISortStateColumn instances in this state

getGrid

public AbstractGrid<?,?> getGrid()
Specified by:
getGrid in interface IGridSortState
Returns:
the related grid, not null


Copyright © 2007-2012 inMethod s.r.o.. All Rights Reserved.