Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / applications / appgvSIG / src / com / iver / cit / gvsig / FeatureTransformExtension.java @ 28833

History | View | Annotate | Download (3.05 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 com.iver.cit.gvsig;
29

    
30
import javax.swing.ImageIcon;
31

    
32
import org.gvsig.AppGvSigLocator;
33
import org.gvsig.app.daltransform.gui.FeatureTransformSelectionAction;
34
import org.gvsig.app.daltransform.gui.FeatureTransformWizardModel;
35
import org.gvsig.app.daltransform.gui.LoadLayerWizard;
36
import org.gvsig.app.daltransform.gui.SelectDataStoreWizard;
37
import org.gvsig.app.daltransform.gui.SelectTransformParamsWizard;
38
import org.gvsig.app.daltransform.gui.SelectTransformWizard;
39
import org.gvsig.app.daltransform.impl.DefaultFeatureTransformManager;
40

    
41
import com.iver.andami.PluginServices;
42
import com.iver.andami.plugins.Extension;
43
import com.iver.andami.ui.wizard.WizardAndami;
44

    
45
/**
46
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
47
 */
48
public class FeatureTransformExtension extends Extension{
49
        public static final int WIDTH = 315;
50
        public static final int HEIGHT = 600;
51
        
52
        /* (non-Javadoc)
53
         * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
54
         */
55
        public void execute(String actionCommand) {
56
                WizardAndami wizard = new WizardAndami(
57
                                PluginServices.getIconTheme().get("feature-transform"));
58
                wizard.setSize(HEIGHT, WIDTH);
59
                wizard.getWizardComponents().getFinishButton().setEnabled(false);
60
                wizard.getWindowInfo().setTitle(PluginServices.getText(this, "transform_wizard"));
61
                FeatureTransformWizardModel featureTransformWizardModel = new FeatureTransformWizardModel(wizard);
62
                wizard.getWizardComponents().setFinishAction(new FeatureTransformSelectionAction(featureTransformWizardModel));
63
                PluginServices.getMDIManager().addWindow(wizard);
64
        }        
65

    
66
        /* (non-Javadoc)
67
         * @see com.iver.andami.plugins.IExtension#initialize()
68
         */
69
        public void initialize() {
70
                registerIcons();
71
        }
72

    
73
        private void registerIcons(){
74
                PluginServices.getIconTheme().registerDefault(
75
                                "feature-transform",
76
                                this.getClass().getClassLoader().getResource("images/transform.png")
77
                );
78
        }
79

    
80
        /* (non-Javadoc)
81
         * @see com.iver.andami.plugins.IExtension#isEnabled()
82
         */
83
        public boolean isEnabled() {
84
                return true;
85
        }
86

    
87
        /* (non-Javadoc)
88
         * @see com.iver.andami.plugins.IExtension#isVisible()
89
         */
90
        public boolean isVisible() {                
91
                return true;
92
        }
93
}
94