Revision 10786

View differences:

branches/F2/extensions/extJCRS/src-test/org/gvsig/crs/gui/wizard/DefinirDatumOld.java
1
package org.gvsig.crs.gui.wizard;
2

  
3
import java.awt.BorderLayout;
4
import java.awt.Dimension;
5
import java.awt.GridBagConstraints;
6
import java.awt.GridBagLayout;
7
import java.awt.Insets;
8
import java.awt.event.ActionEvent;
9
import java.awt.event.ActionListener;
10

  
11
import javax.swing.BorderFactory;
12
import javax.swing.ButtonGroup;
13
import javax.swing.JButton;
14
import javax.swing.JLabel;
15
import javax.swing.JPanel;
16
import javax.swing.JRadioButton;
17
import javax.swing.JTextField;
18
import javax.swing.border.Border;
19

  
20
import com.iver.utiles.swing.JComboBox;
21

  
22
/**
23
 * Panel de definici?n del Datum 
24
 * 
25
 * @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
26
 * 
27
 *
28
 */
29
public class DefinirDatumOld extends JPanel implements ActionListener{
30
	
31
	private JTextField txtDatum;
32
	private JTextField txtElipsoide;
33
	private JTextField txtSemMay;
34
	private JTextField txtSemMen;
35
	private JTextField txtInvF;
36
	private JTextField txtMeridian;
37
	private JTextField txtLong;
38
	
39
	private JLabel lblDatum;
40
	private JLabel lblElipsoide;
41
	private JLabel lblSemMay;
42
	private JLabel lblSemMen;
43
	private JLabel lblInvF;
44
	private JLabel lblMeridian;
45
	private JLabel lblLong;
46
	
47
	private JButton btnImportDatum;
48
	private JButton btnImportElipsoide;
49
	private JButton btnImportMeridian;
50
	
51
	private JComboBox cbSemMay;
52
	private JComboBox cbSemMen;
53
	private JComboBox cbInvF;
54
	private JComboBox cbLong;
55
	
56
	private JRadioButton rbSemMay;
57
	private JRadioButton rbSemMen;
58
	private JRadioButton rbInvF;
59
	private ButtonGroup groupRadioButton;
60
	
61
	private Dimension bigSize;
62
	private Dimension smallSize;
63

  
64
	
65
	private static final long serialVersionUID = 1L;
66

  
67
	public DefinirDatumOld() {
68
		super();
69
		this.setLayout(new BorderLayout());
70
		bigSize=new Dimension();
71
		bigSize.width=200;
72
		smallSize=new Dimension();
73
		smallSize.width=130;
74
		initialize();
75
		Border raisedbevel = BorderFactory.createRaisedBevelBorder();
76
		Border loweredbevel = BorderFactory.createLoweredBevelBorder();
77
		Border compound;
78
		compound = BorderFactory.createCompoundBorder(
79
				  raisedbevel, loweredbevel);
80
		this.setBorder(compound);
81

  
82
		
83
	}
84
	/*Inicializa todos los elementos del panel*/
85
	private void initialize() {
86
		JPanel pCenter;
87
		pCenter=new JPanel();
88
		//TODO: Usar GridBagLayoutPanel
89
		/*GridBagLayoutPanel, panel de gvsig que
90
		  permite agregar objetos f?cilmente */
91
		pCenter.setLayout(new GridBagLayout());
92
		GridBagConstraints c=new GridBagConstraints();
93
		c.fill=GridBagConstraints.BOTH;
94
		c.anchor=GridBagConstraints.WEST;
95
		//Insets(top,left,bottom,rigth);
96
		c.insets=new Insets(4,8,4,8);
97
		c.gridx = 0;
98
		c.gridy = 0;
99
		pCenter.add(getLblDatum(),c);
100
		
101
		c.anchor=GridBagConstraints.EAST;
102
		c.gridx=1;
103
		c.gridy=0;
104
		pCenter.add(getTxtDatum(),c);
105
		
106
		c.gridx=3;
107
		c.gridy=0;
108
		pCenter.add(getBtnImportDatum(),c);
109
		
110
		c.anchor=GridBagConstraints.WEST;
111
		c.gridx=0;
112
		c.gridy=1;
113
		pCenter.add(getLblElipsoide(),c);
114
		
115
		c.anchor=GridBagConstraints.EAST;
116
		c.gridx=1;
117
		c.gridy=1;
118
		pCenter.add(getTxtElipsoide(),c);
119
		
120
		c.gridx=3;
121
		c.gridy=1;
122
		pCenter.add(getBtnImportElipsoide(),c);
123
		
124
		c.fill=GridBagConstraints.NONE;
125
		c.anchor=GridBagConstraints.EAST;
126
		c.gridx=0;
127
		c.gridy=2;
128
		pCenter.add(getLblSemMay(),c);
129
		
130
		c.gridx=1;
131
		c.gridy=2;
132
		pCenter.add(getTxtSemMay(),c);
133
		
134
		c.gridx=2;
135
		c.gridy=2;
136
		pCenter.add(getRbSemMay(),c);
137
		
138
		c.gridx=3;
139
		c.gridy=2;
140
		pCenter.add(getCbSemMay(),c);
141
		
142
		c.gridx=0;
143
		c.gridy=3;
144
		pCenter.add(getLblSemMen(),c);
145
		
146
		c.gridx=1;
147
		c.gridy=3;
148
		pCenter.add(getTxtSemMen(),c);
149
		
150
		c.gridx=2;
151
		c.gridy=3;
152
		pCenter.add(getRbSemMen(),c);
153
		
154
		c.gridx=3;
155
		c.gridy=3;
156
		pCenter.add(getCbSemMen(),c);
157
		
158
		c.gridx=0;
159
		c.gridy=4;
160
		pCenter.add(getLblInvF(),c);
161
		
162
		c.gridx=1;
163
		c.gridy=4;
164
		pCenter.add(getTxtInvF(),c);
165
		
166
		c.gridx=2;
167
		c.gridy=4;
168
		pCenter.add(getRbInvF(),c);
169
		
170
		c.gridx=3;
171
		c.gridy=4;
172
		pCenter.add(getCbInvF(),c);
173
		/*Agrupar todos los Radio Buttons una vez insertados*/
174
		agruparRadioButtons();
175
		
176
		c.anchor=GridBagConstraints.WEST;
177
		c.fill=GridBagConstraints.BOTH;
178
		c.gridx=0;
179
		c.gridy=5;
180
		pCenter.add(getLblMeridian(),c);
181
		
182
		c.anchor=GridBagConstraints.EAST;
183
		c.gridx=1;
184
		c.gridy=5;
185
		pCenter.add(getTxtMeridian(),c);
186
		
187
		c.gridx=3;
188
		c.gridy=5;
189
		pCenter.add(getBtnImportMeridian(),c);
190
		
191
		c.fill=GridBagConstraints.NONE;
192
		c.gridx=0;
193
		c.gridy=6;
194
		pCenter.add(getLblLong(),c);
195
		
196
		c.gridx=1;
197
		c.gridy=6;
198
		pCenter.add(getTxtLong(),c);
199
		
200
		c.gridx=3;
201
		c.gridy=6;
202
		pCenter.add(getCbLong(),c);
203
		
204
		this.add(pCenter,BorderLayout.CENTER);
205
	}
206
	/**
207
	 * Inicializa el bot?n Importar del datum
208
	 * @return
209
	 */
210
	public JButton getBtnImportDatum() {
211
		if(btnImportDatum==null){
212
			btnImportDatum=new JButton();
213
			//TODO: Comprobar que funcionan las traducciones
214
			//btnImportDatum.setText(PluginServices.getText(this, "jpDat_Importar"));
215
			btnImportDatum.setText("Importar");
216
			btnImportDatum.addActionListener(this);
217
		}
218
		return btnImportDatum;
219
	}
220
	/**
221
	 * Inicializa el bot?n Importar del Elipsoide
222
	 * @return
223
	 */
224
	public JButton getBtnImportElipsoide() {
225
		if(btnImportElipsoide==null){
226
			btnImportElipsoide=new JButton();
227
			//TODO: Comprobar que funcionan las traducciones
228
			//btnImportElipsoide.setText(PluginServices.getText(this, "jpDat_Importar"));
229
			btnImportElipsoide.setText("Importar");
230
			btnImportElipsoide.addActionListener(this);
231
		}
232
		return btnImportElipsoide;
233
	}
234
	/**
235
	 * Inicializa el bot?n Importar del Meridiano
236
	 * @return
237
	 */
238
	public JButton getBtnImportMeridian() {
239
		if(btnImportMeridian==null){
240
			btnImportMeridian=new JButton();
241
			//TODO: Comprobar que funcionan las traducciones
242
			//btnImportMeridian.setText(PluginServices.getText(this, "jpDat_Importar"));
243
			btnImportMeridian.setText("Importar");
244
			btnImportMeridian.addActionListener(this);
245
		}
246
		return btnImportMeridian;
247
	}
248
	/**
249
	 * Inicializa el Combo box con las unidades de Inverse Flat
250
	 * @return
251
	 */
252
	public JComboBox getCbInvF() {
253
		if (cbInvF==null){
254
			cbInvF=new JComboBox();
255
			//TODO: Agregar los items 
256
			cbInvF.addItem("Metros");
257
			cbInvF.addItem("Grados");
258
			/*Seleccionar un item por defecto*/
259
			cbInvF.setSelectedIndex(0);
260
			cbInvF.addActionListener(this);
261
		}
262
		return cbInvF;
263
	}
264
	/**
265
	 * Inicializa el Combo box con las unidades de Longitud
266
	 * @return
267
	 */
268
	public JComboBox getCbLong() {
269
		if (cbLong==null){
270
			cbLong=new JComboBox();
271
			//TODO: Agregar los items 
272
			cbLong.addItem("Metros");
273
			cbLong.addItem("Grados");
274
			/*Seleccionar un item por defecto*/
275
			cbLong.setSelectedIndex(0);
276
			cbLong.addActionListener(this);
277
		}
278
		return cbLong;
279
	}
280
	/**
281
	 * Inicializa el Combo box con las unidades de Semieje Mayor
282
	 * @return
283
	 */
284
	public JComboBox getCbSemMay() {
285
		if (cbSemMay==null){
286
			cbSemMay=new JComboBox();
287
			//TODO: Agregar los items 
288
			cbSemMay.addItem("Metros");
289
			cbSemMay.addItem("Grados");
290
			/*Seleccionar un item por defecto*/
291
			cbSemMay.setSelectedIndex(0);
292
			cbSemMay.addActionListener(this);
293
		}
294
		return cbSemMay;
295
	}
296
	/**
297
	 * Inicializa el Combo box con las unidades de Semieje Menor
298
	 * @return
299
	 */
300
	public JComboBox getCbSemMen() {
301
		if (cbSemMen==null){
302
			cbSemMen=new JComboBox();
303
			//TODO: Agregar los items 
304
			cbSemMen.addItem("Metros");
305
			cbSemMen.addItem("Grados");
306
			/*Seleccionar un item por defecto*/
307
			cbSemMen.setSelectedIndex(0);
308
			cbSemMen.addActionListener(this);
309
		}
310
		return cbSemMen;
311
	}
312
	/**
313
	 * Inicializa el JLabel Datum
314
	 * @return
315
	 */
316
	public JLabel getLblDatum() {
317
		if (lblDatum==null){
318
			lblDatum=new JLabel();
319
			//TODO: Comprobar que funcionan las traducciones
320
			//lblDatum.setText(PluginServices.getText(this,"jpDat_Datum"));
321
			lblDatum.setText("Datum");
322
		}
323
		return lblDatum;
324
	}
325
	/**
326
	 * Inicializa el JLabel Elipsoide
327
	 * @return
328
	 */
329
	public JLabel getLblElipsoide() {
330
		if (lblElipsoide==null){
331
			lblElipsoide=new JLabel();
332
			//TODO: Comprobar que funcionan las traducciones
333
			//lblElipsoide.setText(PluginServices.getText(this,"jpDat_Elips"));
334
			lblElipsoide.setText("Elipsoide");
335
		}
336
		return lblElipsoide;
337
	}
338
	/**
339
	 * Inicializa el JLabel Inverse Flat
340
	 * @return
341
	 */
342
	public JLabel getLblInvF() {
343
		if (lblInvF==null){
344
			lblInvF=new JLabel();
345
			//TODO: Comprobar que funcionan las traducciones
346
			//lblInvF.setText(PluginServices.getText(this,"jpDat_InvF"));
347
			lblInvF.setText("Inverse Flat");
348
		}
349
		return lblInvF;
350
	}
351
	/**
352
	 * Inicializa el JLabel Longitud
353
	 * @return
354
	 */
355
	public JLabel getLblLong() {
356
		if (lblLong==null){
357
			lblLong=new JLabel();
358
			//TODO: Comprobar que funcionan las traducciones
359
			//lblLong.setText(PluginServices.getText(this,"jpDat_Long"));
360
			lblLong.setText("Longitud");
361
		}
362
		return lblLong;
363
	}
364
	/**
365
	 * Inicializa el JLabel Meridiano
366
	 * @return
367
	 */
368
	public JLabel getLblMeridian() {
369
		if (lblMeridian==null){
370
			lblMeridian=new JLabel();
371
			//TODO: Comprobar que funcionan las traducciones
372
			//lblMeridian.setText(PluginServices.getText(this,"jpDat_Meridian"));
373
			lblMeridian.setText("Meridiano");
374
		}
375
		return lblMeridian;
376
	}
377
	/**
378
	 * Inicializa el JLabel Semieje Mayor
379
	 * @return
380
	 */
381
	public JLabel getLblSemMay() {
382
		if (lblSemMay==null){
383
			lblSemMay=new JLabel();
384
			//TODO: Comprobar que funcionan las traducciones
385
			//lblSemMay.setText(PluginServices.getText(this,"jpDat_SemMay"));
386
			lblSemMay.setText("Semieje Mayor");
387
		}
388
		return lblSemMay;
389
	}
390
	/**
391
	 * Inicializa el JLabel Semieje Menor
392
	 * @return
393
	 */
394
	public JLabel getLblSemMen() {
395
		if (lblSemMen==null){
396
			lblSemMen=new JLabel();
397
			//TODO: Comprobar que funcionan las traducciones
398
			//lblSemMen.setText(PluginServices.getText(this,"jpDat_SemMen"));
399
			lblSemMen.setText("Semieje Menor");
400
		}
401
		return lblSemMen;
402
	}
403
	/**
404
	 * Inicializa el radio button  Inverse Flat del elipsoide
405
	 * @return
406
	 */
407
	public JRadioButton getRbInvF() {
408
		if(rbInvF==null){
409
			rbInvF=new JRadioButton();
410
			//TODO: Comprobar que funcionan las traducciones
411
			//rbInvF.setToolTipText(PluginServices.getText(this,"jpDat_InvFToolTipText"));
412
			rbInvF.setToolTipText("Fijar el par?metro Inverse Flat");
413
			rbInvF.addActionListener(this);
414
		}
415
		return rbInvF;
416
	}
417
	/**
418
	 * Inicializa el radio button Semieje Mayor del elipsoide
419
	 * @return
420
	 */
421
	public JRadioButton getRbSemMay() {
422
		if(rbSemMay==null){
423
			rbSemMay=new JRadioButton();
424
//			TODO: Comprobar que funcionan las traducciones
425
			//rbSemMay.setToolTipText(PluginServices.getText(this,"jpDat_SemMayToolTipText"));
426
			rbSemMay.setToolTipText("Fijar el par?metro Semieje Mayor");
427
			rbSemMay.addActionListener(this);
428
		}
429
		return rbSemMay;
430
	}
431
	/**
432
	 * Inicializa el radio Button del Semieje Menor del elipsoide
433
	 * @return
434
	 */
435
	public JRadioButton getRbSemMen() {
436
		if(rbSemMen==null){
437
			rbSemMen=new JRadioButton();
438
//			TODO: Comprobar que funcionan las traducciones
439
			//rbSemMen.setToolTipText(PluginServices.getText(this,"jpDat_SemMenToolTipText"));
440
			rbSemMen.setToolTipText("Fijar el par?metro Semieje Menor");			
441
			rbSemMen.addActionListener(this);
442
		}
443
		return rbSemMen;
444
	}
445
	/**
446
	 * Agrupa los Radio Button de los par?metros del elipsoide
447
	 * 
448
	 */
449
	private void agruparRadioButtons() {
450
		if(groupRadioButton==null){
451
			groupRadioButton=new ButtonGroup();
452
			/*Agrupar los radio Buttons*/
453
			groupRadioButton.add(getRbSemMay());
454
			groupRadioButton.add(getRbSemMen());
455
			groupRadioButton.add(getRbInvF());
456
			/*Selecciona por defecto el semieje mayor*/
457
			getRbSemMay().setSelected(true);
458
		}
459
	}
460
	/**
461
	 * Inicializa el cuadro de texto que contiene el datum
462
	 * @return
463
	 */
464
	public JTextField getTxtDatum() {
465
		if (txtDatum==null){
466
			txtDatum=new JTextField();
467
			bigSize.height=txtDatum.getPreferredSize().height;
468
			txtDatum.setPreferredSize(bigSize);
469
			txtDatum.addActionListener(this);
470
		}
471
		return txtDatum;
472
	}
473
	/**
474
	 * Inicializa el cuadro de texto que contiene el elipsoide
475
	 * @return
476
	 */
477
	public JTextField getTxtElipsoide() {
478
		if (txtElipsoide==null){
479
			txtElipsoide=new JTextField();
480
			txtElipsoide.addActionListener(this);
481
		}
482
		return txtElipsoide;
483
	}
484
	/**
485
	 * Inicializa el cuadro de texto que contiene el Inverse Flat del Elipsoide
486
	 * @return
487
	 */
488
	public JTextField getTxtInvF() {
489
		if (txtInvF==null){
490
			txtInvF=new JTextField();
491
			smallSize.height=txtInvF.getPreferredSize().height;
492
			txtInvF.setPreferredSize(smallSize);
493
			txtInvF.addActionListener(this);
494
		}
495
		return txtInvF;
496
	}
497
	/**
498
	 * Inicializa el cuadro de texto que contiene el dato de longitud del
499
	 * meridiano
500
	 * @return
501
	 */
502
	public JTextField getTxtLong() {
503
		if (txtLong==null){
504
			txtLong=new JTextField();
505
			smallSize.height=txtLong.getPreferredSize().height;
506
			txtLong.setPreferredSize(smallSize);
507
			txtLong.addActionListener(this);
508
		}
509
		return txtLong;
510
	}
511
	/**
512
	 * Inicializa el cuadro de texto que contiene el meridiano
513
	 * @return
514
	 */
515
	public JTextField getTxtMeridian() {
516
		if (txtMeridian==null){
517
			txtMeridian=new JTextField();
518
			txtMeridian.addActionListener(this);
519
		}
520
		return txtMeridian;
521
	}
522
	/**
523
	 * Inicializa el cuadro de texto que contiene el Semieje Mayor
524
	 * del elipsoide
525
	 * @return
526
	 */
527
	public JTextField getTxtSemMay() {
528
		if (txtSemMay==null){
529
			txtSemMay=new JTextField();
530
			smallSize.height=txtSemMay.getPreferredSize().height;
531
			txtSemMay.setPreferredSize(smallSize);
532
			txtSemMay.addActionListener(this);
533
		}
534
		return txtSemMay;
535
	}
536
	/**
537
	 * Inicializa el cuadro de texto que contiene el semieje
538
	 * menor del elipsoide
539
	 * @return
540
	 */
541
	public JTextField getTxtSemMen() {
542
		if (txtSemMen==null){
543
			txtSemMen=new JTextField();
544
			smallSize.height=txtSemMen.getPreferredSize().height;
545
			txtSemMen.setPreferredSize(smallSize);
546
			txtSemMen.addActionListener(this);
547
		}
548
		return txtSemMen;
549
	}
550
	/*
551
	 * Manejador de eventos de los controles
552
	 */
553
	public void actionPerformed(ActionEvent e) {
554
	
555
		if(e.getSource().equals(getTxtDatum())){
556
			System.out.println("txt Datum");
557
		}else if(e.getSource().equals(getTxtElipsoide())){
558
			System.out.println("txt Elipsoide");
559
		}else if(e.getSource().equals(getTxtInvF())){
560
			System.out.println("txt Inverse Flat");
561
		}else if(e.getSource().equals(getTxtSemMay())){
562
			System.out.println("txt Semieje Mayor");
563
		}else if(e.getSource().equals(getTxtSemMen())){
564
			System.out.println("txt Semieje Menor");
565
		}else if(e.getSource().equals(getTxtLong())){
566
			System.out.println("txt Longitud");
567
		}else if(e.getSource().equals(getTxtMeridian())){
568
			System.out.println("txt Meridiano");
569
		}else if(e.getSource().equals(getCbInvF())){
570
			System.out.println("combo box Inverse Flat");
571
		}else if(e.getSource().equals(getCbLong())){
572
			System.out.println("combo box Longitud");
573
		}else if(e.getSource().equals(getCbSemMay())){
574
			System.out.println("combo box Semieje Mayor");
575
		}else if(e.getSource().equals(getCbSemMen())){
576
			System.out.println("combo box Semieje Menor");
577
		}else if(e.getSource().equals(getBtnImportDatum())){
578
			System.out.println("Importar Datum");
579
		}else if(e.getSource().equals(getBtnImportElipsoide())){
580
			System.out.println("Importar Elipsoide");
581
		}else if(e.getSource().equals(getBtnImportMeridian())){
582
			System.out.println("Importar Meridiano");
583
		}else if(e.getSource().equals(getRbInvF())){
584
			System.out.println("opcion Inverse Flat");
585
		}else if(e.getSource().equals(getRbSemMay())){
586
			System.out.println("opcion Semieje Mayor");
587
		}else if(e.getSource().equals(getRbSemMen())){
588
			System.out.println("opcion Semieje Menor");
589
		}
590
		
591
	}
592

  
593
	
594
}
0 595

  
branches/F2/extensions/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java
1
package org.gvsig.crs.gui.wizard;
2

  
3

  
4
import java.awt.event.WindowAdapter;
5
import java.awt.event.WindowEvent;
6

  
7
import javax.swing.JFrame;
8
import javax.swing.JPanel;
9
import javax.swing.UIManager;
10
import javax.swing.UnsupportedLookAndFeelException;
11

  
12
import org.gvsig.crs.gui.panels.wizard.DefCrsUsr;
13

  
14
public class FrameDefinicionCRS {
15

  
16

  
17
	/**
18
	 * @param args
19
	 * @throws UnsupportedLookAndFeelException 
20
	 * @throws IllegalAccessException 
21
	 * @throws InstantiationException 
22
	 * @throws ClassNotFoundException 
23
	 */
24
	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
25
		
26
			/*
27
			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
28
			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
29
			 javax.swing.plaf.metal.MetalLookAndFeel
30
			 */
31
			UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
32
	         JFrame frame = new JFrame("Definici?n de CRS por el usuario");
33
	         //cerrar el formulario
34
	         frame.addWindowListener(new WindowAdapter() {
35
	             public void windowClosing(WindowEvent e) {System.exit(0);}
36
	         });
37
	         
38
	         frame.getContentPane().add(new DefCrsUsr());
39
	         frame.setSize(300,500);
40
	         //colocar en la pantalla
41
	         frame.setLocation(300,300);
42
	         frame.pack();
43
	         frame.setVisible(true);
44
	    
45
	}
