eu.geclipse.ui.comparators
Class TreeColumnComparator
java.lang.Object
ViewerComparator
eu.geclipse.ui.comparators.TreeColumnComparator
public class TreeColumnComparator
- extends ViewerComparator
This comparator is used to sort the tree entries according to the selected
sorting column, with a second ordering column as fallback if entries compare
equal.
|
Constructor Summary |
TreeColumnComparator(TreeColumn defaultSortColumn)
Construct a ViewerComparator to use for a TreeViewer,
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 |
TreeColumnComparator
public TreeColumnComparator(TreeColumn defaultSortColumn)
- Construct a
ViewerComparator to use for a TreeViewer,
with the given column as fallback sorting column. Remark that each TreeViewer
needs a new instance of this TreeColumnComparator.
- 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)