public class GlazedListsSortModel<T> extends Object implements ISortModel, ILayerListener
Modifier and Type | Field and Description |
---|---|
protected IColumnAccessor<T> |
columnAccessor |
protected ILayer |
columnHeaderDataLayer |
protected IColumnPropertyResolver |
columnPropertyResolver |
protected IConfigRegistry |
configRegistry |
protected ca.odell.glazedlists.SortedList<T> |
sortedList |
Constructor and Description |
---|
GlazedListsSortModel(ca.odell.glazedlists.SortedList<T> sortedList,
IColumnAccessor<T> columnAccessor,
IColumnPropertyResolver columnPropertyResolver,
IConfigRegistry configRegistry,
ILayer dataLayer) |
GlazedListsSortModel(ca.odell.glazedlists.SortedList<T> sortedList,
IColumnPropertyAccessor<T> columnPropertyAccessor,
IConfigRegistry configRegistry,
ILayer dataLayer) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all sorting
|
protected NatTableComparatorChooser<T> |
getComparatorChooser() |
List<Comparator> |
getComparatorsForColumnIndex(int columnIndex) |
SortDirectionEnum |
getSortDirection(int columnIndex) |
List<Integer> |
getSortedColumnIndexes() |
int |
getSortOrder(int columnIndex) |
void |
handleLayerEvent(ILayerEvent event)
Handle an event notification from an
ILayer |
boolean |
isColumnIndexSorted(int columnIndex) |
void |
sort(int columnIndex,
SortDirectionEnum sortDirection,
boolean accumulate)
This method is called by the
SortCommandHandler in response to a sort command. |
protected final ca.odell.glazedlists.SortedList<T> sortedList
protected final IColumnAccessor<T> columnAccessor
protected final IColumnPropertyResolver columnPropertyResolver
protected final IConfigRegistry configRegistry
protected final ILayer columnHeaderDataLayer
public GlazedListsSortModel(ca.odell.glazedlists.SortedList<T> sortedList, IColumnPropertyAccessor<T> columnPropertyAccessor, IConfigRegistry configRegistry, ILayer dataLayer)
public GlazedListsSortModel(ca.odell.glazedlists.SortedList<T> sortedList, IColumnAccessor<T> columnAccessor, IColumnPropertyResolver columnPropertyResolver, IConfigRegistry configRegistry, ILayer dataLayer)
protected NatTableComparatorChooser<T> getComparatorChooser()
public List<Integer> getSortedColumnIndexes()
getSortedColumnIndexes
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 boolean isColumnIndexSorted(int columnIndex)
isColumnIndexSorted
in interface ISortModel
public List<Comparator> getComparatorsForColumnIndex(int columnIndex)
getComparatorsForColumnIndex
in interface ISortModel
public void sort(int columnIndex, SortDirectionEnum sortDirection, 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
public void handleLayerEvent(ILayerEvent event)
ILayerListener
ILayer
handleLayerEvent
in interface ILayerListener
event
- the eventCopyright © 2013. All Rights Reserved.