46

  
47
}
0 48

  
branches/F2/extensions/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java
1
package org.gvsig.crs.gui.wizard;
2

  
3

  
4
import java.awt.event.WindowAdapter;
5
import java.awt.event.WindowEvent;
6

  
7
import javax.swing.ImageIcon;
8
import javax.swing.JFrame;
9
import javax.swing.JPanel;
10
import javax.swing.UIManager;
11
import javax.swing.UnsupportedLookAndFeelException;
12

  
13
import org.gvsig.crs.gui.panels.wizard.DefCrsUsr;
14
import org.gvsig.crs.gui.panels.wizard.MainPanel;
15

  
16
public class FrameMain {
17

  
18

  
19
	/**
20
	 * @param args
21
	 * @throws UnsupportedLookAndFeelException 
22
	 * @throws IllegalAccessException 
23
	 * @throws InstantiationException 
24
	 * @throws ClassNotFoundException 
25
	 */
26
	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
27
		
28
			/*
29
			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
30
			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
31
			 javax.swing.plaf.metal.MetalLookAndFeel
32
			 */
33
			UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
34
	         JFrame frame = new JFrame("Asistente de Definici?n de Crs");
35
	         //cerrar el formulario
36
	         frame.addWindowListener(new WindowAdapter() {
37
	             public void windowClosing(WindowEvent e) {System.exit(0);}
38
	         });
39
	         frame.getContentPane().add(new MainPanel());
40
	         frame.setSize(300,500);
41
	         //colocar en la pantalla
42
	         frame.setLocation(300,0);
43
	         frame.pack();
44
	         frame.setVisible(true);
45
	         System.out.println("Tama?o preferred del frame es:  "+frame.getPreferredSize());
46
	         System.out.println("Tama?o maximo  "+frame.getMaximumSize());
47
	         System.out.println("Tama?o minimo  "+frame.getMinimumSize());
48
	    
49
	}
