net.refractions.udig.ui
Class SelectionComparator
java.lang.Object
net.refractions.udig.ui.SelectionComparator
- All Implemented Interfaces:
- java.util.Comparator<Feature>
public class SelectionComparator
- extends java.lang.Object
- implements java.util.Comparator<Feature>
Promotes the Features selected by the filter to the top if SWT.UP.
- Since:
- 1.1.0
- Author:
- Jesse
Method Summary |
int |
compare(Feature o1,
Feature o2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
SelectionComparator
public SelectionComparator(Filter filter,
int direction)
- Parameters:
filter
- the filter to use to promote the selected featuresdirection
- SWT.UP to put selected features at the start of the list, SWT.DOWN to put the selected features on the end
SelectionComparator
public SelectionComparator(Filter filter,
int direction,
java.util.Comparator<Feature> subComparator)
- Parameters:
filter
- the filter to use to promote the selected featuresdirection
- SWT.UP to put selected features at the start of the list, SWT.DOWN to put the selected features on the endsubComparator
- this comparator will sort the same-type items. IE selection will all be at the top but sorted by this comparator.
compare
public int compare(Feature o1,
Feature o2)
- Specified by:
compare
in interface java.util.Comparator<Feature>