Statistics
| Revision:

gvsig-raster / org.gvsig.raster.netcdf / trunk / org.gvsig.raster.netcdf / org.gvsig.raster.netcdf.app.netcdfclient / src / main / java / org / gvsig / raster / netcdf / app / netcdfclient / NetCDFClientExtension.java @ 9530

History | View | Annotate | Download (2.95 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.IconThemeHelper;
27
import org.gvsig.andami.PluginServices;
28
import org.gvsig.andami.plugins.Extension;
29
import org.gvsig.app.ApplicationLocator;
30
import org.gvsig.app.ApplicationManager;
31
import org.gvsig.tools.ToolsLocator;
32
import org.gvsig.tools.extensionpoint.ExtensionPoint;
33
import org.gvsig.tools.extensionpoint.ExtensionPointManager;
34

    
35
/**
36
 * Extension for adding grid netcdf support to gvSIG.
37
 * @author Nacho Brodin (nachobrodin@gmail.com)
38
 */
39
public class NetCDFClientExtension extends Extension {
40

    
41
        public void initialize() {
42
                registerIcons();
43
            
44
            ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
45
            ExtensionPoint point = extensionPoints.add("View_TocActions");
46
            point.append("NetCDF_TocActions", "NetCDF", NetCDFMenuEntry.getSingleton());
47
        }
48
        
49
        /**
50
         * @see com.iver.andami.plugins.IExtension#postInitialize()
51
         */
52
        @Override
53
        public void postInitialize() {
54
                super.postInitialize();
55
//            addAboutInfo();
56
        }
57
        
58
//        private void addAboutInfo() {
59
//        ApplicationManager application = ApplicationLocator.getManager();
60
//        
61
//        AboutManager about = application.getAbout();
62
//        about.addDeveloper("PRODEVELOP", getClass().getClassLoader()
63
//            .getResource("about/netcdf-about.html"), 2);
64
//
65
//        AboutParticipant participant = about.getDeveloper("PRODEVELOP");
66
//        participant.addContribution(
67
//            "NetCDF Raster",
68
//            "Soporte para NetCDF raster ", 
69
//            2011,7,1, 
70
//            2011,7,30
71
//        );      
72
//    }
73

    
74
        public void execute(String actionCommand) {
75
        }
76

    
77
        public boolean isEnabled() {
78
                return true;
79
        }
80

    
81
        public boolean isVisible() {
82
                return false;
83
        }
84
        
85
        /**
86
         * Registra los iconos a utilizar en la botonera.
87
         */
88
        private void registerIcons() {
89
                IconThemeHelper.registerIcon(null, "nextarrow-icon", this);
90
                IconThemeHelper.registerIcon(null, "prevarrow-icon", this);
91
                IconThemeHelper.registerIcon(null, "inspect-icon", this);
92
        }
93
}