Revision 31545 branches/v2_0_0_prep/extensions/org.gvsig.annotation/src/main/java/org/gvsig/annotation/AnnotationEditionExtension.java
AnnotationEditionExtension.java | ||
---|---|---|
44 | 44 |
import org.gvsig.andami.PluginServices; |
45 | 45 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
46 | 46 |
import org.gvsig.app.extension.InfoToolExtension; |
47 |
import org.gvsig.app.project.documents.view.gui.View; |
|
47 |
import org.gvsig.app.project.documents.view.gui.IView;
|
|
48 | 48 |
import org.gvsig.app.project.documents.view.toolListeners.StatusBarListener; |
49 | 49 |
import org.gvsig.fmap.mapcontext.MapContext; |
50 | 50 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
... | ... | |
65 | 65 |
public void execute(String s) { |
66 | 66 |
IWindow window = PluginServices.getMDIManager().getActiveWindow(); |
67 | 67 |
|
68 |
if (window instanceof View) { |
|
69 |
MapControl mapCtrl = ((View) window).getMapControl(); |
|
68 |
if (window instanceof IView) {
|
|
69 |
MapControl mapCtrl = ((IView) window).getMapControl();
|
|
70 | 70 |
|
71 | 71 |
if (s.compareTo("MODIFYANNOTATION") == 0) { |
72 | 72 |
if (mapCtrl.getMapTool("centerviewtopoint") == null) { |
... | ... | |
105 | 105 |
public boolean isVisible() { |
106 | 106 |
IWindow window = PluginServices.getMDIManager().getActiveWindow(); |
107 | 107 |
|
108 |
if (window instanceof View) { |
|
109 |
MapContext mapContext = ((View) window).getMapControl() |
|
108 |
if (window instanceof IView) {
|
|
109 |
MapContext mapContext = ((IView) window).getMapControl()
|
|
110 | 110 |
.getMapContext(); |
111 | 111 |
FLayer[] layers=mapContext.getLayers().getActives(); |
112 | 112 |
for (int i=0;i<layers.length;i++){ |
Also available in: Unified diff