50

  
51
}
0 52

  
branches/F2/extensions/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java
1
package org.gvsig.crs.gui.wizard;
2

  
3

  
4
import java.awt.event.WindowAdapter;
5
import java.awt.event.WindowEvent;
6

  
7
import javax.swing.JFrame;
8
import javax.swing.UIManager;
9
import javax.swing.UnsupportedLookAndFeelException;
10

  
11
import org.gvsig.crs.gui.panels.wizard.DefinirDatum;
12

  
13
public class FramDefinirDatum {
14

  
15

  
16
	/**
17
	 * @param args
18
	 */
19
	public static void main(String[] args) {
20
		
21
		 JFrame frame = new JFrame("Definici?n del Datum");
22
				/*
23
			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
24
			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
25
			 javax.swing.plaf.metal.MetalLookAndFeel
26
			 */
27
			try {
28
				UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
29
			} catch (ClassNotFoundException e1) {
30
				// TODO Auto-generated catch block
31
				e1.printStackTrace();
32
			} catch (InstantiationException e1) {
33
				// TODO Auto-generated catch block
34
				e1.printStackTrace();
35
			} catch (IllegalAccessException e1) {
36
				// TODO Auto-generated catch block
37
				e1.printStackTrace();
38
			} catch (UnsupportedLookAndFeelException e1) {
39
				// TODO Auto-generated catch block
40
				e1.printStackTrace();
41
			}
42
	         //cerrar el formulario
43
	         frame.addWindowListener(new WindowAdapter() {
44
	             public void windowClosing(WindowEvent e) {System.exit(0);}
45
	         });
46
	 
47
	         frame.getContentPane().add(new DefinirDatum());
48
	         frame.setSize(300,500);
49
	         //colocar en la pantalla
50
	         frame.setLocation(300,0);
51
	         frame.pack();
52
	         frame.setVisible(true);
53
	    
54
	}
55

  
56
}
0 57

  
branches/F2/extensions/extJCRS/src-test/org/gvsig/crs/gui/wizard/TestNewCRSPanel.java
1
package org.gvsig.crs.gui.wizard;
2

  
3

  
4
import java.awt.event.WindowAdapter;
5
import java.awt.event.WindowEvent;
6

  
7
import javax.swing.JFrame;
8
import javax.swing.JPanel;
9
import javax.swing.UIManager;
10
import javax.swing.UnsupportedLookAndFeelException;
11

  
12
import org.gvsig.crs.gui.panels.NewCRSPanel;
13
import org.gvsig.crs.gui.panels.wizard.DefSistCoordenadas;
14

  
15

  
16
public class TestNewCRSPanel {
17

  
18

  
19
	/**
20
	 * @param args
21
	 */
22
	public static void main(String[] args) {
23
		
24
	         JFrame frame = new JFrame("Nuevo CRS");
25
	 		/*
26
			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
27
			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
28
			 javax.swing.plaf.metal.MetalLookAndFeel
29
			 */
30
			try {
31
				UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
32
			} catch (ClassNotFoundException e1) {
33
				// TODO Auto-generated catch block
34
				e1.printStackTrace();
35
			} catch (InstantiationException e1) {
36
				// TODO Auto-generated catch block
37
				e1.printStackTrace();
38
			} catch (IllegalAccessException e1) {
39
				// TODO Auto-generated catch block
40
				e1.printStackTrace();
41
			} catch (UnsupportedLookAndFeelException e1) {
42
				// TODO Auto-generated catch block
43
				e1.printStackTrace();
44
			}
45
	         //cerrar el formulario
46
	         frame.addWindowListener(new WindowAdapter() {
47
	             public void windowClosing(WindowEvent e) {System.exit(0);}
48
	         });
49
	 
50
	         frame.getContentPane().add(new NewCRSPanel());
51
	         frame.setSize(300,500);
52
	         //colocar en la pantalla
53
	         frame.setLocation(300,300);
54
	         frame.pack();
55
	         frame.setVisible(true);
56
	    
57
	}
58

  
59
}
0 60

  
branches/F2/extensions/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java
1
package org.gvsig.crs.gui.wizard;
2

  
3

  
4
import java.awt.event.WindowAdapter;
5
import java.awt.event.WindowEvent;
6

  
7
import javax.swing.JFrame;
8
import javax.swing.JPanel;
9
import javax.swing.UIManager;
10
import javax.swing.UnsupportedLookAndFeelException;
11

  
12
import org.gvsig.crs.gui.panels.wizard.DefSistCoordenadas;
13

  
14

  
15
public class FrameSistemaCoordenadas {
16

  
17

  
18
	/**
19
	 * @param args
20
	 */
21
	public static void main(String[] args) {
22
		
23
	         JFrame frame = new JFrame("Definici?n del Sistema de Coordenadas");
24
	 		/*
25
			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
26
			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
27
			 javax.swing.plaf.metal.MetalLookAndFeel
28
			 */
29
			try {
30
				UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
31
			} catch (ClassNotFoundException e1) {
32
				// TODO Auto-generated catch block
33
				e1.printStackTrace();
34
			} catch (InstantiationException e1) {
35
				// TODO Auto-generated catch block
36
				e1.printStackTrace();
37
			} catch (IllegalAccessException e1) {
38
				// TODO Auto-generated catch block
39
				e1.printStackTrace();
40
			} catch (UnsupportedLookAndFeelException e1) {
41
				// TODO Auto-generated catch block
42
				e1.printStackTrace();
43
			}
44
	         //cerrar el formulario
45
	         frame.addWindowListener(new WindowAdapter() {
46
	             public void windowClosing(WindowEvent e) {System.exit(0);}
47
	         });
48
	 
49
	         frame.getContentPane().add(new DefSistCoordenadas());
50
	         frame.setSize(300,500);
51
	         //colocar en la pantalla
52
	         frame.setLocation(300,300);
53
	         frame.pack();
54
	         frame.setVisible(true);
55
	    
56
	}
57

  
58
}
0 59

  
branches/F2/extensions/extJCRS/src-test/org/gvsig/crs/gui/TransformationNadgridsPanelTest.java
7 7
public class TransformationNadgridsPanelTest {
8 8
	
9 9
	public static void main(String[] args){
10
		TransformationNadgridsPanel trPanel = new TransformationNadgridsPanel();
10
		
11 11
		JFrame jFrame = new JFrame();
12
		jFrame.getContentPane().add(trPanel);	
13
		jFrame.setSize(500, 700);
12
		jFrame.getContentPane().add(new NadsClass());
13
		jFrame.setSize(500, 300);
14 14
		jFrame.setVisible(true);	
15 15
	}
16 16

  
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java
151 151
			dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
152 152
		else
153 153
			dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
154
		}else if (op.equals("newCRS")) {
155
			//**if(dialog.getCrsMainPanel().getRecentsPanel().getJTable().getSelectedRowCount()>0)
156
				//**dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
157
			//**else
158
				//**dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
154 159
		}
