Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.arcims.feature.extension / src / main / java / org / gvsig / arcims / feature / ArcimsFeatureExtension.java @ 32541

History | View | Annotate | Download (3.71 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

    
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2010 Prodevelop S.L. main development
26
 * http://www.prodevelop.es
27
 */
28

    
29
package org.gvsig.arcims.feature;
30

    
31
import org.gvsig.andami.plugins.Extension;
32
import org.gvsig.app.extension.AddLayer;
33
import org.gvsig.arcims.feature.gui.wizards.ArcImsFeatureWizard;
34
import org.gvsig.fmap.dal.store.arcims.ArcImsLibrary;
35
import org.gvsig.tools.library.Library;
36

    
37
/**
38
 * This class implements the extension to access ArcIMS layers.
39
 * 
40
 * @author jldominguez
41
 * @author vsanjaime version 2.0
42
 * 
43
 */
44
public class ArcimsFeatureExtension extends Extension {
45
        /**
46
         * This method initializes the extension. Adds the ArcIMS wizard and the
47
         * right-click popup menus to the gvSIG resources.
48
         */
49
        public void initialize() {
50
                
51
                // Initialize ArcIMS Library
52
                Library lib = new ArcImsLibrary();
53
                lib.postInitialize();
54
                
55
                // must add menus and a new tab to the wizard..
56
                AddLayer.addWizard(ArcImsFeatureWizard.class);
57
                
58
                // to create an arcims layer
59
                // FPopupMenu.addEntry(new ArcImsPropsTocMenuEntry());
60
                // // FPopupMenu.addEntry(new ArcImsRasterPropsTocMenuEntry());
61
                // FPopupMenu.addEntry(new ArcImsLayerScaleTocMenuEntry());
62
                
63

    
64
                // properties tabs:
65
                // ThemeManagerWindow.setTabEnabledForLayer(General.class,
66
                // FFeatureLyrArcIMS.class, true);
67
                // ThemeManagerWindow.setTabEnabledForLayer(LegendManager.class,
68
                // FFeatureLyrArcIMS.class, true);
69
                // ThemeManagerWindow.setTabEnabledForLayer(LabelingManager.class,
70
                // FFeatureLyrArcIMS.class, true);
71

    
72
                // about
73
//                java.net.URL newurl = createResourceUrl("about/extarcims-about.html");
74
//                About claseAbout = (About) PluginServices.getExtension(About.class);
75
//                claseAbout.getAboutPanel().addAboutUrl("ArcIMS", newurl);
76

    
77
                // catalog
78
                // ExtensionPointManager extensionPointsManager = ToolsLocator
79
                // .getExtensionPointManager();
80
                //
81
                
82
                // // extensionPointsManager.add("CatalogLayers", "arcims_vectorial");
83
                
84
                // extensionPoints.add("CatalogLayers", "arcims_vectorial",
85
                // FFeatureLyrArcIMSCollection.class);
86

    
87
        }
88

    
89
        /**
90
         * This method is called when the extension's controls are used. So far, the
91
         * ArcIMS plugin does <i>not</i> add any controls.
92
         * 
93
         * @param actionCommand
94
         *            the control's string action commmad.
95
         * 
96
         */
97
        public void execute(String actionCommand) {
98
                //nothing to do
99
        }
100

    
101
        /**
102
         * This method is called to find out if the plugin's controls are enabled or
103
         * not. So far, the ArcIMS plugin does <i>not</i> add any controls.
104
         * 
105
         * @return <b>true</b> if controls must be enabled, <b>false</b> if not.
106
         */
107
        public boolean isEnabled() {
108
                return false;
109
        }
110

    
111
        /**
112
         * This method is called to find out if the plugin's controls are visible or
113
         * not. So far, the ArcIMS plugin does <i>not</i> add any controls.
114
         * 
115
         * @return <b>true</b> if controls must be visible, <b>false</b> if not.
116
         */
117
        public boolean isVisible() {
118
                return false;
119
        }
120

    
121
        
122
}