gvsig-raster / org.gvsig.raster.netcdf / trunk / org.gvsig.raster.netcdf / org.gvsig.raster.netcdf.app / org.gvsig.raster.netcdf.app.netcdfclient / src / main / java / org / gvsig / raster / netcdf / app / netcdfclient / NetCDFClientExtension.java @ 1003
History | View | Annotate | Download (3.13 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.netcdf.app.netcdfclient; |
23 |
|
24 |
import org.gvsig.about.AboutManager; |
25 |
import org.gvsig.about.AboutParticipant; |
26 |
import org.gvsig.andami.PluginServices; |
27 |
import org.gvsig.andami.plugins.Extension; |
28 |
import org.gvsig.app.ApplicationLocator; |
29 |
import org.gvsig.app.ApplicationManager; |
30 |
import org.gvsig.tools.ToolsLocator; |
31 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
32 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
33 |
|
34 |
/**
|
35 |
* Extension for adding grid netcdf support to gvSIG.
|
36 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
37 |
*/
|
38 |
public class NetCDFClientExtension extends Extension { |
39 |
|
40 |
public void initialize() { |
41 |
registerIcons(); |
42 |
|
43 |
ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager(); |
44 |
ExtensionPoint point = extensionPoints.add("View_TocActions");
|
45 |
point.append("NetCDF_TocActions", "NetCDF", NetCDFMenuEntry.getSingleton()); |
46 |
} |
47 |
|
48 |
/**
|
49 |
* @see com.iver.andami.plugins.IExtension#postInitialize()
|
50 |
*/
|
51 |
@Override
|
52 |
public void postInitialize() { |
53 |
super.postInitialize();
|
54 |
addAboutInfo(); |
55 |
} |
56 |
|
57 |
private void addAboutInfo() { |
58 |
ApplicationManager application = ApplicationLocator.getManager(); |
59 |
|
60 |
AboutManager about = application.getAbout(); |
61 |
about.addDeveloper("PRODEVELOP", getClass().getClassLoader()
|
62 |
.getResource("about/netcdf-about.html"), 2); |
63 |
|
64 |
AboutParticipant participant = about.getDeveloper("PRODEVELOP");
|
65 |
participant.addContribution( |
66 |
"NetCDF Raster",
|
67 |
"Soporte para NetCDF raster ",
|
68 |
2011,7,1, |
69 |
2011,7,30 |
70 |
); |
71 |
} |
72 |
|
73 |
public void execute(String actionCommand) { |
74 |
} |
75 |
|
76 |
public boolean isEnabled() { |
77 |
return true; |
78 |
} |
79 |
|
80 |
public boolean isVisible() { |
81 |
return false; |
82 |
} |
83 |
|
84 |
/**
|
85 |
* Registra los iconos a utilizar en la botonera.
|
86 |
*/
|
87 |
private void registerIcons() { |
88 |
PluginServices.getIconTheme().register( |
89 |
"nextarrow-icon",
|
90 |
this.getClass().getClassLoader().getResource("images/ico16_arrow_next.png") |
91 |
); |
92 |
PluginServices.getIconTheme().register( |
93 |
"prevarrow-icon",
|
94 |
this.getClass().getClassLoader().getResource("images/ico16_arrow_prev.png") |
95 |
); |
96 |
PluginServices.getIconTheme().register( |
97 |
"inspect-icon",
|
98 |
this.getClass().getClassLoader().getResource("images/ico_show.gif") |
99 |
); |
100 |
} |
101 |
} |