Revision 4584 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/panels/ChooseGeometryType.java
ChooseGeometryType.java | ||
---|---|---|
11 | 11 |
import jwizardcomponent.JWizardComponents; |
12 | 12 |
import jwizardcomponent.JWizardPanel; |
13 | 13 |
|
14 |
import com.iver.andami.PluginServices; |
|
14 | 15 |
import com.iver.cit.gvsig.fmap.core.FShape; |
15 | 16 |
import com.iver.cit.gvsig.fmap.edition.ISpatialWriter; |
16 | 17 |
|
17 | 18 |
/** |
18 | 19 |
* @author fjp |
19 |
*
|
|
20 |
* |
|
20 | 21 |
* Panel para que el usuario seleccione el driver que va a utilizar para |
21 | 22 |
* crear un tema desde cero. |
22 | 23 |
* |
... | ... | |
41 | 42 |
setNextButtonEnabled(true); |
42 | 43 |
else |
43 | 44 |
setNextButtonEnabled(false); |
44 |
|
|
45 |
|
|
45 | 46 |
} |
46 |
|
|
47 |
|
|
47 | 48 |
} |
48 | 49 |
|
49 | 50 |
public ChooseGeometryType(JWizardComponents wizardComponents) { |
... | ... | |
51 | 52 |
initialize(); |
52 | 53 |
// TODO Auto-generated constructor stub |
53 | 54 |
} |
54 |
|
|
55 |
|
|
55 | 56 |
/** |
56 | 57 |
* This method initializes this |
57 |
*
|
|
58 |
* |
|
58 | 59 |
*/ |
59 | 60 |
private void initialize() { |
60 | 61 |
jLabelLayerName = new JLabel(); |
61 | 62 |
jLabelLayerName.setBounds(new java.awt.Rectangle(14,9,321,22)); |
62 |
jLabelLayerName.setText("enter_layer_name");
|
|
63 |
jLabelLayerName.setText(PluginServices.getText(this,"enter_layer_name"));
|
|
63 | 64 |
lblSelecGeometryType = new JLabel(); |
64 |
lblSelecGeometryType.setText("please_select_geometry_type");
|
|
65 |
lblSelecGeometryType.setText(PluginServices.getText(this,"select_geometry_type"));
|
|
65 | 66 |
lblSelecGeometryType.setBounds(new java.awt.Rectangle(13,63,329,15)); |
66 | 67 |
this.setLayout(null); |
67 | 68 |
this.setSize(new java.awt.Dimension(358,263)); |
... | ... | |
69 | 70 |
this.add(getJPanelGeometryTypeOptions(), null); |
70 | 71 |
this.add(getJTextFieldLayerName(), null); |
71 | 72 |
this.add(jLabelLayerName, null); |
72 |
|
|
73 |
|
|
73 | 74 |
} |
74 | 75 |
|
75 | 76 |
/** |
76 |
* This method initializes jPanelGeometryTypeOptions
|
|
77 |
*
|
|
78 |
* @return javax.swing.JPanel
|
|
77 |
* This method initializes jPanelGeometryTypeOptions |
|
78 |
* |
|
79 |
* @return javax.swing.JPanel |
|
79 | 80 |
*/ |
80 | 81 |
private JPanel getJPanelGeometryTypeOptions() { |
81 | 82 |
if (jPanelGeometryTypeOptions == null) { |
... | ... | |
89 | 90 |
jPanelGeometryTypeOptions.add(getJRadioButtonPolygon(), null); |
90 | 91 |
jPanelGeometryTypeOptions.add(getJRadioButtonMulti(), null); |
91 | 92 |
jPanelGeometryTypeOptions.add(getJRadioButtonMultiPoint(), null); |
92 |
|
|
93 |
|
|
93 | 94 |
//Group the radio buttons. |
94 | 95 |
ButtonGroup group = new ButtonGroup(); |
95 | 96 |
group.add(getJRadioButtonPoint()); |
... | ... | |
97 | 98 |
group.add(getJRadioButtonPolygon()); |
98 | 99 |
group.add(getJRadioButtonMulti()); |
99 | 100 |
group.add(getJRadioButtonMultiPoint()); |
100 |
|
|
101 |
|
|
101 | 102 |
} |
102 | 103 |
return jPanelGeometryTypeOptions; |
103 | 104 |
} |
104 | 105 |
|
105 | 106 |
/** |
106 |
* This method initializes jRadioButtonPoint
|
|
107 |
*
|
|
108 |
* @return javax.swing.JRadioButton
|
|
107 |
* This method initializes jRadioButtonPoint |
|
108 |
* |
|
109 |
* @return javax.swing.JRadioButton |
|
109 | 110 |
*/ |
110 | 111 |
private JRadioButton getJRadioButtonPoint() { |
111 | 112 |
if (jRadioButtonPoint == null) { |
112 | 113 |
jRadioButtonPoint = new JRadioButton(); |
113 |
jRadioButtonPoint.setText("POINT_type");
|
|
114 |
jRadioButtonPoint.setText(PluginServices.getText(this,"point_type"));
|
|
114 | 115 |
jRadioButtonPoint.setBounds(new java.awt.Rectangle(19,31,297,23)); |
115 | 116 |
} |
116 | 117 |
return jRadioButtonPoint; |
117 | 118 |
} |
118 | 119 |
|
119 | 120 |
/** |
120 |
* This method initializes jRadioButtonLine
|
|
121 |
*
|
|
122 |
* @return javax.swing.JRadioButton
|
|
121 |
* This method initializes jRadioButtonLine |
|
122 |
* |
|
123 |
* @return javax.swing.JRadioButton |
|
123 | 124 |
*/ |
124 | 125 |
private JRadioButton getJRadioButtonLine() { |
125 | 126 |
if (jRadioButtonLine == null) { |
126 | 127 |
jRadioButtonLine = new JRadioButton(); |
127 |
jRadioButtonLine.setText("LINE_type");
|
|
128 |
jRadioButtonLine.setText(PluginServices.getText(this,"line_type"));
|
|
128 | 129 |
jRadioButtonLine.setSelected(true); |
129 | 130 |
jRadioButtonLine.setBounds(new java.awt.Rectangle(19,81,297,23)); |
130 | 131 |
} |
... | ... | |
132 | 133 |
} |
133 | 134 |
|
134 | 135 |
/** |
135 |
* This method initializes jRadioButtonPolygon
|
|
136 |
*
|
|
137 |
* @return javax.swing.JRadioButton
|
|
136 |
* This method initializes jRadioButtonPolygon |
|
137 |
* |
|
138 |
* @return javax.swing.JRadioButton |
|
138 | 139 |
*/ |
139 | 140 |
private JRadioButton getJRadioButtonPolygon() { |
140 | 141 |
if (jRadioButtonPolygon == null) { |
141 | 142 |
jRadioButtonPolygon = new JRadioButton(); |
142 |
jRadioButtonPolygon.setText("POLYGON_type");
|
|
143 |
jRadioButtonPolygon.setText(PluginServices.getText(this,"polygon_type"));
|
|
143 | 144 |
jRadioButtonPolygon.setBounds(new java.awt.Rectangle(19,106,297,23)); |
144 | 145 |
} |
145 | 146 |
return jRadioButtonPolygon; |
146 | 147 |
} |
147 | 148 |
|
148 | 149 |
/** |
149 |
* This method initializes jRadioButtonMulti
|
|
150 |
*
|
|
151 |
* @return javax.swing.JRadioButton
|
|
150 |
* This method initializes jRadioButtonMulti |
|
151 |
* |
|
152 |
* @return javax.swing.JRadioButton |
|
152 | 153 |
*/ |
153 | 154 |
private JRadioButton getJRadioButtonMulti() { |
154 | 155 |
if (jRadioButtonMulti == null) { |
155 | 156 |
jRadioButtonMulti = new JRadioButton(); |
156 |
jRadioButtonMulti.setText("MULTI_type");
|
|
157 |
jRadioButtonMulti.setText(PluginServices.getText(this,"multi_type"));
|
|
157 | 158 |
jRadioButtonMulti.setBounds(new java.awt.Rectangle(19,131,297,23)); |
158 | 159 |
} |
159 | 160 |
return jRadioButtonMulti; |
160 | 161 |
} |
161 | 162 |
|
162 | 163 |
/** |
163 |
* This method initializes jRadioButton
|
|
164 |
*
|
|
165 |
* @return javax.swing.JRadioButton
|
|
164 |
* This method initializes jRadioButton |
|
165 |
* |
|
166 |
* @return javax.swing.JRadioButton |
|
166 | 167 |
*/ |
167 | 168 |
private JRadioButton getJRadioButtonMultiPoint() { |
168 | 169 |
if (jRadioButtonMultiPoint == null) { |
169 | 170 |
jRadioButtonMultiPoint = new JRadioButton(); |
170 |
jRadioButtonMultiPoint.setText("MULTIPOINT_type");
|
|
171 |
jRadioButtonMultiPoint.setText(PluginServices.getText(this,"multipoint_type"));
|
|
171 | 172 |
jRadioButtonMultiPoint.setBounds(new java.awt.Rectangle(19,56,297,23)); |
172 | 173 |
} |
173 | 174 |
return jRadioButtonMultiPoint; |
... | ... | |
191 | 192 |
getJRadioButtonPolygon().setEnabled(writer.canWriteGeometry(FShape.POLYGON)); |
192 | 193 |
getJRadioButtonMulti().setEnabled(writer.canWriteGeometry(FShape.MULTI)); |
193 | 194 |
} |
194 |
|
|
195 |
|
|
195 | 196 |
public int getSelectedGeometryType() |
196 | 197 |
{ |
197 | 198 |
if (getJRadioButtonPoint().isSelected()) |
... | ... | |
203 | 204 |
if (getJRadioButtonPolygon().isSelected()) |
204 | 205 |
return FShape.POLYGON; |
205 | 206 |
if (getJRadioButtonMulti().isSelected()) |
206 |
return FShape.MULTI;
|
|
207 |
|
|
207 |
return FShape.MULTI; |
|
208 |
|
|
208 | 209 |
return -1; |
209 | 210 |
} |
210 | 211 |
|
211 | 212 |
/** |
212 |
* This method initializes jTextLayerName
|
|
213 |
*
|
|
214 |
* @return javax.swing.JTextField
|
|
213 |
* This method initializes jTextLayerName |
|
214 |
* |
|
215 |
* @return javax.swing.JTextField |
|
215 | 216 |
*/ |
216 | 217 |
private JTextField getJTextFieldLayerName() { |
217 | 218 |
if (jTextFieldLayerName == null) { |
218 | 219 |
jTextFieldLayerName = new JTextField(); |
219 | 220 |
jTextFieldLayerName.setBounds(new java.awt.Rectangle(13,36,323,20)); |
220 |
jTextFieldLayerName.setText("NewLayer");
|
|
221 |
jTextFieldLayerName.setText(PluginServices.getText(this,"new_layer"));
|
|
221 | 222 |
jTextFieldLayerName.setHorizontalAlignment(javax.swing.JTextField.LEFT); |
222 | 223 |
jTextFieldLayerName.addCaretListener(new MyInputEventListener()); |
223 | 224 |
} |
... | ... | |
231 | 232 |
public String getSelectedDriver() { |
232 | 233 |
return driverName; |
233 | 234 |
} |
234 |
|
|
235 | 235 |
|
236 | 236 |
|
237 |
|
|
237 | 238 |
} // @jve:decl-index=0:visual-constraint="10,10" |
Also available in: Unified diff