Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_1_RELEASE / extensions / extRasterTools / src / org / gvsig / rasterTools / pansharpening / PanSharpeningModule.java @ 9531

History | View | Annotate | Download (2.73 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.cresques.filter.RasterFilterStackManager;
22
import org.gvsig.rasterTools.pansharpening.filter.PanSharpeningStackManager;
23
import org.gvsig.rasterTools.pansharpening.toc.PanSharpeningTocMenuEntry;
24

    
25
import com.iver.andami.PluginServices;
26
import com.iver.andami.plugins.Extension;
27
import com.iver.cit.gvsig.project.documents.view.gui.View;
28
import com.iver.cit.gvsig.project.documents.view.toc.gui.FLyrRasterAdjustPropertiesTocMenuEntry;
29
import com.iver.cit.gvsig.project.documents.view.toc.gui.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 extends Extension {
37
        
38
    /* (non-Javadoc)
39
     * @see com.iver.andami.plugins.Extension#inicializar()
40
     */
41
    public void initialize() {
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
            RasterFilterStackManager.addClassStackManager(PanSharpeningStackManager.class);
48
    }
49
   
50
    /**
51
     * Cargamos el listener y ejecutamos la herramienta de salvar a Raster.
52
     */
53
    public void execute(String actionCommand) {
54
            
55
    }
56

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

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