root / branches / v2_0_0_prep / extensions / extDalTransform / src / org / gvsig / app / daltransform / extension / DataTransformExtension.java @ 30580
History | View | Annotate | Download (2.89 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 |
* 2009 {Iver T.I.} {Task}
|
26 |
*/
|
27 |
|
28 |
package org.gvsig.app.daltransform.extension; |
29 |
|
30 |
import java.awt.Component; |
31 |
|
32 |
import javax.swing.JOptionPane; |
33 |
|
34 |
import org.gvsig.andami.PluginServices; |
35 |
import org.gvsig.andami.plugins.Extension; |
36 |
import org.gvsig.app.daltransform.DataTransformLocator; |
37 |
|
38 |
|
39 |
/**
|
40 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
41 |
*/
|
42 |
public class DataTransformExtension extends Extension{ |
43 |
// public static DataTransformLibrary library = null;
|
44 |
// public static DefaultDataTransformLibrary defaultlibrary = null;
|
45 |
|
46 |
/* (non-Javadoc)
|
47 |
* @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
|
48 |
*/
|
49 |
public void execute(String actionCommand) { |
50 |
try {
|
51 |
PluginServices.getMDIManager().addWindow(DataTransformLocator.getDataTransformManager().createWizard().getWindow()); |
52 |
} catch (Exception e) { |
53 |
JOptionPane.showInternalMessageDialog((Component)PluginServices.getMDIManager(), |
54 |
PluginServices.getText(this, "transform_create_wizard_exception"), |
55 |
PluginServices.getText(this, "feature_transform"), |
56 |
JOptionPane.ERROR_MESSAGE);
|
57 |
} |
58 |
} |
59 |
|
60 |
/* (non-Javadoc)
|
61 |
* @see com.iver.andami.plugins.IExtension#initialize()
|
62 |
*/
|
63 |
public void initialize() { |
64 |
registerIcons(); |
65 |
// library = new DataTransformLibrary();
|
66 |
// library.initialize();
|
67 |
//
|
68 |
// defaultlibrary = new DefaultDataTransformLibrary();
|
69 |
// defaultlibrary.initialize();
|
70 |
} |
71 |
|
72 |
/* (non-Javadoc)
|
73 |
* @see com.iver.andami.plugins.Extension#postInitialize()
|
74 |
*/
|
75 |
public void postInitialize() { |
76 |
super.postInitialize();
|
77 |
// library.postInitialize();
|
78 |
// defaultlibrary.postInitialize();
|
79 |
} |
80 |
|
81 |
private void registerIcons(){ |
82 |
PluginServices.getIconTheme().registerDefault( |
83 |
"feature-transform",
|
84 |
this.getClass().getClassLoader().getResource("images/transform.png") |
85 |
); |
86 |
} |
87 |
|
88 |
/* (non-Javadoc)
|
89 |
* @see com.iver.andami.plugins.IExtension#isEnabled()
|
90 |
*/
|
91 |
public boolean isEnabled() { |
92 |
return true; |
93 |
} |
94 |
|
95 |
/* (non-Javadoc)
|
96 |
* @see com.iver.andami.plugins.IExtension#isVisible()
|
97 |
*/
|
98 |
public boolean isVisible() { |
99 |
return true; |
100 |
} |
101 |
} |
102 |
|