Revision 24281
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/MapControl.java | ||
---|---|---|
67 | 67 |
|
68 | 68 |
import com.iver.cit.gvsig.fmap.crs.CRSFactory; |
69 | 69 |
import com.iver.cit.gvsig.fmap.edition.commands.CommandListener; |
70 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
|
71 |
import com.iver.cit.gvsig.fmap.layers.GraphicLayer; |
|
70 | 72 |
import com.iver.cit.gvsig.fmap.layers.LayerCollectionEvent; |
71 | 73 |
import com.iver.cit.gvsig.fmap.layers.LayerEvent; |
72 | 74 |
import com.iver.cit.gvsig.fmap.tools.BehaviorException; |
73 | 75 |
import com.iver.cit.gvsig.fmap.tools.CompoundBehavior; |
74 | 76 |
import com.iver.cit.gvsig.fmap.tools.Behavior.Behavior; |
77 |
import com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener; |
|
75 | 78 |
import com.iver.utiles.exceptionHandling.ExceptionHandlingSupport; |
76 | 79 |
import com.iver.utiles.exceptionHandling.ExceptionListener; |
77 | 80 |
import com.iver.utiles.swing.threads.Cancellable; |
... | ... | |
1587 | 1590 |
* @see com.iver.cit.gvsig.fmap.AtomicEventListener#atomicEvent(com.iver.cit.gvsig.fmap.AtomicEvent) |
1588 | 1591 |
*/ |
1589 | 1592 |
public void atomicEvent(AtomicEvent e) { |
1590 |
boolean redraw = false; |
|
1591 | 1593 |
LayerEvent[] layerEvents = e.getLayerEvents(); |
1592 | 1594 |
|
1595 |
int eType; |
|
1593 | 1596 |
for (int i = 0; i < layerEvents.length; i++) { |
1594 |
if (layerEvents[i].getProperty().equals("visible")) { |
|
1595 |
redraw = true; |
|
1597 |
eType=layerEvents[i].getEventType(); |
|
1598 |
if (eType == LayerEvent.DRAW_VALUES_CHANGED || eType == LayerEvent.VISIBILITY_CHANGED) { |
|
1599 |
MapControl.this.drawMap(false); |
|
1600 |
return; |
|
1596 | 1601 |
} |
1597 | 1602 |
} |
1598 | 1603 |
|
1599 | 1604 |
if (e.getColorEvents().length > 0) { |
1600 |
redraw = true; |
|
1605 |
MapControl.this.drawMap(false); |
|
1606 |
return; |
|
1601 | 1607 |
} |
1602 | 1608 |
|
1603 | 1609 |
if (e.getExtentEvents().length > 0) { |
1604 |
redraw = true; |
|
1610 |
MapControl.this.drawMap(false); |
|
1611 |
return; |
|
1605 | 1612 |
} |
1606 | 1613 |
|
1607 | 1614 |
if (e.getProjectionEvents().length > 0) { |
... | ... | |
1615 | 1622 |
{ |
1616 | 1623 |
if (aux[i].getAffectedLayer().getFLayerStatus().isDriverLoaded()) |
1617 | 1624 |
{ |
1618 |
redraw = true;
|
|
1619 |
break;
|
|
1625 |
MapControl.this.drawMap(false);
|
|
1626 |
return;
|
|
1620 | 1627 |
} |
1621 | 1628 |
} |
1622 | 1629 |
|
1623 | 1630 |
} |
1624 | 1631 |
|
1625 | 1632 |
if (e.getLegendEvents().length > 0) { |
1626 |
redraw = true; |
|
1633 |
MapControl.this.drawMap(false); |
|
1634 |
return; |
|
1627 | 1635 |
} |
1628 | 1636 |
|
1629 | 1637 |
if (e.getSelectionEvents().length > 0) { |
1630 |
redraw = true; |
|
1631 |
} |
|
1632 |
|
|
1633 |
if (redraw) { |
|
1634 |
//System.out.println("MapContextListener redraw"); |
|
1635 | 1638 |
MapControl.this.drawMap(false); |
1639 |
return; |
|
1636 | 1640 |
} |
1637 | 1641 |
} |
1638 | 1642 |
} |
Also available in: Unified diff