155 160
	    cl.show(dialog.getCrsMainPanel().getJPanelMain(), (String)e.getItem());
156 161
	    dialog.getCrsMainPanel().setDataSource((String)e.getItem());
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java
350 350
			data[3] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
351 351
			data[4] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);
352 352
			
353
			//Mostrar el panel de informaci?n de las transformaciones recientes
353 354
			InfoTransformationsRecentsPanel info = new InfoTransformationsRecentsPanel(data);
354
			info.setSize(new Dimension(450,200));
355
			info.setLayout(new GridLayout(0,1));
356
			info.setLayout(new FlowLayout(FlowLayout.LEFT,10,5));
357 355
			PluginServices.getMDIManager().addWindow(info);
358 356
		}
359 357
	}
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java
47 47
import java.awt.GridLayout;
48 48
import java.awt.event.ActionEvent;
49 49

  
50

  
50 51
import javax.swing.BorderFactory;
51 52
import javax.swing.JButton;
52 53
import javax.swing.JComboBox;
......
59 60
import org.gvsig.crs.gui.panels.EPSGpanel;
60 61
import org.gvsig.crs.gui.panels.ESRIpanel;
61 62
import org.gvsig.crs.gui.panels.IAU2000panel;
63
import org.gvsig.crs.gui.panels.NewCRSPanel;
62 64

  
63 65
import com.iver.andami.PluginServices;
64 66
import com.iver.andami.ui.mdiManager.IWindow;
......
68 70
 * Clase que genera el panel principal para la selecci?n de CRS 
