Package com.inmethod.grid.common
Class GridSortState<S>
- java.lang.Object
-
- com.inmethod.grid.common.GridSortState<S>
-
- All Implemented Interfaces:
IGridSortState<S>,Serializable,IClusterable
public class GridSortState<S> extends Object implements IGridSortState<S>, IClusterable
AnIGridSortStateimplementation.- 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
Constructors Constructor Description GridSortState(AbstractGrid<?,?,S> grid)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearSortState()Resets the entire sort state.voidclearSortState(S propertyName)Clears the sort state for given property.List<IGridSortState.ISortStateColumn<S>>getColumns()Returns allIGridSortState.ISortStateColumninstances in this state.AbstractGrid<?,?,S>getGrid()IGridSortState.ISortStateColumn<S>getSortStateForProperty(S propertyName)Returns theIGridSortState.ISortStateColumnfor given property or null if there is no such entry.voidsetSortState(S propertyName, IGridSortState.Direction direction)Sets the sort direction for given property name.
-
-
-
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 theIGridSortState.ISortStateColumnfor given property or null if there is no such entry.- Parameters:
propertyName-- Returns:
IGridSortState.ISortStateColumnfor 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 allIGridSortState.ISortStateColumninstances in this state.- Specified by:
getColumnsin interfaceIGridSortState<S>- Returns:
- all
IGridSortState.ISortStateColumninstances in this state
-
getGrid
public AbstractGrid<?,?,S> getGrid()
- Specified by:
getGridin interfaceIGridSortState<S>- Returns:
- the related grid, not null
-
-