Revision 6885 trunk/examples/exaExample1/src/com/iver/example/MyPrivateInfo.java

View differences:

MyPrivateInfo.java
10 10

  
11 11
import com.iver.andami.PluginServices;
12 12
import com.iver.andami.plugins.Extension;
13
import com.iver.cit.gvsig.fmap.FMap;
13
import com.iver.andami.ui.mdiManager.IWindow;
14
import com.iver.cit.gvsig.fmap.MapContext;
14 15
import com.iver.cit.gvsig.fmap.MapControl;
15 16
import com.iver.cit.gvsig.fmap.tools.Behavior.PointBehavior;
16 17
import com.iver.cit.gvsig.gui.View;
......
36 37
    }
37 38

  
38 39
    public void execute(String actionCommand) {
39
        View vista = (View) PluginServices.getMDIManager().getActiveView();
40
        View vista = (View) PluginServices.getMDIManager().getActiveWindow();
40 41
        MapControl mapCtrl = vista.getMapControl();
41 42
        if (il == null) // We create it for the first time.
42 43
        {
......
60 61
     * This tool will be visible only if the View class is the active view.
61 62
     */
62 63
    public boolean isVisible() {
63
        com.iver.andami.ui.mdiManager.View f = PluginServices.getMDIManager()
64
         .getActiveView();
64
        IWindow f = PluginServices.getMDIManager()
65
         .getActiveWindow();
65 66

  
66 67
            if (f == null) {
67 68
                return false;
......
70 71
            if (f.getClass() == View.class) {
71 72
                View vista = (View) f;
72 73
                ProjectView model = vista.getModel();
73
                FMap mapa = model.getMapContext();
74
                MapContext mapa = model.getMapContext();
74 75
                
75 76
                return mapa.getLayers().getLayersCount() > 0;
76 77
            } else {

Also available in: Unified diff