69 71
 * 
70 72
 * @author Jos? Luis G?mez Mart?nez (jolugomar@gmail.com)
73
 * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
71 74
 *
72 75
 */
73 76
public class CRSMainPanel extends JPanel implements IWindow {
......
86 89
	final String newCRS = PluginServices.getText(this,"nuevo_crs");
87 90
	
88 91
	//String[] selection = {recientes, epsg, usgs, esri, iau2000, newCRS};
89
	String[] selection = {recientes, epsg, iau2000};//, esri};
92
	String[] selection = {recientes, epsg, iau2000,newCRS};//, esri};
90 93
	
91 94
	boolean inAnApplet = true;	
92 95
	public CrsRecentsPanel crsRecentsPanel = null;
93 96
	public EPSGpanel epsgPanel = null;
94 97
	public ESRIpanel esriPanel = null;
95 98
	public IAU2000panel iauPanel = null;
99
	public NewCRSPanel newCrsPanel=null;
96 100
	
97 101
	private JPanel jPanelMain = null;	
98 102
	
......
107 111
		epsgPanel = new EPSGpanel();
108 112
		esriPanel = new ESRIpanel();
109 113
		iauPanel = new IAU2000panel();
114
		newCrsPanel=new NewCRSPanel();
110 115
		
111 116
		this.add(vista(), BorderLayout.NORTH);		
112 117
		this.add(getJPanelButtons(), BorderLayout.SOUTH);
......
119 124
		epsgPanel = new EPSGpanel();
120 125
		esriPanel = new ESRIpanel();
121 126
		iauPanel = new IAU2000panel();
127
		newCrsPanel=new NewCRSPanel();
122 128
		
123 129
		setDataSource(selection[0]);
124 130
	}
