Revision 45090
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/RectangleSelectionListener.java | ||
---|---|---|
65 | 65 |
// mapCtrl.getMapContext().selectByRect(event.getWorldCoordRect()); |
66 | 66 |
Envelope rect = event.getWorldCoordRect(); |
67 | 67 |
FLayer[] actives = mapCtrl.getMapContext().getLayers().getActives(); |
68 |
|
|
68 |
// event.getEvent().getModifiers() |
|
69 |
// lyrVect.query |
|
70 |
// MAYUS tecla |
|
69 | 71 |
for (int i = 0; i < actives.length; i++) { |
70 | 72 |
if (actives[i] instanceof FLyrVect) { |
71 | 73 |
FLyrVect lyrVect = (FLyrVect) actives[i]; |
72 | 74 |
FeatureSet newSelection = null; |
73 | 75 |
try { |
76 |
if (event.getEvent().isShiftDown()) { |
|
77 |
newSelection = |
|
78 |
lyrVect.queryByContainedInEnvelope(rect, |
|
79 |
lyrVect.getFeatureStore() |
|
80 |
.getDefaultFeatureType()); |
|
81 |
} else { |
|
74 | 82 |
newSelection = |
75 | 83 |
lyrVect.queryByEnvelope(rect, |
76 | 84 |
lyrVect.getFeatureStore() |
77 | 85 |
.getDefaultFeatureType()); |
86 |
} |
|
78 | 87 |
if (event.getEvent().isControlDown()) { |
79 | 88 |
FeatureSelection currentSelection = (FeatureSelection)lyrVect.getFeatureStore().getSelection(); |
80 | 89 |
DisposableIterator it = newSelection.fastIterator(); |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/PolygonSelectionListener.java | ||
---|---|---|
104 | 104 |
if (actives[i] instanceof FLyrVect) { |
105 | 105 |
FLyrVect lyrVect = (FLyrVect) actives[i]; |
106 | 106 |
FeatureSet newSelection = null; |
107 |
try { |
|
107 |
try { |
|
108 |
if (event.getEvent().isShiftDown()) { |
|
109 |
newSelection = |
|
110 |
lyrVect.queryByContainedInGeometry(geom, |
|
111 |
lyrVect.getFeatureStore() |
|
112 |
.getDefaultFeatureType()); |
|
113 |
} else { |
|
108 | 114 |
newSelection = lyrVect.queryByGeometry(geom, |
109 | 115 |
lyrVect.getFeatureStore() |
110 | 116 |
.getDefaultFeatureType()); |
117 |
} |
|
111 | 118 |
if (event.getEvent().isControlDown()) { |
112 | 119 |
FeatureSelection currentSelection = (FeatureSelection)lyrVect.getFeatureStore().getSelection(); |
113 | 120 |
DisposableIterator it = newSelection.fastIterator(); |
Also available in: Unified diff