Revision 39844 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/tools/CompoundBehavior.java
CompoundBehavior.java | ||
---|---|---|
45 | 45 |
import java.awt.event.MouseEvent; |
46 | 46 |
import java.awt.event.MouseWheelEvent; |
47 | 47 |
import java.util.ArrayList; |
48 |
import java.util.Collections; |
|
49 |
import java.util.List; |
|
48 | 50 |
|
49 | 51 |
import com.iver.cit.gvsig.fmap.MapControl; |
50 | 52 |
import com.iver.cit.gvsig.fmap.tools.Behavior.Behavior; |
... | ... | |
258 | 260 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mousePressed(java.awt.event.MouseEvent) |
259 | 261 |
*/ |
260 | 262 |
public void mousePressed(MouseEvent e) throws BehaviorException { |
261 |
for (Behavior mapBehavior : behaviors) { |
|
263 |
List<Behavior> aux = Collections.unmodifiableList(behaviors); |
|
264 |
for (int i=0; i< aux.size(); i++) { |
|
265 |
Behavior mapBehavior = aux.get(i); |
|
262 | 266 |
mapBehavior.mousePressed(e); |
263 | 267 |
} |
264 | 268 |
|
... | ... | |
271 | 275 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mouseReleased(java.awt.event.MouseEvent) |
272 | 276 |
*/ |
273 | 277 |
public void mouseReleased(MouseEvent e) throws BehaviorException { |
274 |
for (int i=0; i< behaviors.size(); i++) { |
|
275 |
Behavior mapBehavior = behaviors.get(i); |
|
276 |
mapBehavior.mouseReleased(e); |
|
277 |
} |
|
278 |
|
|
278 |
List<Behavior> aux = Collections.unmodifiableList(behaviors); |
|
279 |
for (int i=0; i< aux.size(); i++) { |
|
280 |
Behavior mapBehavior = aux.get(i); |
|
281 |
mapBehavior.mouseReleased(e); |
|
282 |
} |
|
283 |
|
|
279 | 284 |
if(behavior != null) |
280 | 285 |
behavior.mouseReleased(e); |
281 | 286 |
} |
Also available in: Unified diff