svn-gvsig-desktop / tags / PilotoRaster_Build_6 / extensions / extgvSIGPiloto-Raster / src / com / iver / cit / gvsig / pilotoraster / PilotoRasterModule.java @ 13067
History | View | Annotate | Download (3.81 KB)
1 | 8999 | nacho | /* 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 com.iver.cit.gvsig.pilotoraster; |
||
20 | |||
21 | import com.iver.andami.PluginServices; |
||
22 | import com.iver.andami.plugins.Extension; |
||
23 | import com.iver.andami.ui.mdiManager.IWindow; |
||
24 | 9045 | nacho | import com.iver.cit.gvsig.gui.toc.WCSHistogramTocMenuEntry; |
25 | import com.iver.cit.gvsig.gui.toc.WCSPaletteTocMenuEntry; |
||
26 | import com.iver.cit.gvsig.gui.toc.WCSRasterFilterTocMenuEntry; |
||
27 | import com.iver.cit.gvsig.gui.toc.WMSHistogramTocMenuEntry; |
||
28 | import com.iver.cit.gvsig.gui.toc.WMSPaletteTocMenuEntry; |
||
29 | import com.iver.cit.gvsig.gui.toc.WMSRasterFilterTocMenuEntry; |
||
30 | 8999 | nacho | import com.iver.cit.gvsig.project.documents.view.toc.actions.CutRasterTocMenuEntry; |
31 | import com.iver.cit.gvsig.project.documents.view.toc.actions.HistogramTocMenuEntry; |
||
32 | import com.iver.cit.gvsig.project.documents.view.toc.actions.PaletteTocMenuEntry; |
||
33 | import com.iver.cit.gvsig.project.documents.view.toc.actions.RasterFilterTocMenuEntry; |
||
34 | import com.iver.utiles.extensionPoints.ExtensionPoints; |
||
35 | import com.iver.utiles.extensionPoints.ExtensionPointsSingleton; |
||
36 | |||
37 | |||
38 | /**
|
||
39 | * Extensi?n para el piloto de raster. A?ade las entrada de men? necesarias.
|
||
40 | * @author Nacho Brodin (brodin_ign@gva.es)
|
||
41 | */
|
||
42 | public class PilotoRasterModule extends Extension { |
||
43 | 12794 | jmvivo | |
44 | 8999 | nacho | /* (non-Javadoc)
|
45 | * @see com.iver.andami.plugins.Extension#inicializar()
|
||
46 | */
|
||
47 | public void initialize() { |
||
48 | ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance(); |
||
49 | extensionPoints.add("View_TocActions","Histogram",new HistogramTocMenuEntry()); |
||
50 | extensionPoints.add("View_TocActions","RasterFilter",new RasterFilterTocMenuEntry()); |
||
51 | extensionPoints.add("View_TocActions","Palette",new PaletteTocMenuEntry()); |
||
52 | 12794 | jmvivo | //extensionPoints.add("View_TocActions","CutRaster",new CutRasterTocMenuEntry());
|
53 | |||
54 | 9045 | nacho | //Puntos de extensi?n para WCS
|
55 | extensionPoints.add("View_TocActions","HistogramWCS",new WCSHistogramTocMenuEntry()); |
||
56 | extensionPoints.add("View_TocActions","RasterFilterWCS",new WCSRasterFilterTocMenuEntry()); |
||
57 | extensionPoints.add("View_TocActions","PaletteWCS",new WCSPaletteTocMenuEntry()); |
||
58 | 12794 | jmvivo | |
59 | 9045 | nacho | //Puntos de extensi?n para WMS
|
60 | extensionPoints.add("View_TocActions","HistogramWMS",new WMSHistogramTocMenuEntry()); |
||
61 | extensionPoints.add("View_TocActions","RasterFilterWMS",new WMSRasterFilterTocMenuEntry()); |
||
62 | extensionPoints.add("View_TocActions","PaletteWMS",new WMSPaletteTocMenuEntry()); |
||
63 | 8999 | nacho | } |
64 | 12794 | jmvivo | |
65 | 8999 | nacho | /**
|
66 | * Cargamos el listener y ejecutamos la herramienta de salvar a Raster.
|
||
67 | */
|
||
68 | public void execute(String actionCommand) { |
||
69 | 12794 | jmvivo | |
70 | 8999 | nacho | } |
71 | |||
72 | /* (non-Javadoc)
|
||
73 | * @see com.iver.andami.plugins.Extension#isEnabled()
|
||
74 | */
|
||
75 | public boolean isEnabled() { |
||
76 | return true; |
||
77 | } |
||
78 | |||
79 | /**
|
||
80 | * Mostramos el control si hay alguna capa cargada.
|
||
81 | */
|
||
82 | public boolean isVisible() { |
||
83 | com.iver.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager() |
||
84 | .getActiveWindow(); |
||
85 | 12794 | jmvivo | if (f == null) |
86 | 8999 | nacho | return false; |
87 | 12794 | jmvivo | |
88 | 8999 | nacho | return (f instanceof IWindow); |
89 | } |
||
90 | } |