Statistics
| Revision:

root / trunk / extensions / extRasterTools-SE / src / org / gvsig / rastertools / geolocation / ui / GeolocationBaseClassPanel.java @ 17503

History | View | Annotate | Download (5.49 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2007 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 */
19
package org.gvsig.rastertools.geolocation.ui;
20

    
21
import java.awt.geom.AffineTransform;
22

    
23
import javax.swing.JButton;
24
import javax.swing.JPanel;
25

    
26
import org.gvsig.fmap.raster.layers.FLyrRasterSE;
27
import org.gvsig.gui.beans.datainput.DataInputContainer;
28
import org.gvsig.raster.util.Historical;
29
import org.gvsig.rastertools.geolocation.listener.GeoLocationPanelListener;
30

    
31
import com.iver.cit.gvsig.fmap.MapControl;
32
import com.iver.cit.gvsig.fmap.ViewPort;
33

    
34
/**
35
 * Clase base para los paneles que tienen la geolocalizaci?n. Tiene los m?todos necesarios
36
 * para que el listener que gestiona sus acciones sea com?n.
37
 * 
38
 * 13/12/2007
39
 * @author Nacho Brodin nachobrodin@gmail.com
40
 */
41
public abstract class GeolocationBaseClassPanel extends JPanel {
42
        private FLyrRasterSE                              lyr = null;
43
    private boolean                                   geolocModify = false;
44
    private MapControl                                mapCtrl = null;
45
        private ViewPort                                  vp = null;
46
        protected GeoLocationPanelListener                listener = null;
47
        /**
48
     * N?mero de decimales a mostrar
49
     */
50
    protected int                                     tailValue = 2;
51
        
52
        /**
53
         * Obtiene la capa raster asociada
54
         * @return
55
         */
56
        public FLyrRasterSE getLayer() {
57
                return this.lyr;
58
        }
59
        
60
        /**
61
         * Asigna la capa raster asociada
62
         * @return
63
         */
64
        public void setLayer(FLyrRasterSE lyr) {
65
                this.lyr = lyr;
66
        }
67
        
68
        /**
69
         * Obtiene el viewport de la vista en el momento de lanzar el interfaz
70
         * @return
71
         */
72
        public ViewPort getViewPort() {
73
                return this.vp;
74
        }
75
        
76
        /**
77
         * Asigna el viewport de la vista en el momento de lanzar el interfaz
78
         * @return
79
         */
80
        public void setViewPort(ViewPort vp) {
81
                this.vp = vp;
82
        }
83
        
84
        /**
85
         * Obtiene el MapControl
86
         * @return MapControl
87
         */
88
        public MapControl getMapCtrl() {
89
                return mapCtrl;
90
        }
91
        
92
        /**
93
         * Asigna el MapControl
94
         * @param mapCtrl
95
         */
96
        public void setMapCtrl(MapControl mapCtrl) {
97
                this.mapCtrl = mapCtrl;
98
        }
99
        
100
        /**
101
         * Carga los par?metros en el dialogo a partir de la capa
102
         * @param lyr Capa raster
103
         */
104
        public abstract void loadTransform(AffineTransform at);
105
        
106
        /**
107
         * Activa o desactiva los botones de transformaci?n anterior y siguiente dependiendo
108
         * del estado de la lista de transformaciones.
109
         * @return
110
         */
111
        public void activeButtons() {}
112
        
113
        /**
114
         * Asigna el flag que dice si se ha modificado la georreferenciaci?n
115
         * y a?n no se ha salvado
116
         * @return true si se ha modificado y false si no se ha hecho
117
         */
118
        public void setModify(boolean modif) {
119
                geolocModify = modif;
120
        }
121
        
122
        /**
123
         * Obtiene el flag que dice si se ha modificado la georreferenciaci?n
124
         * y a?n no se ha salvado
125
         * @return true si se ha modificado y false si no se ha hecho
126
         */
127
        public boolean getModify() {
128
                return geolocModify;
129
        }
130
        
131
        /**
132
         * Obtiene el bot?n de aplicar
133
         * @return JButton
134
         */
135
        public JButton getApplyButton() {
136
                return null;
137
        }
138
        
139
        /**
140
         * Obtiene el bot?n de cancelar
141
         * @return JButton
142
         */
143
        public JButton getCancelButton() {
144
                return null;
145
        }
146

    
147
        /**
148
         * Obtiene el bot?n de atr?s
149
         * @return JButton
150
         */
151
        public JButton getBackButton() {
152
                return null;
153
        }
154

    
155
        /**
156
         * Obtiene el bot?n de ir a la primera transformaci?n
157
         * @return JButton
158
         */
159
        public JButton getFirstButton() {
160
                return null;
161
        }
162

    
163
        /**
164
     * Obtiene el bot?n de salvar
165
         * @return JButton
166
         */
167
        public JButton getSaveButton() {
168
                return null;
169
        }
170
        
171
        /**
172
     * Obtiene el bot?n de reset
173
         * @return JButton
174
         */
175
        public JButton getResetButton() {
176
                return null;
177
        }
178
        
179
        /**
180
         * Obtiene el bot?n de siguiente transformaci?n
181
         * @return JButton
182
         */
183
        public JButton getNextButton() {
184
                return null;
185
        }
186
        
187
        /**
188
         * Obtiene el bot?n de carga de georreferenciaci?n desde tfw
189
         * @return JButton
190
         */
191
        public JButton getTfwLoad() {
192
                return null;
193
        }
194

    
195
        /**
196
         * Obtiene el bot?n de centrado de raster en la vista
197
         * @return JButton
198
         */
199
        public JButton getCenterToView() {
200
                return null;
201
        }
202
        
203
        /**
204
         * Obtiene el tama?o de pixel en X
205
         * @return
206
         */
207
        public abstract DataInputContainer getPsx();
208

    
209
        /**
210
         * Obtiene el tama?o de pixel en Y
211
         * @return
212
         */
213
        public abstract DataInputContainer getPsy();
214

    
215
        /**
216
         * Obtiene la rotaci?n en X
217
         * @return
218
         */
219
        public abstract DataInputContainer getRotx();
220

    
221
        /**
222
         * Obtiene la rotaci?n en Y
223
         * @return
224
         */
225
        public abstract DataInputContainer getRoty();
226

    
227
        /**
228
         * Obtiene la X de la coordenada superior izquierda
229
         * @return
230
         */
231
        public abstract DataInputContainer getUlx();
232

    
233
        /**
234
         * Obtiene la Y de la coordenada superior izquierda
235
         * @return
236
         */
237
        public abstract DataInputContainer getUly();
238
                
239
        /**
240
         * Obtiene el historico de transformaciones
241
         * @return Historical
242
         */
243
        public Historical getHistorical() {
244
                return lyr.getAffineTransformHistorical();
245
        }
246
}