Revision 30233 branches/v2_0_0_prep/libraries/libFMap_controls/src/org/gvsig/fmap/mapcontrol/MapControl.java
MapControl.java | ||
---|---|---|
104 | 104 |
import org.gvsig.utils.exceptionHandling.ExceptionListener; |
105 | 105 |
import org.slf4j.Logger; |
106 | 106 |
import org.slf4j.LoggerFactory; |
107 |
import java.util.TreeMap; |
|
108 |
import java.util.Comparator; |
|
107 | 109 |
|
108 | 110 |
|
109 |
|
|
110 | 111 |
/** |
111 | 112 |
* <p>A component that includes a {@link MapContext MapContext} with support for use it as a particular {@link Behavior Behavior}.</p> |
112 | 113 |
* |
... | ... | |
439 | 440 |
*/ |
440 | 441 |
private double[] previousPoint = null; |
441 | 442 |
|
442 |
private static HashMap selected = new HashMap();
|
|
443 |
private static TreeMap selected = new TreeMap(new Comparator(){
|
|
443 | 444 |
|
445 |
public int compare(Object o1, Object o2) { |
|
446 |
if (o1.getClass().equals(o2.getClass())) |
|
447 |
return 0; |
|
448 |
if (((ISnapper)o1).getPriority()>((ISnapper)o2).getPriority()) |
|
449 |
return 1; |
|
450 |
else |
|
451 |
return -1; |
|
452 |
} |
|
453 |
|
|
454 |
}); |
|
455 |
|
|
444 | 456 |
public static int tolerance=4; |
445 | 457 |
/** |
446 | 458 |
* Represents the cursor's point selected in <i>map coordinates</i>. |
... | ... | |
2341 | 2353 |
return cadgrid; |
2342 | 2354 |
} |
2343 | 2355 |
|
2344 |
public static HashMap getSelectedSnapppers() {
|
|
2356 |
public static TreeMap getSelectedSnapppers() {
|
|
2345 | 2357 |
return selected; |
2346 | 2358 |
} |
2347 | 2359 |
|
Also available in: Unified diff