......
130 136
	 */
131 137
	public JPanel capa(){
132 138
		JPanel p = new JPanel();
133
		p.setPreferredSize(new Dimension(550, 320));
134
		p.setLayout(new GridLayout(0,1));
135
		p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));	
136
		p.setBorder(
137
			    BorderFactory.createCompoundBorder(
138
						BorderFactory.createCompoundBorder(
139
								BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_capa")),
140
								BorderFactory.createEmptyBorder(1,1,1,1)),
141
								p.getBorder()));
142
		p.add(getCombopanel());
143
		p.add(getJPanelMain());
139
		//**p.setPreferredSize(new Dimension(550, 320));
140
		//**p.setLayout(new GridLayout(0,1));
141
		//p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
142
		p.setLayout(new BorderLayout());
143
		p.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_capa")));//,
144
								/*BorderFactory.createEmptyBorder(1,1,1,1)),
145
								p.getBorder()));*/
146
		p.add(getCombopanel(),BorderLayout.NORTH);
147
		p.add(getJPanelMain(),BorderLayout.CENTER);
144 148
		return p;
145 149
	}
146 150
	
147
	/**
148
	 * Panel con los controles necesarios del panel de selecci?n de CRS 
149
	 * de la vista actual
150
	 * @return
151
	 */
152 151
	public JPanel vista(){
153 152
		JPanel p = new JPanel();
154
		p.setPreferredSize(new Dimension(550, 320));
155
		p.setLayout(new GridLayout(0,1));
156
		p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
157
		p.setBorder(
153
		//p.setPreferredSize(new Dimension(550, 320));
154
		//p.setLayout(new GridLayout(0,1));
155
		//p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
156
		/*p.setBorder(
158 157
			    BorderFactory.createCompoundBorder(
159 158
						BorderFactory.createCompoundBorder(
160 159
								BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_vista")),
161 160
								BorderFactory.createEmptyBorder(2,2,2,2)),
162
								p.getBorder()));
163
		p.add(getCombopanel());
164
		p.add(getJPanelMain());
161
								p.getBorder()));*/
162
		p.setLayout(new BorderLayout());
163
		p.add(getCombopanel(),BorderLayout.NORTH);
164
		p.add(getJPanelMain(),BorderLayout.CENTER);
165 165
		return p;
166 166
	}
167 167
	
......
172 172
			jPanelMain.setPreferredSize(new Dimension(525, 230));	
173 173
			jPanelMain.add(recientes, crsRecentsPanel);
174 174
			jPanelMain.add(epsg, epsgPanel);
175
			jPanelMain.add(newCRS,newCrsPanel);
175 176
			jPanelMain.add(esri, esriPanel);
176 177
			jPanelMain.add(usgs, getJPanelUSGS());
177 178
			jPanelMain.add(iau2000, iauPanel);
......
183 184
	public JPanel getCombopanel(){
184 185
		if (Combopanel == null){
185 186
			Combopanel = new JPanel();
186
			Combopanel.setPreferredSize(new Dimension(525,30));
187
			Combopanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,5));
187 188
			Combopanel.add(getJLabelTipo());
188 189
			Combopanel.add(getJComboOptions());
189 190
		}
......
222 223
		if(jPanelButtons == null) {
223 224
			jPanelButtons = new JPanel();
224 225
			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT));
225
			jPanelButtons.setPreferredSize(new Dimension(525,50));
226
			//jPanelButtons.setPreferredSize(new Dimension(525,50));
