root / branches / v2_0_0_prep / extensions / extDalTransform / src / org / gvsig / app / daltransform / gui / DataTransformWizard.java @ 28893
History | View | Annotate | Download (3.78 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.gui; |
29 |
|
30 |
import java.util.List; |
31 |
|
32 |
import jwizardcomponent.JWizardPanel; |
33 |
|
34 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
35 |
import org.gvsig.fmap.dal.feature.FeatureStoreTransform; |
36 |
import org.gvsig.fmap.mapcontext.MapContext; |
37 |
import org.slf4j.Logger; |
38 |
import org.slf4j.LoggerFactory; |
39 |
|
40 |
import com.iver.andami.PluginServices; |
41 |
|
42 |
/**
|
43 |
* This class has to be inherited by all the classes
|
44 |
* that appears on the transformation wizard. It contains
|
45 |
* methods to access to all the data that has been set
|
46 |
* on the transformation wizard.
|
47 |
*
|
48 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
49 |
*/
|
50 |
public abstract class DataTransformWizard extends JWizardPanel{ |
51 |
private DataTransformWizardModel featureTransformWizardModel = null; |
52 |
protected static final Logger logger = LoggerFactory.getLogger(DataTransformWizard.class); |
53 |
|
54 |
/**
|
55 |
* @param featureTransformWizardModel
|
56 |
*/
|
57 |
public DataTransformWizard(
|
58 |
DataTransformWizardModel featureTransformWizardModel) { |
59 |
super(featureTransformWizardModel.getWizard().getWizardComponents());
|
60 |
this.featureTransformWizardModel = featureTransformWizardModel;
|
61 |
setBorder(javax.swing.BorderFactory.createTitledBorder(getPanelTitle())); |
62 |
} |
63 |
|
64 |
/*
|
65 |
* (non-Javadoc)
|
66 |
* @see jwizardcomponent.JWizardPanel#getPanelTitle()
|
67 |
*/
|
68 |
public String getPanelTitle() { |
69 |
return PluginServices.getText(this, "transform_parameters"); |
70 |
} |
71 |
|
72 |
/**
|
73 |
* @return the {@link DataTransformGui} that has been
|
74 |
* selected on the first window
|
75 |
*/
|
76 |
public DataTransformGui getFeatureTransformGui(){
|
77 |
return featureTransformWizardModel.getFeatureTransformGui();
|
78 |
} |
79 |
|
80 |
/**
|
81 |
* @return the featureStore that has been selected
|
82 |
* on the second window
|
83 |
*/
|
84 |
public FeatureStore getFeatureStore(){
|
85 |
return featureTransformWizardModel.getFeatureStore();
|
86 |
} |
87 |
|
88 |
/**
|
89 |
* @return the selected transformation
|
90 |
*/
|
91 |
public FeatureStoreTransform getTransform(){
|
92 |
return featureTransformWizardModel.getTransform();
|
93 |
} |
94 |
|
95 |
/**
|
96 |
* @return if the selected {@link FeatureStore} is being
|
97 |
* used like a source of a loaded layer.
|
98 |
*/
|
99 |
public boolean isLayerLoaded(){ |
100 |
return featureTransformWizardModel.isLayerLoaded();
|
101 |
} |
102 |
|
103 |
/**
|
104 |
* @return the mapContext that has been used to
|
105 |
* retrieve the {@link FeatureStore}.
|
106 |
*/
|
107 |
public MapContext getMapContext(){
|
108 |
return featureTransformWizardModel.getMapContext();
|
109 |
} |
110 |
|
111 |
/**
|
112 |
* @return if the selected {@link FeatureStore} is
|
113 |
* loaded in a view
|
114 |
*/
|
115 |
public boolean isSelectedFeatureStoreLoaded(){ |
116 |
return featureTransformWizardModel.isSelectedFeatureStoreLoaded();
|
117 |
} |
118 |
|
119 |
/**
|
120 |
* Refresh all the panels
|
121 |
*/
|
122 |
public void refreshPanels(){ |
123 |
featureTransformWizardModel.refreshPanels(); |
124 |
} |
125 |
|
126 |
/**
|
127 |
* @return all the panels that has been added by the
|
128 |
* selected transform
|
129 |
*/
|
130 |
public List<DataTransformWizard> getAddedFeatureTransformWizards() { |
131 |
return featureTransformWizardModel.getAddedFeatureTransformWizards();
|
132 |
} |
133 |
} |
134 |
|