|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IIssuesViewSorter
Interface for a sorting strategy for sorting and expanding elements/branches in the issues view.
Method Summary | |
---|---|
int |
category(ViewerSorter defaultSorter,
java.lang.Object element)
Returns the category of the given element. |
int |
compare(Viewer viewer,
ViewerSorter defaultSorter,
Column selectedColumn,
boolean direction,
java.lang.Object e1,
java.lang.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. |
java.lang.String |
getExtensionID()
Returns the extension id so that the system can instantiate the sorter again in the future after the workbench has been shutdown. |
boolean |
isSorterProperty(ViewerSorter defaultSorter,
java.lang.Object element,
java.lang.String property)
Returns whether this viewer sorter would be affected by a change to the given property of the given element. |
Method Detail |
---|
int compare(Viewer viewer, ViewerSorter defaultSorter, Column selectedColumn, boolean direction, java.lang.Object e1, java.lang.Object e2)
viewer
- viewer that the sorter is sortingdefaultSorter
- the default sorter.selectedColumn
- the selected column.direction
- if true then the order should be ascending if false then descending. This is changed when the header of the
selected column is clicked. It is normal table functionality in many apps.e1
- the first objecte2
- the second object
0
if the first element is
equal to the second element; and a positive number if the first
element is greater than the second elementjava.lang.String getExtensionID()
boolean isSorterProperty(ViewerSorter defaultSorter, java.lang.Object element, java.lang.String property)
The default implementation of this method returns false
.
Subclasses may reimplement.
defaultSorter
- the default sorter.element
- the elementproperty
- the property
true
if the sorting would be affected,
and false
if it would be unaffectedint category(ViewerSorter defaultSorter, java.lang.Object element)
The default implementation of this framework method returns
0
. Subclasses may reimplement this method to provide
non-trivial categorization.
defaultSorter
- the default sorter.element
- the element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |