Revision 38885 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/view/gui/DefaultViewPanel.java
DefaultViewPanel.java | ||
---|---|---|
36 | 36 |
import java.util.Iterator; |
37 | 37 |
|
38 | 38 |
import javax.swing.JSplitPane; |
39 |
import javax.swing.SwingUtilities; |
|
39 | 40 |
|
40 | 41 |
import org.cresques.cts.IProjection; |
41 | 42 |
|
... | ... | |
58 | 59 |
import org.gvsig.app.project.documents.view.toolListeners.StatusBarListener; |
59 | 60 |
import org.gvsig.app.project.documents.view.toolListeners.ZoomInListener; |
60 | 61 |
import org.gvsig.app.project.documents.view.toolListeners.ZoomOutListener; |
62 |
import org.gvsig.fmap.dal.feature.FeatureStoreNotification; |
|
61 | 63 |
import org.gvsig.fmap.mapcontext.MapContext; |
62 | 64 |
import org.gvsig.fmap.mapcontext.events.ColorEvent; |
63 | 65 |
import org.gvsig.fmap.mapcontext.events.ExtentEvent; |
... | ... | |
79 | 81 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PolygonBehavior; |
80 | 82 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PolylineBehavior; |
81 | 83 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.RectangleBehavior; |
84 |
import org.gvsig.tools.observer.Observable; |
|
85 |
import org.gvsig.tools.observer.Observer; |
|
82 | 86 |
import org.gvsig.utils.console.JConsole; |
83 | 87 |
import org.gvsig.utils.console.JDockPanel; |
84 | 88 |
import org.gvsig.utils.console.ResponseListener; |
... | ... | |
112 | 116 |
* @author 2009- Joaquin del Cerro |
113 | 117 |
* |
114 | 118 |
*/ |
115 |
public class DefaultViewPanel extends AbstractViewPanel { |
|
119 |
public class DefaultViewPanel extends AbstractViewPanel implements Observer {
|
|
116 | 120 |
/** |
117 | 121 |
* |
118 | 122 |
*/ |
... | ... | |
576 | 580 |
return WindowInfo.EDITOR_PROFILE; |
577 | 581 |
} |
578 | 582 |
|
583 |
/* (non-Javadoc) |
|
584 |
* @see org.gvsig.tools.observer.Observer#update(org.gvsig.tools.observer.Observable, java.lang.Object) |
|
585 |
*/ |
|
586 |
public void update(final Observable observable, final Object notification) { |
|
587 |
|
|
588 |
if (notification instanceof FeatureStoreNotification) { |
|
589 |
FeatureStoreNotification event = |
|
590 |
(FeatureStoreNotification) notification; |
|
591 |
if (event.getType() == FeatureStoreNotification.AFTER_CANCELEDITING |
|
592 |
|| event.getType() == FeatureStoreNotification.AFTER_FINISHEDITING) { |
|
593 |
|
|
594 |
if (!SwingUtilities.isEventDispatchThread()) { |
|
595 |
SwingUtilities.invokeLater(new Runnable() { |
|
596 |
public void run() { |
|
597 |
update(observable, notification); |
|
598 |
} |
|
599 |
}); |
|
600 |
return; |
|
601 |
} |
|
602 |
getMapControl().setTool("zoomIn"); |
|
603 |
hideConsole(); |
|
604 |
repaintMap(); |
|
605 |
} |
|
606 |
} |
|
607 |
} |
|
608 |
|
|
579 | 609 |
} |
Also available in: Unified diff