public class ViewerComparator extends ViewerSorter implements IViewerComparator
CommonViewerEx
.Constructor and Description |
---|
ViewerComparator()
Creates a new
ViewerComparator , which uses the default comparator
to sort strings. |
Modifier and Type | Method and Description |
---|---|
int |
category(Object element)
Returns the category of the given element.
|
int |
compare(Viewer viewer,
Object e1,
Object e2)
Returns a negative, zero, or positive number depending on whether the first
element is less than, equal to, or greater than the second element.
|
boolean |
getReverseSortOrdering()
Get reverse ordering flag.
|
boolean |
getSortByCategory()
Gets sorting by category.
|
void |
setReverseSortOrdering(boolean on)
Sets reverse ordering.
|
void |
setSortByCategory(boolean on)
Sets sorting by category.
|
getCollator
getComparator, isSorterProperty, sort
public ViewerComparator()
ViewerComparator
, which uses the default comparator
to sort strings.public void setSortByCategory(boolean on)
public boolean getSortByCategory()
public void setReverseSortOrdering(boolean on)
public boolean getReverseSortOrdering()
public int category(Object element)
category
in class ViewerComparator
element
- the element.public int compare(Viewer viewer, Object e1, Object e2)
compare
in interface IViewerComparator
compare
in class ViewerComparator
viewer
- The viewer.e1
- The first elemente2
- The second element.0
if the first element is equal to
the second element; and a positive number if the first element is
greater than the second element.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.