svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.geodb.app / org.gvsig.geodb.app.mainplugin / src / main / java / org / gvsig / geodb / ExtDB_Spatial.java @ 44297
History | View | Annotate | Download (3.61 KB)
1 | 40557 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40557 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | 40435 | jjdelcerro | *
|
6 | 41427 | jjdelcerro | * This program is free software; you can redistribute it and/or modify it under
|
7 | * the terms of the GNU General Public License as published by the Free Software
|
||
8 | * Foundation; either version 3 of the License, or (at your option) any later
|
||
9 | * version.
|
||
10 | 40435 | jjdelcerro | *
|
11 | 41427 | jjdelcerro | * This program is distributed in the hope that it will be useful, but WITHOUT
|
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||
13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||
14 | * details.
|
||
15 | 40435 | jjdelcerro | *
|
16 | 41427 | jjdelcerro | * You should have received a copy of the GNU General Public License along with
|
17 | * this program; if not, write to the Free Software Foundation, Inc., 51
|
||
18 | * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
19 | 40435 | jjdelcerro | *
|
20 | 41427 | jjdelcerro | * For any additional information, do not hesitate to contact us at info AT
|
21 | * gvsig.com, or visit our website www.gvsig.com.
|
||
22 | 40435 | jjdelcerro | */
|
23 | package org.gvsig.geodb; |
||
24 | |||
25 | import org.gvsig.about.AboutManager; |
||
26 | import org.gvsig.about.AboutParticipant; |
||
27 | import org.gvsig.andami.IconThemeHelper; |
||
28 | 41427 | jjdelcerro | import org.gvsig.andami.PluginsLocator; |
29 | import org.gvsig.andami.PluginsManager; |
||
30 | 40435 | jjdelcerro | import org.gvsig.andami.plugins.Extension; |
31 | import org.gvsig.app.ApplicationLocator; |
||
32 | import org.gvsig.app.ApplicationManager; |
||
33 | import org.gvsig.app.extension.AddLayer; |
||
34 | 41495 | jjdelcerro | import org.gvsig.fmap.dal.DALLocator; |
35 | import org.gvsig.fmap.dal.DataManager; |
||
36 | 40435 | jjdelcerro | import org.gvsig.geodb.vectorialdb.wizard.WizardDB; |
37 | import org.gvsig.geodb.vectorialdb.wizard.WizardVectorialDB; |
||
38 | 41427 | jjdelcerro | import org.gvsig.tools.dynobject.DynObject; |
39 | 41495 | jjdelcerro | import org.gvsig.fmap.dal.DataServerExplorerPool; |
40 | 40435 | jjdelcerro | |
41 | /**
|
||
42 | * This extension adds the export-to-oracle button.
|
||
43 | *
|
||
44 | * @author jldominguez
|
||
45 | *
|
||
46 | */
|
||
47 | public class ExtDB_Spatial extends Extension { |
||
48 | |||
49 | 41427 | jjdelcerro | public void initialize() { |
50 | 40435 | jjdelcerro | IconThemeHelper.registerIcon("geodb", "geodb-connection-add", this); |
51 | IconThemeHelper.registerIcon("geodb", "geodb-advanced-properties", this); |
||
52 | IconThemeHelper.registerIcon("geodb", "geodb-get-view-extent", this); |
||
53 | 41495 | jjdelcerro | |
54 | DataManager dataManager = DALLocator.getDataManager(); |
||
55 | PluginsManager manager = PluginsLocator.getManager(); |
||
56 | DynObject pluginProperties = manager.getPlugin(ExtDB_Spatial.class).getPluginProperties(); |
||
57 | if( pluginProperties.getDynValue("explorersPool")==null ) { |
||
58 | pluginProperties.setDynValue("explorersPool", dataManager.getDataServerExplorerPool());
|
||
59 | } else {
|
||
60 | dataManager.setDataServerExplorerPool((DataServerExplorerPool)pluginProperties.getDynValue("explorersPool"));
|
||
61 | } |
||
62 | |||
63 | 40435 | jjdelcerro | } |
64 | |||
65 | public void execute(String actionCommand) { |
||
66 | //do nothing
|
||
67 | } |
||
68 | |||
69 | public boolean isEnabled() { |
||
70 | return isVisible();
|
||
71 | |||
72 | // return true;
|
||
73 | } |
||
74 | |||
75 | public boolean isVisible() { |
||
76 | return false; |
||
77 | } |
||
78 | |||
79 | 41427 | jjdelcerro | @Override
|
80 | public void postInitialize() { |
||
81 | super.postInitialize();
|
||
82 | addAboutInfo(); |
||
83 | 40435 | jjdelcerro | |
84 | 41427 | jjdelcerro | ApplicationLocator.getManager().registerAddTableWizard("DB",
|
85 | "DB Tables", WizardDB.class);
|
||
86 | AddLayer.addWizard(WizardVectorialDB.class); |
||
87 | } |
||
88 | 40435 | jjdelcerro | |
89 | 41427 | jjdelcerro | private void addAboutInfo() { |
90 | ApplicationManager application = ApplicationLocator.getManager(); |
||
91 | 40435 | jjdelcerro | |
92 | 44172 | jjdelcerro | // AboutManager about = application.getAbout();
|
93 | // about.addDeveloper("PRODEVELOP", getClass().getClassLoader()
|
||
94 | // .getResource("about/prodevelop.html"), 2);
|
||
95 | //
|
||
96 | // AboutParticipant participant = about.getDeveloper("PRODEVELOP");
|
||
97 | // participant.addContribution(
|
||
98 | // "GeoDB",
|
||
99 | // "Soporte para pool de conexiones con BBDD",
|
||
100 | // 2006, 1, 1,
|
||
101 | // 2007, 12, 31
|
||
102 | // );
|
||
103 | 41427 | jjdelcerro | } |
104 | |||
105 | 40435 | jjdelcerro | } |