public class SortModelFixture extends Object implements ISortModel
Constructor and Description |
---|
SortModelFixture() |
SortModelFixture(List<Integer> sortedColumnIndexes,
List<Integer> sortOrder,
List<SortDirectionEnum> sortDirection) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all sorting
|
List<Comparator> |
getComparatorsForColumnIndex(int columnIndex) |
static SortModelFixture |
getEmptyModel() |
SortDirectionEnum |
getSortDirection(int columnIndex) |
List<Integer> |
getSortedColumnIndexes() |
int |
getSortOrder(int columnIndex) |
boolean |
isColumnIndexSorted(int columnIndex) |
void |
sort(int columnIndex,
SortDirectionEnum direction,
boolean accumulate)
This method is called by the
SortCommandHandler in response to a sort command. |
public static SortModelFixture getEmptyModel()
public List<Integer> getSortedColumnIndexes()
getSortedColumnIndexes
in interface ISortModel
public boolean isColumnIndexSorted(int columnIndex)
isColumnIndexSorted
in interface ISortModel
public int getSortOrder(int columnIndex)
getSortOrder
in interface ISortModel
Example: If column indexes 3, 6, 9 are sorted (in that order) the sort order for index 6 is 1.
public SortDirectionEnum getSortDirection(int columnIndex)
getSortDirection
in interface ISortModel
public List<Comparator> getComparatorsForColumnIndex(int columnIndex)
getComparatorsForColumnIndex
in interface ISortModel
public void sort(int columnIndex, SortDirectionEnum direction, boolean accumulate)
ISortModel
SortCommandHandler
in response to a sort command.
It is responsible for sorting the requested column.sort
in interface ISortModel
accumulate
- flag indicating if the column should added to a previous sort.public void clear()
ISortModel
clear
in interface ISortModel
Copyright © 2013. All Rights Reserved.