21 |
21 |
private int wComp = 404, hComp = 120;
|
22 |
22 |
private int wHalf = (int)Math.floor((wComp - MARGIN) >> 1) - 4, hHalf = 92;
|
23 |
23 |
private int wData = wHalf - MARGIN, hData = (int)Math.floor(hHalf/3);
|
24 |
|
|
|
24 |
|
25 |
25 |
private JPanel pResolution = null;
|
26 |
26 |
private JPanel pOption = null;
|
27 |
27 |
private JPanel pDataInput = null;
|
... | ... | |
40 |
40 |
private JLabel lWidthH = null;
|
41 |
41 |
private JLabel lInterpolation = null;
|
42 |
42 |
private JComboBox cInterpolation = null;
|
43 |
|
|
|
43 |
|
44 |
44 |
/**
|
45 |
45 |
* This is the default constructor
|
46 |
46 |
*/
|
... | ... | |
51 |
51 |
|
52 |
52 |
/**
|
53 |
53 |
* This method initializes this
|
54 |
|
*
|
|
54 |
*
|
55 |
55 |
* @return void
|
56 |
56 |
*/
|
57 |
57 |
private void initialize() {
|
... | ... | |
69 |
69 |
}
|
70 |
70 |
|
71 |
71 |
/**
|
72 |
|
* This method initializes jPanel
|
73 |
|
*
|
74 |
|
* @return javax.swing.JPanel
|
|
72 |
* This method initializes jPanel
|
|
73 |
*
|
|
74 |
* @return javax.swing.JPanel
|
75 |
75 |
*/
|
76 |
76 |
private JPanel getPResolution() {
|
77 |
77 |
if (pResolution == null) {
|
... | ... | |
92 |
92 |
}
|
93 |
93 |
|
94 |
94 |
/**
|
95 |
|
* This method initializes jPanel
|
96 |
|
*
|
97 |
|
* @return javax.swing.JPanel
|
|
95 |
* This method initializes jPanel
|
|
96 |
*
|
|
97 |
* @return javax.swing.JPanel
|
98 |
98 |
*/
|
99 |
99 |
private JPanel getPOption() {
|
100 |
100 |
if (pOption == null) {
|
... | ... | |
114 |
114 |
}
|
115 |
115 |
|
116 |
116 |
/**
|
117 |
|
* This method initializes jPanel1
|
118 |
|
*
|
119 |
|
* @return javax.swing.JPanel
|
|
117 |
* This method initializes jPanel1
|
|
118 |
*
|
|
119 |
* @return javax.swing.JPanel
|
120 |
120 |
*/
|
121 |
121 |
private JPanel getPDataInput() {
|
122 |
122 |
if (pDataInput == null) {
|
... | ... | |
140 |
140 |
}
|
141 |
141 |
|
142 |
142 |
/**
|
143 |
|
* This method initializes jPanel
|
144 |
|
*
|
145 |
|
* @return javax.swing.JPanel
|
|
143 |
* This method initializes jPanel
|
|
144 |
*
|
|
145 |
* @return javax.swing.JPanel
|
146 |
146 |
*/
|
147 |
147 |
private JPanel getPRatio() {
|
148 |
148 |
if (pRatio == null) {
|
... | ... | |
160 |
160 |
}
|
161 |
161 |
|
162 |
162 |
/**
|
163 |
|
* This method initializes jPanel
|
164 |
|
*
|
165 |
|
* @return javax.swing.JPanel
|
|
163 |
* This method initializes jPanel
|
|
164 |
*
|
|
165 |
* @return javax.swing.JPanel
|
166 |
166 |
*/
|
167 |
167 |
private JPanel getPInterpolation() {
|
168 |
168 |
if (pInterpolation == null) {
|
... | ... | |
180 |
180 |
}
|
181 |
181 |
|
182 |
182 |
/**
|
183 |
|
* This method initializes getPCellSize
|
184 |
|
*
|
185 |
|
* @return javax.swing.JPanel
|
|
183 |
* This method initializes getPCellSize
|
|
184 |
*
|
|
185 |
* @return javax.swing.JPanel
|
186 |
186 |
*/
|
187 |
187 |
public JPanel getPCellSize() {
|
188 |
188 |
if (pCellSize == null) {
|
... | ... | |
198 |
198 |
}
|
199 |
199 |
return pCellSize;
|
200 |
200 |
}
|
201 |
|
|
|
201 |
|
202 |
202 |
/**
|
203 |
|
* This method initializes getPHeight
|
204 |
|
*
|
205 |
|
* @return javax.swing.JPanel
|
|
203 |
* This method initializes getPHeight
|
|
204 |
*
|
|
205 |
* @return javax.swing.JPanel
|
206 |
206 |
*/
|
207 |
207 |
public JPanel getPHeight() {
|
208 |
208 |
if (pHeight == null) {
|
... | ... | |
218 |
218 |
}
|
219 |
219 |
return pHeight;
|
220 |
220 |
}
|
221 |
|
|
|
221 |
|
222 |
222 |
/**
|
223 |
|
* This method initializes getPWidth
|
224 |
|
*
|
225 |
|
* @return javax.swing.JPanel
|
|
223 |
* This method initializes getPWidth
|
|
224 |
*
|
|
225 |
* @return javax.swing.JPanel
|
226 |
226 |
*/
|
227 |
227 |
public JPanel getPWidth() {
|
228 |
228 |
if (pWidth == null) {
|
... | ... | |
238 |
238 |
}
|
239 |
239 |
return pWidth;
|
240 |
240 |
}
|
241 |
|
|
|
241 |
|
242 |
242 |
/**
|
243 |
|
* This method initializes jPanel1
|
244 |
|
*
|
245 |
|
* @return javax.swing.JPanel
|
|
243 |
* This method initializes jPanel1
|
|
244 |
*
|
|
245 |
* @return javax.swing.JPanel
|
246 |
246 |
*/
|
247 |
247 |
public DataInputContainer getCCellSize() {
|
248 |
248 |
if (cCellSize == null) {
|
249 |
|
cCellSize = new DataInputContainer(50);
|
250 |
|
cCellSize.setComponentSize(180, 0);
|
|
249 |
cCellSize = new DataInputContainer();
|
|
250 |
//cCellSize.setComponentSize(180, 0);
|
251 |
251 |
cCellSize.setLabelText(Messages.getText("celda"));
|
252 |
252 |
cCellSize.setDecimal(true);
|
253 |
253 |
}
|
... | ... | |
255 |
255 |
}
|
256 |
256 |
|
257 |
257 |
/**
|
258 |
|
* This method initializes jPanel2
|
259 |
|
*
|
260 |
|
* @return javax.swing.JPanel
|
|
258 |
* This method initializes jPanel2
|
|
259 |
*
|
|
260 |
* @return javax.swing.JPanel
|
261 |
261 |
*/
|
262 |
262 |
public DataInputContainer getCHeight() {
|
263 |
263 |
if (cHeight == null) {
|
264 |
|
cHeight = new DataInputContainer(50);
|
265 |
|
cHeight.setComponentSize(180, 0);
|
|
264 |
cHeight = new DataInputContainer();
|
|
265 |
//cHeight.setComponentSize(180, 0);
|
266 |
266 |
cHeight.setLabelText(Messages.getText("alto"));
|
267 |
267 |
cHeight.setDecimal(true);
|
268 |
268 |
}
|
... | ... | |
270 |
270 |
}
|
271 |
271 |
|
272 |
272 |
/**
|
273 |
|
* This method initializes jPanel
|
274 |
|
*
|
275 |
|
* @return javax.swing.JPanel
|
|
273 |
* This method initializes jPanel
|
|
274 |
*
|
|
275 |
* @return javax.swing.JPanel
|
276 |
276 |
*/
|
277 |
277 |
public DataInputContainer getCWidth() {
|
278 |
278 |
if (cWidth == null) {
|
279 |
|
cWidth = new DataInputContainer(50);
|
280 |
|
cWidth.setComponentSize(180, 0);
|
|
279 |
cWidth = new DataInputContainer();
|
|
280 |
//cWidth.setComponentSize(180, 0);
|
281 |
281 |
cWidth.setLabelText(Messages.getText("ancho"));
|
282 |
282 |
cWidth.setDecimal(true);
|
283 |
283 |
}
|
... | ... | |
285 |
285 |
}
|
286 |
286 |
|
287 |
287 |
/**
|
288 |
|
* This method initializes jPanel
|
289 |
|
*
|
290 |
|
* @return javax.swing.JPanel
|
|
288 |
* This method initializes jPanel
|
|
289 |
*
|
|
290 |
* @return javax.swing.JPanel
|
291 |
291 |
*/
|
292 |
292 |
private JPanel getPButtons() {
|
293 |
293 |
if (pButtons == null) {
|
... | ... | |
306 |
306 |
}
|
307 |
307 |
|
308 |
308 |
/**
|
309 |
|
* This method initializes jRadioButton
|
310 |
|
*
|
311 |
|
* @return javax.swing.JRadioButton
|
|
309 |
* This method initializes jRadioButton
|
|
310 |
*
|
|
311 |
* @return javax.swing.JRadioButton
|
312 |
312 |
*/
|
313 |
313 |
private JRadioButton getRSize() {
|
314 |
314 |
if (rSize == null) {
|
... | ... | |
318 |
318 |
}
|
319 |
319 |
|
320 |
320 |
/**
|
321 |
|
* This method initializes jRadioButton1
|
322 |
|
*
|
323 |
|
* @return javax.swing.JRadioButton
|
|
321 |
* This method initializes jRadioButton1
|
|
322 |
*
|
|
323 |
* @return javax.swing.JRadioButton
|
324 |
324 |
*/
|
325 |
325 |
private JRadioButton getRWidthH() {
|
326 |
326 |
if (rWidthH == null) {
|
... | ... | |
330 |
330 |
}
|
331 |
331 |
|
332 |
332 |
/**
|
333 |
|
* This method initializes jComboBox
|
334 |
|
*
|
335 |
|
* @return javax.swing.JComboBox
|
|
333 |
* This method initializes jComboBox
|
|
334 |
*
|
|
335 |
* @return javax.swing.JComboBox
|
336 |
336 |
*/
|
337 |
337 |
private JComboBox getJComboBox() {
|
338 |
338 |
if (cInterpolation == null) {
|
... | ... | |
343 |
343 |
cInterpolation.addItem(Messages.getText("distancia_inversa"));
|
344 |
344 |
cInterpolation.addItem(Messages.getText("bicubico"));
|
345 |
345 |
cInterpolation.addItem(Messages.getText("b_splines"));
|
346 |
|
|
|
346 |
|
347 |
347 |
}
|
348 |
348 |
return cInterpolation;
|
349 |
349 |
}
|
350 |
350 |
|
351 |
|
|
|
351 |
|
352 |
352 |
public void setComponentSize(int w, int h){
|
353 |
353 |
/*wComp = w; hComp = 120;
|
354 |
354 |
wHalf = (int)Math.floor((wComp-10)/2); hHalf = 95;
|
355 |
355 |
wData = wHalf - 10; hData = (int)Math.floor(hHalf/3);
|
356 |
|
|
|
356 |
|
357 |
357 |
this.setPreferredSize(new Dimension(wComp, hComp));
|
358 |
358 |
getPResolution().setPreferredSize(new java.awt.Dimension(wComp,hComp));
|
359 |
359 |
getPOption().setPreferredSize(new java.awt.Dimension(wHalf,hHalf));
|
... | ... | |
369 |
369 |
getPWidth().setPreferredSize(new java.awt.Dimension(wHalf,hData));
|
370 |
370 |
getCWidth().setComponentSize(wData,hData);
|
371 |
371 |
getCWidth().setComponentHeight(hData);*/
|
372 |
|
|
|
372 |
|
373 |
373 |
}
|
374 |
|
|
|
374 |
|
375 |
375 |
/**
|
376 |
376 |
* Asigna el valor del campo "tama?o de celda" a partir del double que lo representa
|
377 |
377 |
* y con el n?mero de decimales que se especifica en el par?metro dec
|
... | ... | |
386 |
386 |
cCellSize.setValue(String.valueOf(cellSize));
|
387 |
387 |
}
|
388 |
388 |
}
|
389 |
|
|
|
389 |
|
390 |
390 |
/**
|
391 |
391 |
* Asigna el valor del campo "Ancho" a partir del double que lo representa
|
392 |
392 |
* y con el n?mero de decimales que se especifica en el par?metro dec
|
... | ... | |
401 |
401 |
cWidth.setValue(String.valueOf(width));
|
402 |
402 |
}
|
403 |
403 |
}
|
404 |
|
|
|
404 |
|
405 |
405 |
/**
|
406 |
406 |
* Asigna el valor del campo "Alto" a partir del double que lo representa
|
407 |
407 |
* y con el n?mero de decimales que se especifica en el par?metro dec
|
... | ... | |
416 |
416 |
cHeight.setValue(String.valueOf(height));
|
417 |
417 |
}
|
418 |
418 |
}
|
419 |
|
|
|
419 |
|
420 |
420 |
/**
|
421 |
421 |
* Devuelve el valor del campo "tama?o de celda"
|
422 |
422 |
* @return
|
... | ... | |
424 |
424 |
public double getCellSizeText(){
|
425 |
425 |
return Double.parseDouble(cCellSize.getValue());
|
426 |
426 |
}
|
427 |
|
|
|
427 |
|
428 |
428 |
/**
|
429 |
429 |
* Devuelve el valor del campo "tama?o de celda"
|
430 |
430 |
* @return
|
... | ... | |
432 |
432 |
public double getWidthText(){
|
433 |
433 |
return Double.parseDouble(cWidth.getValue());
|
434 |
434 |
}
|
435 |
|
|
|
435 |
|
436 |
436 |
/**
|
437 |
437 |
* Devuelve el valor del campo "tama?o de celda"
|
438 |
438 |
* @return
|
... | ... | |
440 |
440 |
public double getHeightText(){
|
441 |
441 |
return Double.parseDouble(cHeight.getValue());
|
442 |
442 |
}
|
443 |
|
|
|
443 |
|
444 |
444 |
/**
|
445 |
445 |
* Devuelve los valores de Alto x Acho de la resoluci?n espacial
|
446 |
446 |
* @return
|
... | ... | |
451 |
451 |
};
|
452 |
452 |
return text;
|
453 |
453 |
}
|
454 |
|
|
|
454 |
|
455 |
455 |
/**
|
456 |
456 |
* Devuelve el metodo de interpolacion.
|
457 |
457 |
* @return
|
... | ... | |
459 |
459 |
public String getInterpolation(){
|
460 |
460 |
return (String)this.getJComboBox().getSelectedItem();
|
461 |
461 |
}
|
462 |
|
|
463 |
|
|
|
462 |
|
|
463 |
|
464 |
464 |
/**************************************************************/
|
465 |
465 |
/********************Listeners*********************************/
|
466 |
466 |
/**************************************************************/
|
467 |
|
|
|
467 |
|
468 |
468 |
public void actionPerformed(ActionEvent e) {
|
469 |
469 |
if (e.getSource() == this.getRSize()){
|
470 |
470 |
this.getRSize().setSelected(true);
|
... | ... | |
481 |
481 |
cWidth.setControlEnabled(true);
|
482 |
482 |
}
|
483 |
483 |
}
|
484 |
|
|
485 |
|
|
|
484 |
|
|
485 |
|
486 |
486 |
}
|