eu.geclipse.ui.comparators
Class TableColumnComparator
java.lang.Object
ViewerComparator
eu.geclipse.ui.comparators.TableColumnComparator
public class TableColumnComparator
- extends ViewerComparator
This comparator is used to sort the table entries according to the selected
sorting column, with a second ordering column as fallback if entries compare
equal.
|
Constructor Summary |
TableColumnComparator(TableColumn defaultSortColumn)
Construct a ViewerComparator to use for a TableViewer,
with the given column as fallback sorting column. |
|
Method Summary |
int |
category(java.lang.Object element)
|
int |
compare(Viewer viewer,
java.lang.Object element1,
java.lang.Object element2)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableColumnComparator
public TableColumnComparator(TableColumn defaultSortColumn)
- Construct a
ViewerComparator to use for a TableViewer,
with the given column as fallback sorting column. Remark that each TableViewer
needs a new instance of this TableColumnComparator.
- Parameters:
defaultSortColumn - The sorting column used as fallback if elements compare equal.
category
public int category(java.lang.Object element)
compare
public int compare(Viewer viewer,
java.lang.Object element1,
java.lang.Object element2)