root / trunk / extensions / extGeoreferencing / src / com / iver / cit / gvsig / gui / Panels / OptionsPanel.java @ 3039
History | View | Annotate | Download (2.8 KB)
1 |
package com.iver.cit.gvsig.gui.Panels; |
---|---|
2 |
|
3 |
import java.awt.BorderLayout; |
4 |
import java.awt.FlowLayout; |
5 |
import java.awt.GridBagConstraints; |
6 |
import java.awt.GridBagLayout; |
7 |
|
8 |
import javax.swing.JCheckBox; |
9 |
import javax.swing.JLabel; |
10 |
import javax.swing.JPanel; |
11 |
|
12 |
import com.iver.andami.PluginServices; |
13 |
/**
|
14 |
* Panel que contiene opciones de georreferenciaci?n a elegir por
|
15 |
* el usuario. Esta clase no maneja eventos.
|
16 |
*
|
17 |
* @author Nacho Brodin (brodin_ign@gva.es)
|
18 |
*
|
19 |
*/
|
20 |
public class OptionsPanel extends JPanel{ |
21 |
|
22 |
|
23 |
private JPanel pGeneral = null; |
24 |
private JPanel pCalcErrores = null; |
25 |
private JCheckBox jCheckBox = null; |
26 |
private JLabel jLabel = null; |
27 |
/**
|
28 |
* This is the default constructor
|
29 |
*/
|
30 |
public OptionsPanel() {
|
31 |
super();
|
32 |
initialize(); |
33 |
} |
34 |
|
35 |
/**
|
36 |
* This method initializes this
|
37 |
*
|
38 |
* @return void
|
39 |
*/
|
40 |
private void initialize() { |
41 |
this.setLayout(new BorderLayout()); |
42 |
this.setPreferredSize(new java.awt.Dimension(380,20)); |
43 |
this.setSize(new java.awt.Dimension(380,20)); |
44 |
this.setLocation(new java.awt.Point(0,0)); |
45 |
this.add(getPGeneral(), java.awt.BorderLayout.CENTER);
|
46 |
} |
47 |
|
48 |
/**
|
49 |
* This method initializes jPanel
|
50 |
*
|
51 |
* @return javax.swing.JPanel
|
52 |
*/
|
53 |
private JPanel getPGeneral() { |
54 |
if (pGeneral == null) { |
55 |
GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); |
56 |
pGeneral = new JPanel(); |
57 |
pGeneral.setLayout(new GridBagLayout()); |
58 |
pGeneral.setPreferredSize(new java.awt.Dimension(380,20)); |
59 |
gridBagConstraints5.gridx = 0;
|
60 |
gridBagConstraints5.gridy = 0;
|
61 |
gridBagConstraints5.anchor = java.awt.GridBagConstraints.CENTER; |
62 |
gridBagConstraints5.gridheight = 1;
|
63 |
gridBagConstraints5.gridwidth = 1;
|
64 |
pGeneral.add(getPCalcErrores(), gridBagConstraints5); |
65 |
} |
66 |
return pGeneral;
|
67 |
} |
68 |
/**
|
69 |
* This method initializes jPanel1
|
70 |
*
|
71 |
* @return javax.swing.JPanel
|
72 |
*/
|
73 |
private JPanel getPCalcErrores() { |
74 |
if (pCalcErrores == null) { |
75 |
jLabel = new JLabel(); |
76 |
FlowLayout flowLayout6 = new FlowLayout(); |
77 |
pCalcErrores = new JPanel(); |
78 |
pCalcErrores.setLayout(flowLayout6); |
79 |
pCalcErrores.setPreferredSize(new java.awt.Dimension(380,20)); |
80 |
flowLayout6.setAlignment(java.awt.FlowLayout.LEFT); |
81 |
flowLayout6.setHgap(10);
|
82 |
flowLayout6.setVgap(0);
|
83 |
jLabel.setText(PluginServices.getText(this,"calcular_errores")); |
84 |
jLabel.setPreferredSize(new java.awt.Dimension(250,15)); |
85 |
jLabel.setToolTipText("");
|
86 |
pCalcErrores.add(getJCheckBox(), null);
|
87 |
pCalcErrores.add(jLabel, null);
|
88 |
} |
89 |
return pCalcErrores;
|
90 |
} |
91 |
/**
|
92 |
* This method initializes jCheckBox
|
93 |
*
|
94 |
* @return javax.swing.JCheckBox
|
95 |
*/
|
96 |
private JCheckBox getJCheckBox() { |
97 |
if (jCheckBox == null) { |
98 |
jCheckBox = new JCheckBox(); |
99 |
jCheckBox.setVerticalAlignment(javax.swing.SwingConstants.CENTER); |
100 |
jCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.LEADING); |
101 |
} |
102 |
return jCheckBox;
|
103 |
} |
104 |
} |