com.inmethod.grid.common
Class GridSortState<S>

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

public class GridSortState<S>
extends Object
implements IGridSortState<S>, 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<S>
 
Constructor Summary
GridSortState(AbstractGrid<?,?,S> grid)
          Constructor.
 
Method Summary
 void clearSortState()
          Resets the entire sort state.
 void clearSortState(S propertyName)
          Clears the sort state for given property.
 List<IGridSortState.ISortStateColumn<S>> getColumns()
          Returns all IGridSortState.ISortStateColumn instances in this state.
 AbstractGrid<?,?,S> getGrid()
           
 IGridSortState.ISortStateColumn<S> getSortStateForProperty(S propertyName)
          Returns the IGridSortState.ISortStateColumn for given property or null if there is no such entry.
 void setSortState(S 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<?,?,S> grid)
Constructor.

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

clearSortState

public void clearSortState()
Resets the entire sort state.


clearSortState

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

Parameters:
propertyName -

getSortStateForProperty

public IGridSortState.ISortStateColumn<S> getSortStateForProperty(S 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(S propertyName,
                         IGridSortState.Direction direction)
Sets the sort direction for given property name.

Parameters:
propertyName -
direction -

getColumns

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

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

getGrid

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


Copyright © 2007–2014 inMethod s.r.o.. All rights reserved.