226 227
			jPanelButtons.add(getJButtonCancel(),null);
227 228
			jPanelButtons.add(getJButtonAccept(),null);			
228 229
		}
......
251 252
			jButtonAccept.setPreferredSize(new Dimension(100,25));
252 253
			jButtonAccept.setEnabled(false);
253 254
			jButtonAccept.setMnemonic('A');
254
			jButtonAccept.setToolTipText("Accept");			
255
			jButtonAccept.setToolTipText(PluginServices.getText(this,"ok"));			
255 256
		}
256 257
		return jButtonAccept;
257 258
	}
......
299 300
	public ESRIpanel getEsriPanel() {
300 301
		return esriPanel;
301 302
	}
302

  
303

  
304

  
305 303
	public IAU2000panel getIauPanel() {
306 304
		return iauPanel;
307 305
	}
......
310 308
		return crsRecentsPanel;
311 309
	}
312 310

  
311
	public NewCRSPanel getNewCrsPanel() {
312
		return newCrsPanel;
313
	}
314

  
313 315
}
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java
43 43
import javax.swing.JPanel;
44 44
import javax.swing.ListSelectionModel;
45 45
import org.cresques.cts.IProjection;
46
import org.gvsig.crs.ICrs;
46 47
import org.gvsig.crs.gui.listeners.CRSSelectionDialogListener;
48
import org.gvsig.crs.persistence.CrsData;
49
import org.gvsig.crs.persistence.RecentCRSsPersistence;
50

  
47 51
import com.iver.andami.PluginServices;
48 52
import com.iver.andami.ui.mdiManager.IWindow;
49 53
import com.iver.andami.ui.mdiManager.WindowInfo;
......
76 80
		crsMainPanel = new CRSMainPanel();
77 81
		this.add(getContentPanel(), null);
78 82
		setListeners();	
83
		
84
	}
85
	
86
	public void initRecents(ICrs proj) {
87
		CrsData crsData = new CrsData(proj.getCrsWkt().getAuthority()[0], proj.getCode(),proj.getCrsWkt().getName());
88
		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
89
		persistence.addCrsData(crsData);
90
		
79 91
		crsMainPanel.getRecentsPanel().loadRecents();
80 92
	}
81 93
	
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java
77 77
	public WindowInfo getWindowInfo() {
78 78
		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
79 79
   		m_viewinfo.setTitle(PluginServices.getText(this, "selecciona_sistema_de_referencia"));
80
   		//definir anchura y altura
81
   		m_viewinfo.setWidth(520);
82
   		m_viewinfo.setHeight(350);
80 83
		return m_viewinfo;
81 84
	}
82 85
}
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java
44 44
import java.awt.CardLayout;
45 45
import java.awt.Dimension;
46 46
import java.awt.FlowLayout;
47
import java.awt.GridLayout;
48 47

  
49 48
import javax.swing.JButton;
50 49
import javax.swing.JComboBox;
51 50
import javax.swing.JLabel;
52 51
import javax.swing.JPanel;
53 52
import javax.swing.ListSelectionModel;
53
import javax.swing.border.EmptyBorder;
54 54

  
55 55
import org.cresques.cts.IProjection;
56 56
import org.gvsig.crs.CrsException;
......
73 73
 * asignarle una transformaci?n.
74 74
 * 
75 75
 * @author Jos? Luis G?mez Mart?nez (jolugomar@gmail.com)
76
 * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
76 77
 *
77 78
 */
78 79

  
......
91 92
	private JButton jButtonAccept = null;
92 93
	private JButton jButtonBefore = null;
93 94
	private JPanel jPanelButtons = null;
95
	private JLabel jLabelTrans=null;
94 96
	
95 97
	boolean targetNad = false;	
96 98
	
......
99 101
		
100 102
	int transformation_code = 0;	
101 103
	
102
	private JPanel panel = null;
104
	//**private JPanel panel = null;
103 105
	CRSMainPanel viewPan = null;
104 106
	
105 107
	private JPanel jPanelMain = null;
......
147 149
		jPanelMain.add("epsg", epsgTrPanel);
148 150
		jPanelMain.add("nad", nadsTrPanel);
149 151
		jPanelMain.add("recents", recentsTrPanel);
150
				
151
		this.add(jPanelMain, BorderLayout.CENTER);
152 152
		
153
		this.setLayout(new BorderLayout());	
154
		this.add(jPanelMain, BorderLayout.CENTER);
153 155
		this.add(getButtons(), BorderLayout.SOUTH);
154 156
		
155 157
		setListeners();
......
165 167
	 */
166 168
	private JPanel viewPanel(){
167 169
		JPanel integro = new JPanel();
168
		integro.setLayout(new GridLayout(0,1));
169
		integro.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
170
		integro.setPreferredSize(new Dimension(560,300));
171
		
172
		integro.add(viewPan.capa(), null);
173
		integro.add(getJPanel(), null);
170
		integro.setLayout(new BorderLayout());
171
		integro.setBorder(new EmptyBorder(5,5,5,5));
172
	
173
		integro.add(viewPan.capa(),BorderLayout.CENTER);
174
		//**integro.add(getJPanel(), null);
175
		integro.add(getCombopanel(),BorderLayout.SOUTH);
174 176
		return integro;
175 177
	}
176 178
	
177
	 
178
	private JPanel getJPanel() {
179
		if (panel == null){
180
			panel = new JPanel();
181
			panel.setPreferredSize(new Dimension(540,80));
182
			panel.setLayout(new GridLayout(0,2));
183
			panel.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));			
184
			panel.add(getCombopanel(), null);			
185
		}
186
		return panel;
187
	}	
188
	
179
	/**
180
	 * Define el panel en el que se integran el label y el combobox 
181
	 * de transformaciones
182
	 */
189 183
	public JPanel getCombopanel(){
190 184
		if (jPanelCombo == null){
191 185
			jPanelCombo = new JPanel();
192
			jPanelCombo.setPreferredSize(new Dimension(400,30));			
186
			jPanelCombo.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
193 187
			jPanelCombo.add(getJLabelTrans());
194 188
			jPanelCombo.add(getJComboOptions());
195 189
		}
196 190
		
197 191
		return jPanelCombo;
198 192
	}
199
	
193
	/**
194
	 * Inicializa la etiqueta 'Seleccione Transformaci?n'
195
	 * @return
196
	 */
