root / branches / v2_0_0_prep / extensions / org.gvsig.arcims.feature.extension / src / main / java / org / gvsig / arcims / feature / ArcimsFeatureExtension.java @ 32436
History | View | Annotate | Download (3.87 KB)
1 | 32323 | vsanjaime | /* 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 | 32370 | vsanjaime | import org.gvsig.fmap.dal.store.arcims.ArcImsLibrary; |
35 | import org.gvsig.tools.library.Library; |
||
36 | 32323 | vsanjaime | |
37 | /**
|
||
38 | * This class implements the extension to access ArcIMS servers.
|
||
39 | *
|
||
40 | * @author jldominguez
|
||
41 | 32370 | vsanjaime | * @author vsanjaime version 2.0
|
42 | 32323 | vsanjaime | *
|
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 | 32370 | vsanjaime | |
51 | // Initialize ArcIMS Library
|
||
52 | Library lib = new ArcImsLibrary();
|
||
53 | lib.postInitialize(); |
||
54 | |||
55 | 32323 | vsanjaime | // must add menus and a new tab to the wizard..
|
56 | AddLayer.addWizard(ArcImsFeatureWizard.class); |
||
57 | 32370 | vsanjaime | |
58 | 32323 | vsanjaime | // 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 | } |
||
99 | |||
100 | /**
|
||
101 | * This method is called to find out if the plugin's controls are enabled or
|
||
102 | * not. So far, the ArcIMS plugin does <i>not</i> add any controls.
|
||
103 | *
|
||
104 | * @return <b>true</b> if controls must be enabled, <b>false</b> if not.
|
||
105 | */
|
||
106 | public boolean isEnabled() { |
||
107 | return false; |
||
108 | } |
||
109 | |||
110 | /**
|
||
111 | * This method is called to find out if the plugin's controls are visible or
|
||
112 | * not. So far, the ArcIMS plugin does <i>not</i> add any controls.
|
||
113 | *
|
||
114 | * @return <b>true</b> if controls must be visible, <b>false</b> if not.
|
||
115 | */
|
||
116 | public boolean isVisible() { |
||
117 | return false; |
||
118 | } |
||
119 | |||
120 | // /**
|
||
121 | // *
|
||
122 | // * @param path
|
||
123 | // * @return
|
||
124 | // */
|
||
125 | // private java.net.URL createResourceUrl(String path) {
|
||
126 | // return getClass().getClassLoader().getResource(path);
|
||
127 | // }
|
||
128 | } |