Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extRasterTools-SE / src / org / gvsig / rastertools / geolocation / ui / GeolocationBaseClassPanel.java @ 27490

History | View | Annotate | Download (5.61 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.mapcontext.ViewPort;
27
import org.gvsig.fmap.mapcontrol.MapControl;
28
import org.gvsig.fmap.raster.layers.FLyrRasterSE;
29
import org.gvsig.gui.beans.datainput.DataInputContainer;
30
import org.gvsig.raster.util.Historical;
31
import org.gvsig.rastertools.geolocation.listener.GeoLocationPanelListener;
32
/**
33
 * Clase base para los paneles que tienen la geolocalizaci?n. Tiene los m?todos necesarios
34
 * para que el listener que gestiona sus acciones sea com?n.
35
 * 
36
 * 13/12/2007
37
 * @author Nacho Brodin nachobrodin@gmail.com
38
 */
39
public abstract class GeolocationBaseClassPanel extends JPanel {
40
        private static final long serialVersionUID = 1055900686557565837L;
41
        private FLyrRasterSE               lyr          = null;
42
        private boolean                    geolocModify = false;
43
        private MapControl                 mapCtrl      = null;
44
        private ViewPort                   vp           = null;
45
        protected GeoLocationPanelListener listener     = null;
46

    
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 bot?n de recuperaci?n del foco de la tool
205
         * @return JButton
206
         */
207
        public JButton getFocus() {
208
                return null;
209
        }
210
        
211
        /**
212
         * Obtiene el tama?o de pixel en X
213
         * @return
214
         */
215
        public abstract DataInputContainer getPsx();
216

    
217
        /**
218
         * Obtiene el tama?o de pixel en Y
219
         * @return
220
         */
221
        public abstract DataInputContainer getPsy();
222

    
223
        /**
224
         * Obtiene la rotaci?n en X
225
         * @return
226
         */
227
        public abstract DataInputContainer getRotx();
228

    
229
        /**
230
         * Obtiene la rotaci?n en Y
231
         * @return
232
         */
233
        public abstract DataInputContainer getRoty();
234

    
235
        /**
236
         * Obtiene la X de la coordenada superior izquierda
237
         * @return
238
         */
239
        public abstract DataInputContainer getUlx();
240

    
241
        /**
242
         * Obtiene la Y de la coordenada superior izquierda
243
         * @return
244
         */
245
        public abstract DataInputContainer getUly();
246
                
247
        /**
248
         * Obtiene el historico de transformaciones
249
         * @return Historical
250
         */
251
        public Historical getHistorical() {
252
                return lyr.getAffineTransformHistorical();
253
        }
254
}