200 197
	private JLabel getJLabelTrans(){
201
		JLabel jLabelTrans = new JLabel();
202
		jLabelTrans.setPreferredSize(new Dimension(180, 25));
203
		jLabelTrans.setText(PluginServices.getText(this, "seleccione_transformacion")+":");
198
		if (jLabelTrans==null){
199
			jLabelTrans = new JLabel();
200
			jLabelTrans.setPreferredSize(new Dimension(180, 25));
201
			jLabelTrans.setText(PluginServices.getText(this, "seleccione_transformacion")+":");
202
		}
204 203
		return jLabelTrans;
205 204
	}
206
	
205
	/**
206
	 * Inicializa el comboBox de Tansformaciones
207
	 * @return
208
	 */
207 209
	public JComboBox getJComboOptions(){
208 210
		if (jComboOptions == null){
209 211
			String[] selection = {PluginServices.getText(this, "sin_transformacion"),
......
218 220
			jComboOptions.setSelectedIndex(0);
219 221
			newSelection = (String) jComboOptions.getSelectedItem();			
220 222
		}
221
//		jComboOptions.addActionListener(this);
222 223
		return jComboOptions;
223 224
	}
224
	
225
	/**
226
	 * Agrega los botones: Aceptar, cancelar, siguiente y finalizar
227
	 * @return
228
	 */
225 229
	private JPanel getButtons() {
226 230
		if(jPanelButtons == null) {
227 231
			jPanelButtons = new JPanel();
228
			jPanelButtons.setPreferredSize(new Dimension(550,50));
229
			jPanelButtons.setLayout(new GridLayout(0,1));
230
			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT,5,5));
231
			jPanelButtons.add(getJButtonCancel(), null);
232
			jPanelButtons.add(getJButtonBefore(), null);
233
			jPanelButtons.add(getJButtonNext(), null);
234
			jPanelButtons.add(getJButtonAccept(), null);
232
			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
233
			jPanelButtons.add(getJButtonCancel());
234
			jPanelButtons.add(getJButtonBefore());
235
			jPanelButtons.add(getJButtonNext());
236
			jPanelButtons.add(getJButtonAccept());
235 237
		}
236 238
		return jPanelButtons;
237 239
	}
238
	
240
	/**
241
	 * Inicializa el bot?n 'Anterior'
242
	 * @return
243
	 */
239 244
	public JButton getJButtonBefore(){
240 245
		if(jButtonBefore == null) {
241 246
			jButtonBefore = new JButton();
......
243 248
			jButtonBefore.setMnemonic('B');			
244 249
			jButtonBefore.setPreferredSize(new Dimension(100,25));			
245 250
			jButtonBefore.setEnabled(false);
246
//			jButtonBefore.addActionListener(this);
247 251
		}
248 252
		return jButtonBefore;
249 253
	}
250
	
254
	/**
255
	 * Inicializa el bot?n 'Finalizar'
256
	 * @return
257
	 */
251 258
	public JButton getJButtonAccept() {
252 259
		if(jButtonAccept == null) {
253 260
			jButtonAccept = new JButton();
......
256 263
			jButtonAccept.setVisible(true);
257 264
			jButtonAccept.setEnabled(false);
258 265
			jButtonAccept.setPreferredSize(new Dimension(100,25));
259
//			jButtonAccept.addActionListener(this);
260 266
		}
261 267
		return jButtonAccept;
262 268
	}
263
	
269
	/**
270
	 * Inicializa el bot?n 'Siguiente'
271
	 * @return
272
	 */
264 273
	public JButton getJButtonNext() {
265 274
		if(jButtonNext == null) {
266 275
			jButtonNext = new JButton();
......
268 277
			jButtonNext.setMnemonic('S');
269 278
			jButtonNext.setVisible(false);
270 279
			jButtonNext.setPreferredSize(new Dimension(100,25));
271
//			jButtonNext.addActionListener(this);
272 280
		}
273 281
		return jButtonNext;
274 282
	}
275
		
283
	/**
284
	 * Inicializa el bot?n 'Cancelar'
285
	 * @return
286
	 */
276 287
	public JButton getJButtonCancel() {
277 288
		if(jButtonCancel == null) {
278 289
			jButtonCancel = new JButton();
279 290
			jButtonCancel.setText(PluginServices.getText(this,"cancel"));
280 291
			jButtonCancel.setMnemonic('C');
281 292
			jButtonCancel.setPreferredSize(new Dimension(100,25));
282
//			jButtonCancel.addActionListener(this);
283 293
		}
284 294
		return jButtonCancel;
285 295
	}
......
396 406
		return m_viewinfo;
397 407
	}
398 408

  
399

  
400

  
401

  
402

  
403

  
404

  
405

  
406

  
407

  
408

  
409

  
410

  
411 409
	public CRSMainPanel getCrsMainPanel() {
412 410
		return crsMainPanel;
413 411
	}
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java
40 40

  
41 41
package org.gvsig.crs.gui.panels;
42 42

  
43
import java.awt.BorderLayout;
43 44
import java.awt.Dimension;
44 45
import java.awt.FlowLayout;
45
import java.awt.Font;
46
import java.awt.GridLayout;
47 46
import java.awt.event.ActionEvent;
48 47
import java.awt.event.ActionListener;
49 48
import java.sql.ResultSet;
......
51 50

  
52 51
import javax.swing.BorderFactory;
53 52
import javax.swing.JButton;
54
import javax.swing.JLabel;
55 53
import javax.swing.JPanel;
56 54
import javax.swing.JScrollPane;
57 55
import javax.swing.JTable;
58 56
import javax.swing.ListSelectionModel;
59 57
import javax.swing.table.DefaultTableModel;
60 58

  
61
import org.cresques.ui.DefaultDialogPanel;
62 59
import org.gvsig.crs.EpsgConnection;
63
import org.gvsig.crs.ICrs;
64 60
import org.gvsig.crs.Query;
65 61

  
66 62
import com.iver.andami.PluginServices;
......
71 67
/**
72 68
 * Panel con la informaci?n de la transformaci?n seleccionada
73 69
 * @author Jos? Luis G?mez Mart?nez (jolugomar@gmail.com)
70
 * @author Luisa Marina Fern?ndez (luisam.fernandez@uclm.es)
74 71
 *
75 72
 */
76 73
public class InfoTransformationsRecentsPanel extends JPanel implements IWindow, ActionListener{
......
85 82
	public TableSorter sorter = null;
86 83
	String[] data = null;
87 84
	
85
	//Ancho y alto del panel
86
	private int v_height=200;
87
	private int v_width=420;
88
	
88 89
	public InfoTransformationsRecentsPanel(String[] data) {
89 90
		super();
90
		// TODO Auto-generated constructor stub
91 91
		this.data = data;
92 92
		inicializate();
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff