root / trunk / extensions / extGeoreferencing / src / com / iver / cit / gvsig / gui / Panels / OptionsPanel.java @ 3037
History | View | Annotate | Download (3.47 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 JPanel jPanel = null; |
27 |
private JLabel jLabel = null; |
28 |
/**
|
29 |
* This is the default constructor
|
30 |
*/
|
31 |
public OptionsPanel() {
|
32 |
super();
|
33 |
initialize(); |
34 |
} |
35 |
|
36 |
/**
|
37 |
* This method initializes this
|
38 |
*
|
39 |
* @return void
|
40 |
*/
|
41 |
private void initialize() { |
42 |
this.setLayout(new BorderLayout()); |
43 |
this.setPreferredSize(new java.awt.Dimension(400,75)); |
44 |
this.setSize(new java.awt.Dimension(400,75)); |
45 |
this.setLocation(new java.awt.Point(0,0)); |
46 |
this.add(getPGeneral(), java.awt.BorderLayout.CENTER);
|
47 |
} |
48 |
|
49 |
/**
|
50 |
* This method initializes jPanel
|
51 |
*
|
52 |
* @return javax.swing.JPanel
|
53 |
*/
|
54 |
private JPanel getPGeneral() { |
55 |
if (pGeneral == null) { |
56 |
GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); |
57 |
GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); |
58 |
pGeneral = new JPanel(); |
59 |
pGeneral.setLayout(new GridBagLayout()); |
60 |
pGeneral.setPreferredSize(new java.awt.Dimension(400,75)); |
61 |
gridBagConstraints5.gridx = 0;
|
62 |
gridBagConstraints5.gridy = 0;
|
63 |
gridBagConstraints5.anchor = java.awt.GridBagConstraints.CENTER; |
64 |
gridBagConstraints5.gridheight = 1;
|
65 |
gridBagConstraints5.gridwidth = 1;
|
66 |
gridBagConstraints7.gridx = 0;
|
67 |
gridBagConstraints7.gridy = 2;
|
68 |
gridBagConstraints7.gridheight = 1;
|
69 |
gridBagConstraints7.gridwidth = 1;
|
70 |
pGeneral.add(getPCalcErrores(), gridBagConstraints5); |
71 |
pGeneral.add(getJPanel(), gridBagConstraints7); |
72 |
} |
73 |
return pGeneral;
|
74 |
} |
75 |
/**
|
76 |
* This method initializes jPanel1
|
77 |
*
|
78 |
* @return javax.swing.JPanel
|
79 |
*/
|
80 |
private JPanel getPCalcErrores() { |
81 |
if (pCalcErrores == null) { |
82 |
jLabel = new JLabel(); |
83 |
FlowLayout flowLayout6 = new FlowLayout(); |
84 |
pCalcErrores = new JPanel(); |
85 |
pCalcErrores.setLayout(flowLayout6); |
86 |
pCalcErrores.setPreferredSize(new java.awt.Dimension(400,20)); |
87 |
flowLayout6.setAlignment(java.awt.FlowLayout.LEFT); |
88 |
flowLayout6.setHgap(0);
|
89 |
flowLayout6.setVgap(0);
|
90 |
jLabel.setText(PluginServices.getText(this,"calcular_errores")); |
91 |
jLabel.setPreferredSize(new java.awt.Dimension(250,15)); |
92 |
jLabel.setToolTipText("");
|
93 |
pCalcErrores.add(getJCheckBox(), null);
|
94 |
pCalcErrores.add(jLabel, null);
|
95 |
} |
96 |
return pCalcErrores;
|
97 |
} |
98 |
/**
|
99 |
* This method initializes jCheckBox
|
100 |
*
|
101 |
* @return javax.swing.JCheckBox
|
102 |
*/
|
103 |
private JCheckBox getJCheckBox() { |
104 |
if (jCheckBox == null) { |
105 |
jCheckBox = new JCheckBox(); |
106 |
jCheckBox.setVerticalAlignment(javax.swing.SwingConstants.CENTER); |
107 |
jCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.LEADING); |
108 |
} |
109 |
return jCheckBox;
|
110 |
} |
111 |
/**
|
112 |
* This method initializes jPanel
|
113 |
*
|
114 |
* @return javax.swing.JPanel
|
115 |
*/
|
116 |
private JPanel getJPanel() { |
117 |
if (jPanel == null) { |
118 |
FlowLayout flowLayout8 = new FlowLayout(); |
119 |
jPanel = new JPanel(); |
120 |
jPanel.setLayout(flowLayout8); |
121 |
jPanel.setPreferredSize(new java.awt.Dimension(400,25)); |
122 |
flowLayout8.setHgap(0);
|
123 |
flowLayout8.setVgap(0);
|
124 |
} |
125 |
return jPanel;
|
126 |
} |
127 |
} |