net.refractions.udig.ui
Class SelectionComparator
java.lang.Object
net.refractions.udig.ui.SelectionComparator
- All Implemented Interfaces:
- java.util.Comparator<SimpleFeature>
public class SelectionComparator
- extends java.lang.Object
- implements java.util.Comparator<SimpleFeature>
Promotes the Features selected by the filter to the top if SWT.UP.
- Since:
- 1.1.0
- Author:
- Jesse
Constructor Summary |
SelectionComparator(Filter filter,
int direction)
|
SelectionComparator(org.opengis.filter.Filter filter2,
int direction,
java.util.Comparator<SimpleFeature> subComparator)
|
Method Summary |
int |
compare(SimpleFeature o1,
SimpleFeature 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(org.opengis.filter.Filter filter2,
int direction,
java.util.Comparator<SimpleFeature> subComparator)
- Parameters:
filter2
- 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(SimpleFeature o1,
SimpleFeature o2)
- Specified by:
compare
in interface java.util.Comparator<SimpleFeature>