Statistics
| Revision:

root / trunk / extensions / extRasterTools / src / org / gvsig / rasterTools / brightnessContrast / BrightnessContrastModule.java @ 6877

History | View | Annotate | Download (2.46 KB)

1 5497 maquerol
/* 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
20 5159 nacho
package org.gvsig.rasterTools.brightnessContrast;
21
22 5982 nacho
import org.cresques.filter.RasterFilterStackManager;
23 5159 nacho
import org.gvsig.rasterTools.brightnessContrast.filter.BrightnessContrastStackManager;
24
import org.gvsig.rasterTools.brightnessContrast.toc.BrightnessContrastTocMenuEntry;
25
import org.gvsig.rasterTools.pansharpening.filter.PanSharpeningStackManager;
26
import org.gvsig.rasterTools.pansharpening.toc.PanSharpeningTocMenuEntry;
27
28
import com.iver.andami.PluginServices;
29
import com.iver.andami.plugins.Extension;
30
import com.iver.cit.gvsig.gui.View;
31
import com.iver.cit.gvsig.gui.toc.FLyrRasterAdjustPropertiesTocMenuEntry;
32
import com.iver.cit.gvsig.gui.toc.FPopupMenu;
33
34
/**
35
 * Extension para los filtros de brillo y contraste de raster
36
 * @author Miguel ?ngel Querol Carratal?  <querol_mig@gva.es>
37
 *
38
 */
39
public class BrightnessContrastModule extends Extension{
40
41
        public void execute(String actionCommand) {
42
                // TODO Auto-generated method stub
43
44
        }
45
46
47
        public void initialize() {
48
                FLyrRasterAdjustPropertiesTocMenuEntry menu =
49
                        (FLyrRasterAdjustPropertiesTocMenuEntry)FPopupMenu.getEntry("FLyrRasterAdjustPropertiesTocMenuEntry");
50
51
                BrightnessContrastTocMenuEntry menuEntry = new BrightnessContrastTocMenuEntry(menu);
52
                RasterFilterStackManager.addClassStackManager(BrightnessContrastStackManager.class);
53
54
        }
55
56
        public boolean isEnabled() {
57
                // TODO Auto-generated method stub
58
                return true;
59
        }
60
61
        /**
62
         * Mostramos el control si hay alguna capa cargada.
63
         */
64
        public boolean isVisible() {
65 6877 cesar
                com.iver.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager().getActiveView();
66 5159 nacho
                if (f == null)
67
                        return false;
68
69 5900 jorpiell
                return (f  instanceof View);
70 5159 nacho
        }
71
72
}