org.softevo.ample.ui
Class AbstractSorter
java.lang.Object
org.eclipse.jface.viewers.ViewerSorter
org.softevo.ample.ui.AbstractSorter
- Direct Known Subclasses:
- PatternSorter, RankingSorter
public abstract class AbstractSorter
- extends org.eclipse.jface.viewers.ViewerSorter
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter |
collator |
Method Summary |
protected abstract int |
compare(java.lang.Object first,
java.lang.Object second)
|
int |
compare(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object first,
java.lang.Object second)
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 |
getAscending()
|
int |
getMode()
|
void |
setAscending(boolean ascending)
|
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter |
category, getCollator, isSorterProperty, sort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ascending
protected int ascending
mode
protected int mode
AbstractSorter
public AbstractSorter(boolean ascending,
int mode)
setAscending
public void setAscending(boolean ascending)
compare
public final int compare(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object first,
java.lang.Object second)
- Returns a negative, zero, or positive number depending on whether the first element is less than, equal to, or
greater than the second element.
- Overrides:
compare
in class org.eclipse.jface.viewers.ViewerSorter
- Parameters:
viewer
- The owner viewer.first
- The first element.second
- The second element.
- Returns:
- A negative number if the first element is less than the second element; the value
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.
compare
protected abstract int compare(java.lang.Object first,
java.lang.Object second)
getAscending
public boolean getAscending()
getMode
public int getMode()