root / branches / v2_0_0_prep / extensions / org.gvsig.daltransform.app.mainplugin / src / main / java / org / gvsig / daltransform / swing / DataTransformGui.java @ 38382
History | View | Annotate | Download (3.64 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.daltransform.swing; |
29 |
|
30 |
import java.awt.Dimension; |
31 |
import java.util.List; |
32 |
|
33 |
import org.gvsig.fmap.dal.exception.DataException; |
34 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
35 |
import org.gvsig.fmap.dal.feature.FeatureStoreTransform; |
36 |
|
37 |
/**
|
38 |
* This interface is used to establish a relationship between
|
39 |
* feature transformations and their user interfaces. It creates
|
40 |
* the panels that are used to set the parameters that the
|
41 |
* transformation needs.
|
42 |
*
|
43 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
44 |
*/
|
45 |
public interface DataTransformGui { |
46 |
|
47 |
/**
|
48 |
* Creates a feature transformation from a feature store. The
|
49 |
* class that implements this interface can create a transformation
|
50 |
* using this feature store and all the parameters that the user has
|
51 |
* selected. All these parameters must be known by this class
|
52 |
* @param featureStore
|
53 |
* The selected feature store
|
54 |
* @return
|
55 |
* the transformation
|
56 |
* @throws DataException
|
57 |
*/
|
58 |
public FeatureStoreTransform createFeatureStoreTransform(FeatureStore featureStore) throws DataException; |
59 |
|
60 |
/**
|
61 |
* Return if the transformation can be applied in a {@link FeatureStore}.
|
62 |
* @param featureStore
|
63 |
* the original feature store
|
64 |
* @return
|
65 |
* <code>true</code> if the transformation can be applied.
|
66 |
*/
|
67 |
public boolean accept(FeatureStore featureStore); |
68 |
|
69 |
/**
|
70 |
* Creates a list of panels to set the parameters used on the transformation.
|
71 |
* @return
|
72 |
* a set of panels with the parameters of the transformation
|
73 |
*/
|
74 |
public List<DataTransformWizardPanel> createPanels(); |
75 |
|
76 |
/**
|
77 |
* @return the name that is displayed in the feature transformation
|
78 |
* list
|
79 |
*/
|
80 |
public String getName(); |
81 |
|
82 |
/**
|
83 |
* @return a description of the feature transformation
|
84 |
*/
|
85 |
public String getDescription(); |
86 |
|
87 |
/**
|
88 |
* Returns the minimum size that has to be the wizard to display
|
89 |
* the forms.
|
90 |
* @return
|
91 |
* The minimum size for the panels.
|
92 |
*/
|
93 |
public Dimension getMinDimension(); |
94 |
|
95 |
/**
|
96 |
* This method will be called right before the transformation is applied
|
97 |
* to let the instance of this interface perform some action.
|
98 |
*
|
99 |
* @param store the {@link FeatureStore} to be transformed
|
100 |
* @param transform the {@link FeatureStoreTransform} to be applied
|
101 |
*/
|
102 |
public void beforeApplyingTransform(FeatureStore store, FeatureStoreTransform transform); |
103 |
|
104 |
/**
|
105 |
* This method will be called right after the transformation is applied
|
106 |
* to let the instance of this interface perform some action.
|
107 |
*
|
108 |
* @param store the {@link FeatureStore} that has been transformed
|
109 |
* @param transform the {@link FeatureStoreTransform} that has been applied
|
110 |
*/
|
111 |
public void afterApplyingTransform(FeatureStore store, FeatureStoreTransform transform); |
112 |
|
113 |
} |
114 |
|