Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extRasterTools / src / org / gvsig / rasterTools / pansharpening / PanSharpeningModule.java @ 4582

History | View | Annotate | Download (2.67 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 */
19
package org.gvsig.rasterTools.pansharpening;
20

    
21
import org.gvsig.rasterTools.pansharpening.filter.PanSharpeningStackManager;
22
import org.gvsig.rasterTools.pansharpening.toc.PanSharpeningTocMenuEntry;
23

    
24
import com.iver.andami.PluginServices;
25
import com.iver.andami.plugins.Extension;
26
import com.iver.cit.gvsig.fmap.layers.StatusLayerRaster;
27
import com.iver.cit.gvsig.gui.View;
28
import com.iver.cit.gvsig.gui.toc.FLyrRasterAdjustPropertiesTocMenuEntry;
29
import com.iver.cit.gvsig.gui.toc.FPopupMenu;
30

    
31

    
32
/**
33
 * Extensi?n para el filtro de pansharpening de raster
34
 * @author Nacho Brodin (brodin_ign@gva.es)
35
 */
36
public class PanSharpeningModule implements Extension {
37
        
38
    /* (non-Javadoc)
39
     * @see com.iver.andami.plugins.Extension#inicializar()
40
     */
41
    public void inicializar() {
42
            FLyrRasterAdjustPropertiesTocMenuEntry menu = 
43
                        (FLyrRasterAdjustPropertiesTocMenuEntry)FPopupMenu.getEntry("FLyrRasterAdjustPropertiesTocMenuEntry");
44
                        
45
            //La llamada al constructor hace que se registre en FilterRasterDialogPanel
46
            PanSharpeningTocMenuEntry menuEntry = new PanSharpeningTocMenuEntry(menu);
47
            
48
            StatusLayerRaster.addClassStackManager(PanSharpeningStackManager.class);
49
    }
50
   
51
    /**
52
     * Cargamos el listener y ejecutamos la herramienta de salvar a Raster.
53
     */
54
    public void execute(String actionCommand) {
55
            
56
    }
57

    
58
    /* (non-Javadoc)
59
     * @see com.iver.andami.plugins.Extension#isEnabled()
60
     */
61
    public boolean isEnabled() {
62
        return true;
63
    }
64

    
65
    /**
66
     * Mostramos el control si hay alguna capa cargada.
67
     */
68
    public boolean isVisible() {
69
        com.iver.andami.ui.mdiManager.View f = PluginServices.getMDIManager()
70
                                                             .getActiveView();
71
        if (f == null) 
72
            return false;
73
      
74
        return (f.getClass() == View.class);
75
    }
76
}