|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.viewers.ViewerComparator
org.eclipse.jface.viewers.ViewerSorter
org.eclipse.mylar.internal.monitor.reports.InteractionEventSummarySorter
public class InteractionEventSummarySorter
Sorts SingleSummary objects based on type, id, name, or usage count.
Field Summary | |
---|---|
private int |
criteria
|
static int |
ID
|
static int |
NAME
|
static int |
TYPE
Constructor argument values that indicate to sort items by different columns. |
static int |
USAGE_COUNT
|
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter |
---|
collator |
Constructor Summary | |
---|---|
InteractionEventSummarySorter(int criteria)
Creates a resource sorter that will use the given sort criteria. |
Method Summary | |
---|---|
int |
compare(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object obj1,
java.lang.Object obj2)
|
protected int |
compareNames(InteractionEventSummary summary1,
InteractionEventSummary summary2)
Returns a number reflecting the collation order of the given summaries based on their names. |
protected int |
compareTypes(InteractionEventSummary summary1,
InteractionEventSummary summary2)
Returns a number reflecting the collation order of the given summaries based on their types. |
private int |
compareUsageCount(InteractionEventSummary summary1,
InteractionEventSummary summary2)
Returns a number reflecting the collation order of the given summaries based on their usage count. |
int |
getCriteria()
Returns the sort criteria of this this sorter. |
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter |
---|
getCollator, getComparator |
Methods inherited from class org.eclipse.jface.viewers.ViewerComparator |
---|
category, isSorterProperty, sort |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE
public static final int ID
public static final int NAME
public static final int USAGE_COUNT
private int criteria
Constructor Detail |
---|
public InteractionEventSummarySorter(int criteria)
criteria
- the sort criterion to use: one of NAME
or
TYPE
Method Detail |
---|
public int compare(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object obj1, java.lang.Object obj2)
compare
in class org.eclipse.jface.viewers.ViewerComparator
private int compareUsageCount(InteractionEventSummary summary1, InteractionEventSummary summary2)
summary1
- summary2
-
0
if the first element is equal
to the second element; and a positive number if the first element
is greater than the second elementprotected int compareNames(InteractionEventSummary summary1, InteractionEventSummary summary2)
summary1
- the first task element to be orderedsummary2
- the second task element to be ordered
0
if the first element is equal
to the second element; and a positive number if the first element
is greater than the second elementprotected int compareTypes(InteractionEventSummary summary1, InteractionEventSummary summary2)
summary1
- the first task element to be orderedsummary2
- the second task element to be ordered
0
if the first element is equal
to the second element; and a positive number if the first element
is greater than the second elementpublic int getCriteria()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |