svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.swing / org.gvsig.fmap.dal.swing.impl / src / main / java / org / gvsig / fmap / dal / swing / impl / featuretype / FeatureTypeAttributePanelView.java @ 44673
History | View | Annotate | Download (28.8 KB)
1 |
package org.gvsig.fmap.dal.swing.impl.featuretype; |
---|---|
2 |
|
3 |
import com.jeta.open.i18n.I18NUtils; |
4 |
import com.jgoodies.forms.layout.CellConstraints; |
5 |
import com.jgoodies.forms.layout.FormLayout; |
6 |
import java.awt.BorderLayout; |
7 |
import java.awt.ComponentOrientation; |
8 |
import java.awt.Container; |
9 |
import java.awt.Dimension; |
10 |
import javax.swing.Box; |
11 |
import javax.swing.ImageIcon; |
12 |
import javax.swing.JButton; |
13 |
import javax.swing.JCheckBox; |
14 |
import javax.swing.JComboBox; |
15 |
import javax.swing.JFrame; |
16 |
import javax.swing.JLabel; |
17 |
import javax.swing.JPanel; |
18 |
import javax.swing.JScrollPane; |
19 |
import javax.swing.JTabbedPane; |
20 |
import javax.swing.JTable; |
21 |
import javax.swing.JTextArea; |
22 |
import javax.swing.JTextField; |
23 |
import javax.swing.border.EmptyBorder; |
24 |
|
25 |
|
26 |
public class FeatureTypeAttributePanelView extends JPanel |
27 |
{ |
28 |
JLabel lblFieldName = new JLabel(); |
29 |
JTextField txtFieldName = new JTextField(); |
30 |
JLabel lblFieldType = new JLabel(); |
31 |
JComboBox cboFieldType = new JComboBox(); |
32 |
JTabbedPane tabAditionalFields = new JTabbedPane(); |
33 |
JLabel lblSize = new JLabel(); |
34 |
JTextField txtSize = new JTextField(); |
35 |
JLabel lblPrecision = new JLabel(); |
36 |
JLabel lblDefaultValue = new JLabel(); |
37 |
JTextField txtPrecision = new JTextField(); |
38 |
JTextField txtDefaultValue = new JTextField(); |
39 |
JLabel lblDataProfile = new JLabel(); |
40 |
JComboBox cboDataProfile = new JComboBox(); |
41 |
JCheckBox chkVirtualField = new JCheckBox(); |
42 |
JButton btnVirtualField = new JButton(); |
43 |
JTextField txtVirtualField = new JTextField(); |
44 |
JLabel lblScale = new JLabel(); |
45 |
JTextField txtScale = new JTextField(); |
46 |
JLabel lblGeometryType = new JLabel(); |
47 |
JLabel lblGeometrySubtype = new JLabel(); |
48 |
JLabel lblCRS = new JLabel(); |
49 |
JComboBox cboGeometryType = new JComboBox(); |
50 |
JComboBox cboGeometrySubtype = new JComboBox(); |
51 |
JButton btnCRS = new JButton(); |
52 |
JTextField txtCRS = new JTextField(); |
53 |
JLabel lblDateFormat = new JLabel(); |
54 |
JComboBox cboDateFormat = new JComboBox(); |
55 |
JLabel lblInterval = new JLabel(); |
56 |
JLabel lblIntervalStart = new JLabel(); |
57 |
JLabel lblIntervalEnd = new JLabel(); |
58 |
JTextField txtIntervalStart = new JTextField(); |
59 |
JButton btnIntervalStart = new JButton(); |
60 |
JButton btnIntervalEnd = new JButton(); |
61 |
JTextField txtIntervalEnd = new JTextField(); |
62 |
JLabel lblTagsName = new JLabel(); |
63 |
JLabel lblTagsValue = new JLabel(); |
64 |
JComboBox cboTagsName = new JComboBox(); |
65 |
JTable tblTags = new JTable(); |
66 |
JLabel lblTagsDescription = new JLabel(); |
67 |
JButton btnTagsAdd = new JButton(); |
68 |
JButton btnTagsUpdate = new JButton(); |
69 |
JButton btnTagsRemove = new JButton(); |
70 |
JComboBox cboTagsValue = new JComboBox(); |
71 |
JCheckBox chkIsForeingKey = new JCheckBox(); |
72 |
JLabel lblForeingKeyTableName = new JLabel(); |
73 |
JLabel lblForeingKeyCodeName = new JLabel(); |
74 |
JLabel lblForeingKeyLabelFormula = new JLabel(); |
75 |
JComboBox cboForeingKeyTableName = new JComboBox(); |
76 |
JComboBox cboForeingKeyCodeName = new JComboBox(); |
77 |
JTextField txtForeingKeyFormula = new JTextField(); |
78 |
JButton btnForeingKeyFormula = new JButton(); |
79 |
JLabel lblIsClosedList = new JLabel(); |
80 |
JCheckBox chkIsClosedList = new JCheckBox(); |
81 |
JTabbedPane tabLayout = new JTabbedPane(); |
82 |
JLabel lblGroup = new JLabel(); |
83 |
JLabel lblOrder = new JLabel(); |
84 |
JComboBox cboGroup = new JComboBox(); |
85 |
JTextField txtOrder = new JTextField(); |
86 |
JLabel lblHidden = new JLabel(); |
87 |
JCheckBox chkHidden = new JCheckBox(); |
88 |
JLabel lblLabel = new JLabel(); |
89 |
JTextField txtLabel = new JTextField(); |
90 |
JLabel lblDescription = new JLabel(); |
91 |
JTextArea txtDescription = new JTextArea(); |
92 |
JLabel lblMinValue = new JLabel(); |
93 |
JTextField txtMinValue = new JTextField(); |
94 |
JLabel lblMaxValue = new JLabel(); |
95 |
JTextField txtMaxValue = new JTextField(); |
96 |
JLabel lblAvailableValues = new JLabel(); |
97 |
JButton btnAvailableValuesAdd = new JButton(); |
98 |
JButton btnAvailableValuesUpdate = new JButton(); |
99 |
JButton btnAvailableValuesRemove = new JButton(); |
100 |
JLabel lblAvailableValuesLabel = new JLabel(); |
101 |
JLabel lblAvailableValuesValue = new JLabel(); |
102 |
JComboBox cboAvailableValues = new JComboBox(); |
103 |
JTextField txtAvailableValuesLabel = new JTextField(); |
104 |
JTextField txtAvailableValuesValue = new JTextField(); |
105 |
JLabel lblIsPrimaryKey = new JLabel(); |
106 |
JCheckBox chkIsPrimaryKey = new JCheckBox(); |
107 |
JLabel lblIsAutomatic = new JLabel(); |
108 |
JCheckBox chkIsAutomatic = new JCheckBox(); |
109 |
JLabel lblAllowNulls = new JLabel(); |
110 |
JCheckBox chkAllowNulls = new JCheckBox(); |
111 |
|
112 |
/**
|
113 |
* Default constructor
|
114 |
*/
|
115 |
public FeatureTypeAttributePanelView()
|
116 |
{ |
117 |
initializePanel(); |
118 |
} |
119 |
|
120 |
/**
|
121 |
* Adds fill components to empty cells in the first row and first column of the grid.
|
122 |
* This ensures that the grid spacing will be the same as shown in the designer.
|
123 |
* @param cols an array of column indices in the first row where fill components should be added.
|
124 |
* @param rows an array of row indices in the first column where fill components should be added.
|
125 |
*/
|
126 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
127 |
{ |
128 |
Dimension filler = new Dimension(10,10); |
129 |
|
130 |
boolean filled_cell_11 = false; |
131 |
CellConstraints cc = new CellConstraints();
|
132 |
if ( cols.length > 0 && rows.length > 0 ) |
133 |
{ |
134 |
if ( cols[0] == 1 && rows[0] == 1 ) |
135 |
{ |
136 |
/** add a rigid area */
|
137 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
138 |
filled_cell_11 = true;
|
139 |
} |
140 |
} |
141 |
|
142 |
for( int index = 0; index < cols.length; index++ ) |
143 |
{ |
144 |
if ( cols[index] == 1 && filled_cell_11 ) |
145 |
{ |
146 |
continue;
|
147 |
} |
148 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
149 |
} |
150 |
|
151 |
for( int index = 0; index < rows.length; index++ ) |
152 |
{ |
153 |
if ( rows[index] == 1 && filled_cell_11 ) |
154 |
{ |
155 |
continue;
|
156 |
} |
157 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
158 |
} |
159 |
|
160 |
} |
161 |
|
162 |
/**
|
163 |
* Helper method to load an image file from the CLASSPATH
|
164 |
* @param imageName the package and name of the file to load relative to the CLASSPATH
|
165 |
* @return an ImageIcon instance with the specified image file
|
166 |
* @throws IllegalArgumentException if the image resource cannot be loaded.
|
167 |
*/
|
168 |
public ImageIcon loadImage( String imageName ) |
169 |
{ |
170 |
try
|
171 |
{ |
172 |
ClassLoader classloader = getClass().getClassLoader();
|
173 |
java.net.URL url = classloader.getResource( imageName ); |
174 |
if ( url != null ) |
175 |
{ |
176 |
ImageIcon icon = new ImageIcon( url ); |
177 |
return icon;
|
178 |
} |
179 |
} |
180 |
catch( Exception e ) |
181 |
{ |
182 |
e.printStackTrace(); |
183 |
} |
184 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
185 |
} |
186 |
|
187 |
/**
|
188 |
* Method for recalculating the component orientation for
|
189 |
* right-to-left Locales.
|
190 |
* @param orientation the component orientation to be applied
|
191 |
*/
|
192 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
193 |
{ |
194 |
// Not yet implemented...
|
195 |
// I18NUtils.applyComponentOrientation(this, orientation);
|
196 |
super.applyComponentOrientation(orientation);
|
197 |
} |
198 |
|
199 |
public JPanel createPanel() |
200 |
{ |
201 |
JPanel jpanel1 = new JPanel(); |
202 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE"); |
203 |
CellConstraints cc = new CellConstraints();
|
204 |
jpanel1.setLayout(formlayout1); |
205 |
|
206 |
lblFieldName.setName("lblFieldName");
|
207 |
lblFieldName.setText("_Field_name");
|
208 |
jpanel1.add(lblFieldName,cc.xy(2,2)); |
209 |
|
210 |
txtFieldName.setName("txtFieldName");
|
211 |
jpanel1.add(txtFieldName,cc.xy(4,2)); |
212 |
|
213 |
lblFieldType.setName("lblFieldType");
|
214 |
lblFieldType.setText("_Field_type");
|
215 |
jpanel1.add(lblFieldType,cc.xy(2,4)); |
216 |
|
217 |
cboFieldType.setName("cboFieldType");
|
218 |
jpanel1.add(cboFieldType,cc.xy(4,4)); |
219 |
|
220 |
tabAditionalFields.setName("tabAditionalFields");
|
221 |
tabAditionalFields.addTab("_Basic_fields",null,createPanel1()); |
222 |
tabAditionalFields.addTab("_Geometry",null,createPanel3()); |
223 |
tabAditionalFields.addTab("_Time",null,createPanel5()); |
224 |
tabAditionalFields.addTab("_Tags",null,createPanel7()); |
225 |
tabAditionalFields.addTab("_ForeingKey",null,createPanel10()); |
226 |
tabAditionalFields.addTab("_Visualization",null,createPanel11()); |
227 |
jpanel1.add(tabAditionalFields,cc.xywh(2,8,3,1)); |
228 |
|
229 |
jpanel1.add(createPanel17(),cc.xy(4,6)); |
230 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
231 |
return jpanel1;
|
232 |
} |
233 |
|
234 |
public JPanel createPanel1() |
235 |
{ |
236 |
JPanel jpanel1 = new JPanel(); |
237 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
238 |
CellConstraints cc = new CellConstraints();
|
239 |
jpanel1.setLayout(formlayout1); |
240 |
|
241 |
lblSize.setName("lblSize");
|
242 |
lblSize.setText("_Size");
|
243 |
jpanel1.add(lblSize,cc.xy(2,2)); |
244 |
|
245 |
txtSize.setName("txtSize");
|
246 |
jpanel1.add(txtSize,cc.xy(4,2)); |
247 |
|
248 |
lblPrecision.setName("lblPrecision");
|
249 |
lblPrecision.setText("_Precision");
|
250 |
jpanel1.add(lblPrecision,cc.xy(2,4)); |
251 |
|
252 |
lblDefaultValue.setName("lblDefaultValue");
|
253 |
lblDefaultValue.setText("_Default_value");
|
254 |
jpanel1.add(lblDefaultValue,cc.xy(2,8)); |
255 |
|
256 |
txtPrecision.setName("txtPrecision");
|
257 |
jpanel1.add(txtPrecision,cc.xy(4,4)); |
258 |
|
259 |
txtDefaultValue.setName("txtDefaultValue");
|
260 |
jpanel1.add(txtDefaultValue,cc.xy(4,8)); |
261 |
|
262 |
lblDataProfile.setName("lblDataProfile");
|
263 |
lblDataProfile.setText("_Data_profile");
|
264 |
jpanel1.add(lblDataProfile,cc.xy(2,10)); |
265 |
|
266 |
cboDataProfile.setName("cboDataProfile");
|
267 |
jpanel1.add(cboDataProfile,cc.xy(4,10)); |
268 |
|
269 |
chkVirtualField.setActionCommand("Campo virtual");
|
270 |
chkVirtualField.setName("chkVirtualField");
|
271 |
chkVirtualField.setText("_Virtual_field");
|
272 |
jpanel1.add(chkVirtualField,cc.xy(2,12)); |
273 |
|
274 |
jpanel1.add(createPanel2(),cc.xy(4,12)); |
275 |
lblScale.setName("lblScale");
|
276 |
lblScale.setText("_Scale");
|
277 |
jpanel1.add(lblScale,cc.xy(2,6)); |
278 |
|
279 |
txtScale.setName("txtScale");
|
280 |
jpanel1.add(txtScale,cc.xy(4,6)); |
281 |
|
282 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12 }); |
283 |
return jpanel1;
|
284 |
} |
285 |
|
286 |
public JPanel createPanel2() |
287 |
{ |
288 |
JPanel jpanel1 = new JPanel(); |
289 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
290 |
CellConstraints cc = new CellConstraints();
|
291 |
jpanel1.setLayout(formlayout1); |
292 |
|
293 |
btnVirtualField.setActionCommand("...");
|
294 |
btnVirtualField.setName("btnVirtualField");
|
295 |
btnVirtualField.setText("...");
|
296 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
297 |
btnVirtualField.setBorder(emptyborder1); |
298 |
jpanel1.add(btnVirtualField,cc.xy(3,1)); |
299 |
|
300 |
txtVirtualField.setName("txtVirtualField");
|
301 |
jpanel1.add(txtVirtualField,cc.xy(1,1)); |
302 |
|
303 |
addFillComponents(jpanel1,new int[]{ 2 },new int[0]); |
304 |
return jpanel1;
|
305 |
} |
306 |
|
307 |
public JPanel createPanel3() |
308 |
{ |
309 |
JPanel jpanel1 = new JPanel(); |
310 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
311 |
CellConstraints cc = new CellConstraints();
|
312 |
jpanel1.setLayout(formlayout1); |
313 |
|
314 |
lblGeometryType.setName("lblGeometryType");
|
315 |
lblGeometryType.setText("_Geometry_type");
|
316 |
jpanel1.add(lblGeometryType,cc.xy(2,2)); |
317 |
|
318 |
lblGeometrySubtype.setName("lblGeometrySubtype");
|
319 |
lblGeometrySubtype.setText("_Geometry_subtype");
|
320 |
jpanel1.add(lblGeometrySubtype,cc.xy(2,4)); |
321 |
|
322 |
lblCRS.setName("lblCRS");
|
323 |
lblCRS.setText("_CRS");
|
324 |
jpanel1.add(lblCRS,cc.xy(2,6)); |
325 |
|
326 |
cboGeometryType.setName("cboGeometryType");
|
327 |
jpanel1.add(cboGeometryType,cc.xy(4,2)); |
328 |
|
329 |
cboGeometrySubtype.setName("cboGeometrySubtype");
|
330 |
jpanel1.add(cboGeometrySubtype,cc.xy(4,4)); |
331 |
|
332 |
jpanel1.add(createPanel4(),cc.xy(4,6)); |
333 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 }); |
334 |
return jpanel1;
|
335 |
} |
336 |
|
337 |
public JPanel createPanel4() |
338 |
{ |
339 |
JPanel jpanel1 = new JPanel(); |
340 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
341 |
CellConstraints cc = new CellConstraints();
|
342 |
jpanel1.setLayout(formlayout1); |
343 |
|
344 |
btnCRS.setActionCommand("...");
|
345 |
btnCRS.setName("btnCRS");
|
346 |
btnCRS.setText("...");
|
347 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
348 |
btnCRS.setBorder(emptyborder1); |
349 |
jpanel1.add(btnCRS,cc.xy(3,1)); |
350 |
|
351 |
txtCRS.setName("txtCRS");
|
352 |
jpanel1.add(txtCRS,cc.xy(1,1)); |
353 |
|
354 |
addFillComponents(jpanel1,new int[]{ 2 },new int[0]); |
355 |
return jpanel1;
|
356 |
} |
357 |
|
358 |
public JPanel createPanel5() |
359 |
{ |
360 |
JPanel jpanel1 = new JPanel(); |
361 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
362 |
CellConstraints cc = new CellConstraints();
|
363 |
jpanel1.setLayout(formlayout1); |
364 |
|
365 |
lblDateFormat.setName("lblDateFormat");
|
366 |
lblDateFormat.setText("_Date_format");
|
367 |
jpanel1.add(lblDateFormat,cc.xy(2,2)); |
368 |
|
369 |
cboDateFormat.setEditable(true);
|
370 |
cboDateFormat.setName("cboDateFormat");
|
371 |
cboDateFormat.setRequestFocusEnabled(false);
|
372 |
jpanel1.add(cboDateFormat,cc.xy(4,2)); |
373 |
|
374 |
lblInterval.setName("lblInterval");
|
375 |
lblInterval.setText("_Interval");
|
376 |
jpanel1.add(lblInterval,new CellConstraints(2,5,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
377 |
|
378 |
jpanel1.add(createPanel6(),cc.xy(4,5)); |
379 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6 }); |
380 |
return jpanel1;
|
381 |
} |
382 |
|
383 |
public JPanel createPanel6() |
384 |
{ |
385 |
JPanel jpanel1 = new JPanel(); |
386 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
387 |
CellConstraints cc = new CellConstraints();
|
388 |
jpanel1.setLayout(formlayout1); |
389 |
|
390 |
lblIntervalStart.setName("lblIntervalStart");
|
391 |
lblIntervalStart.setText("_Start");
|
392 |
jpanel1.add(lblIntervalStart,cc.xy(1,1)); |
393 |
|
394 |
lblIntervalEnd.setName("lblIntervalEnd");
|
395 |
lblIntervalEnd.setText("_End");
|
396 |
jpanel1.add(lblIntervalEnd,cc.xy(1,3)); |
397 |
|
398 |
txtIntervalStart.setName("txtIntervalStart");
|
399 |
jpanel1.add(txtIntervalStart,cc.xy(3,1)); |
400 |
|
401 |
btnIntervalStart.setActionCommand("...");
|
402 |
btnIntervalStart.setName("btnIntervalStart");
|
403 |
btnIntervalStart.setText("...");
|
404 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
405 |
btnIntervalStart.setBorder(emptyborder1); |
406 |
jpanel1.add(btnIntervalStart,cc.xy(5,1)); |
407 |
|
408 |
btnIntervalEnd.setActionCommand("...");
|
409 |
btnIntervalEnd.setName("btnIntervalEnd");
|
410 |
btnIntervalEnd.setText("...");
|
411 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
412 |
btnIntervalEnd.setBorder(emptyborder2); |
413 |
jpanel1.add(btnIntervalEnd,cc.xy(5,3)); |
414 |
|
415 |
txtIntervalEnd.setName("txtIntervalEnd");
|
416 |
jpanel1.add(txtIntervalEnd,cc.xy(3,3)); |
417 |
|
418 |
addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2 }); |
419 |
return jpanel1;
|
420 |
} |
421 |
|
422 |
public JPanel createPanel7() |
423 |
{ |
424 |
JPanel jpanel1 = new JPanel(); |
425 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)"); |
426 |
CellConstraints cc = new CellConstraints();
|
427 |
jpanel1.setLayout(formlayout1); |
428 |
|
429 |
jpanel1.add(createPanel8(),cc.xy(1,1)); |
430 |
addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 }); |
431 |
return jpanel1;
|
432 |
} |
433 |
|
434 |
public JPanel createPanel8() |
435 |
{ |
436 |
JPanel jpanel1 = new JPanel(); |
437 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
438 |
CellConstraints cc = new CellConstraints();
|
439 |
jpanel1.setLayout(formlayout1); |
440 |
|
441 |
lblTagsName.setName("lblTagsName");
|
442 |
lblTagsName.setText("_Name");
|
443 |
jpanel1.add(lblTagsName,cc.xy(2,3)); |
444 |
|
445 |
lblTagsValue.setName("lblTagsValue");
|
446 |
lblTagsValue.setText("_Value");
|
447 |
jpanel1.add(lblTagsValue,cc.xy(2,5)); |
448 |
|
449 |
cboTagsName.setEditable(true);
|
450 |
cboTagsName.setName("cboTagsName");
|
451 |
cboTagsName.setRequestFocusEnabled(false);
|
452 |
jpanel1.add(cboTagsName,cc.xy(4,3)); |
453 |
|
454 |
tblTags.setName("tblTags");
|
455 |
JScrollPane jscrollpane1 = new JScrollPane(); |
456 |
jscrollpane1.setViewportView(tblTags); |
457 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
458 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
459 |
jpanel1.add(jscrollpane1,cc.xywh(2,1,3,1)); |
460 |
|
461 |
lblTagsDescription.setName("lblTagsDescription");
|
462 |
jpanel1.add(lblTagsDescription,cc.xy(4,6)); |
463 |
|
464 |
jpanel1.add(createPanel9(),cc.xywh(6,1,1,5)); |
465 |
cboTagsValue.setEditable(true);
|
466 |
cboTagsValue.setName("cboTagsValue");
|
467 |
cboTagsValue.setRequestFocusEnabled(false);
|
468 |
jpanel1.add(cboTagsValue,cc.xy(4,5)); |
469 |
|
470 |
addFillComponents(jpanel1,new int[]{ 1,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6 }); |
471 |
return jpanel1;
|
472 |
} |
473 |
|
474 |
public JPanel createPanel9() |
475 |
{ |
476 |
JPanel jpanel1 = new JPanel(); |
477 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
478 |
CellConstraints cc = new CellConstraints();
|
479 |
jpanel1.setLayout(formlayout1); |
480 |
|
481 |
btnTagsAdd.setActionCommand("_Add");
|
482 |
btnTagsAdd.setName("btnTagsAdd");
|
483 |
btnTagsAdd.setText("_Add");
|
484 |
jpanel1.add(btnTagsAdd,cc.xy(1,1)); |
485 |
|
486 |
btnTagsUpdate.setActionCommand("_Update");
|
487 |
btnTagsUpdate.setName("btnTagsUpdate");
|
488 |
btnTagsUpdate.setText("_Update");
|
489 |
jpanel1.add(btnTagsUpdate,cc.xy(1,3)); |
490 |
|
491 |
btnTagsRemove.setActionCommand("_Remove");
|
492 |
btnTagsRemove.setName("btnTagsRemove");
|
493 |
btnTagsRemove.setText("_Remove");
|
494 |
jpanel1.add(btnTagsRemove,cc.xy(1,5)); |
495 |
|
496 |
addFillComponents(jpanel1,new int[0],new int[]{ 2,4 }); |
497 |
return jpanel1;
|
498 |
} |
499 |
|
500 |
public JPanel createPanel10() |
501 |
{ |
502 |
JPanel jpanel1 = new JPanel(); |
503 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
504 |
CellConstraints cc = new CellConstraints();
|
505 |
jpanel1.setLayout(formlayout1); |
506 |
|
507 |
chkIsForeingKey.setActionCommand("_is_foreing_key");
|
508 |
chkIsForeingKey.setName("chkIsForeingKey");
|
509 |
chkIsForeingKey.setText("_is_foreing_key");
|
510 |
jpanel1.add(chkIsForeingKey,cc.xywh(2,2,3,1)); |
511 |
|
512 |
lblForeingKeyTableName.setName("lblForeingKeyTableName");
|
513 |
lblForeingKeyTableName.setText("_Table");
|
514 |
jpanel1.add(lblForeingKeyTableName,cc.xy(2,6)); |
515 |
|
516 |
lblForeingKeyCodeName.setName("lblForeingKeyCodeName");
|
517 |
lblForeingKeyCodeName.setText("_Code");
|
518 |
jpanel1.add(lblForeingKeyCodeName,cc.xy(2,8)); |
519 |
|
520 |
lblForeingKeyLabelFormula.setName("lblForeingKeyLabelFormula");
|
521 |
lblForeingKeyLabelFormula.setText("_Label_formula");
|
522 |
jpanel1.add(lblForeingKeyLabelFormula,cc.xy(2,10)); |
523 |
|
524 |
cboForeingKeyTableName.setEditable(true);
|
525 |
cboForeingKeyTableName.setName("cboForeingKeyTableName");
|
526 |
cboForeingKeyTableName.setRequestFocusEnabled(false);
|
527 |
jpanel1.add(cboForeingKeyTableName,cc.xywh(4,6,3,1)); |
528 |
|
529 |
cboForeingKeyCodeName.setEditable(true);
|
530 |
cboForeingKeyCodeName.setName("cboForeingKeyCodeName");
|
531 |
cboForeingKeyCodeName.setRequestFocusEnabled(false);
|
532 |
jpanel1.add(cboForeingKeyCodeName,cc.xywh(4,8,3,1)); |
533 |
|
534 |
txtForeingKeyFormula.setName("txtForeingKeyFormula");
|
535 |
jpanel1.add(txtForeingKeyFormula,cc.xy(4,10)); |
536 |
|
537 |
btnForeingKeyFormula.setActionCommand("...");
|
538 |
btnForeingKeyFormula.setName("btnForeingKeyFormula");
|
539 |
btnForeingKeyFormula.setText("...");
|
540 |
jpanel1.add(btnForeingKeyFormula,cc.xy(6,10)); |
541 |
|
542 |
lblIsClosedList.setName("lblIsClosedList");
|
543 |
lblIsClosedList.setText("_is_closed_list");
|
544 |
jpanel1.add(lblIsClosedList,cc.xy(2,4)); |
545 |
|
546 |
chkIsClosedList.setName("chkIsClosedList");
|
547 |
jpanel1.add(chkIsClosedList,cc.xy(4,4)); |
548 |
|
549 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 }); |
550 |
return jpanel1;
|
551 |
} |
552 |
|
553 |
public JPanel createPanel11() |
554 |
{ |
555 |
JPanel jpanel1 = new JPanel(); |
556 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)"); |
557 |
CellConstraints cc = new CellConstraints();
|
558 |
jpanel1.setLayout(formlayout1); |
559 |
|
560 |
tabLayout.setName("tabLayout");
|
561 |
tabLayout.setTabPlacement(JTabbedPane.LEFT);
|
562 |
tabLayout.addTab("_Basic",null,createPanel12()); |
563 |
tabLayout.addTab("_Values",null,createPanel13()); |
564 |
jpanel1.add(tabLayout,cc.xy(1,1)); |
565 |
|
566 |
addFillComponents(jpanel1,new int[0],new int[0]); |
567 |
return jpanel1;
|
568 |
} |
569 |
|
570 |
public JPanel createPanel12() |
571 |
{ |
572 |
JPanel jpanel1 = new JPanel(); |
573 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(0.2)"); |
574 |
CellConstraints cc = new CellConstraints();
|
575 |
jpanel1.setLayout(formlayout1); |
576 |
|
577 |
lblGroup.setName("lblGroup");
|
578 |
lblGroup.setText("_Group");
|
579 |
jpanel1.add(lblGroup,cc.xy(2,2)); |
580 |
|
581 |
lblOrder.setName("lblOrder");
|
582 |
lblOrder.setText("_Order");
|
583 |
jpanel1.add(lblOrder,cc.xy(2,4)); |
584 |
|
585 |
cboGroup.setEditable(true);
|
586 |
cboGroup.setName("cboGroup");
|
587 |
cboGroup.setRequestFocusEnabled(false);
|
588 |
jpanel1.add(cboGroup,cc.xy(4,2)); |
589 |
|
590 |
txtOrder.setName("txtOrder");
|
591 |
jpanel1.add(txtOrder,cc.xy(4,4)); |
592 |
|
593 |
lblHidden.setName("lblHidden");
|
594 |
lblHidden.setText("_Hidden");
|
595 |
jpanel1.add(lblHidden,cc.xy(2,6)); |
596 |
|
597 |
chkHidden.setName("chkHidden");
|
598 |
jpanel1.add(chkHidden,cc.xy(4,6)); |
599 |
|
600 |
lblLabel.setName("lblLabel");
|
601 |
lblLabel.setText("_Label");
|
602 |
jpanel1.add(lblLabel,cc.xy(2,8)); |
603 |
|
604 |
txtLabel.setName("txtLabel");
|
605 |
jpanel1.add(txtLabel,cc.xy(4,8)); |
606 |
|
607 |
lblDescription.setName("lblDescription");
|
608 |
lblDescription.setText("_Description");
|
609 |
lblDescription.setVerticalAlignment(JLabel.TOP);
|
610 |
jpanel1.add(lblDescription,new CellConstraints(2,10,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
611 |
|
612 |
txtDescription.setName("txtDescription");
|
613 |
JScrollPane jscrollpane1 = new JScrollPane(); |
614 |
jscrollpane1.setViewportView(txtDescription); |
615 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
616 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
617 |
jpanel1.add(jscrollpane1,cc.xy(4,10)); |
618 |
|
619 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10 }); |
620 |
return jpanel1;
|
621 |
} |
622 |
|
623 |
public JPanel createPanel13() |
624 |
{ |
625 |
JPanel jpanel1 = new JPanel(); |
626 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
627 |
CellConstraints cc = new CellConstraints();
|
628 |
jpanel1.setLayout(formlayout1); |
629 |
|
630 |
lblMinValue.setName("lblMinValue");
|
631 |
lblMinValue.setText("_Minimum_value");
|
632 |
jpanel1.add(lblMinValue,cc.xy(2,2)); |
633 |
|
634 |
txtMinValue.setName("txtMinValue");
|
635 |
jpanel1.add(txtMinValue,cc.xy(4,2)); |
636 |
|
637 |
lblMaxValue.setName("lblMaxValue");
|
638 |
lblMaxValue.setText("_Maximum_value");
|
639 |
jpanel1.add(lblMaxValue,cc.xy(2,4)); |
640 |
|
641 |
txtMaxValue.setName("txtMaxValue");
|
642 |
jpanel1.add(txtMaxValue,cc.xy(4,4)); |
643 |
|
644 |
lblAvailableValues.setName("lblAvailableValues");
|
645 |
lblAvailableValues.setText("_List_of_values");
|
646 |
jpanel1.add(lblAvailableValues,cc.xywh(2,6,3,1)); |
647 |
|
648 |
jpanel1.add(createPanel14(),cc.xywh(2,7,3,1)); |
649 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 }); |
650 |
return jpanel1;
|
651 |
} |
652 |
|
653 |
public JPanel createPanel14() |
654 |
{ |
655 |
JPanel jpanel1 = new JPanel(); |
656 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
657 |
CellConstraints cc = new CellConstraints();
|
658 |
jpanel1.setLayout(formlayout1); |
659 |
|
660 |
jpanel1.add(createPanel15(),cc.xy(3,1)); |
661 |
jpanel1.add(createPanel16(),cc.xy(1,1)); |
662 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1 }); |
663 |
return jpanel1;
|
664 |
} |
665 |
|
666 |
public JPanel createPanel15() |
667 |
{ |
668 |
JPanel jpanel1 = new JPanel(); |
669 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:2DLU:GROW(1.0)"); |
670 |
CellConstraints cc = new CellConstraints();
|
671 |
jpanel1.setLayout(formlayout1); |
672 |
|
673 |
btnAvailableValuesAdd.setActionCommand("_Add");
|
674 |
btnAvailableValuesAdd.setName("btnAvailableValuesAdd");
|
675 |
btnAvailableValuesAdd.setText("_Add");
|
676 |
jpanel1.add(btnAvailableValuesAdd,cc.xy(1,1)); |
677 |
|
678 |
btnAvailableValuesUpdate.setActionCommand("_Update");
|
679 |
btnAvailableValuesUpdate.setName("btnAvailableValuesUpdate");
|
680 |
btnAvailableValuesUpdate.setText("_Update");
|
681 |
jpanel1.add(btnAvailableValuesUpdate,cc.xy(1,3)); |
682 |
|
683 |
btnAvailableValuesRemove.setActionCommand("_Remove");
|
684 |
btnAvailableValuesRemove.setName("btnAvailableValuesRemove");
|
685 |
btnAvailableValuesRemove.setText("_Remove");
|
686 |
jpanel1.add(btnAvailableValuesRemove,cc.xy(1,5)); |
687 |
|
688 |
addFillComponents(jpanel1,new int[0],new int[]{ 2,4,6 }); |
689 |
return jpanel1;
|
690 |
} |
691 |
|
692 |
public JPanel createPanel16() |
693 |
{ |
694 |
JPanel jpanel1 = new JPanel(); |
695 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
696 |
CellConstraints cc = new CellConstraints();
|
697 |
jpanel1.setLayout(formlayout1); |
698 |
|
699 |
lblAvailableValuesLabel.setName("lblAvailableValuesLabel");
|
700 |
lblAvailableValuesLabel.setText("_Label");
|
701 |
jpanel1.add(lblAvailableValuesLabel,cc.xy(1,3)); |
702 |
|
703 |
lblAvailableValuesValue.setName("lblAvailableValuesValue");
|
704 |
lblAvailableValuesValue.setText("_Value");
|
705 |
jpanel1.add(lblAvailableValuesValue,cc.xy(1,5)); |
706 |
|
707 |
cboAvailableValues.setName("cboAvailableValues");
|
708 |
jpanel1.add(cboAvailableValues,cc.xywh(1,1,3,1)); |
709 |
|
710 |
txtAvailableValuesLabel.setName("txtAvailableValuesLabel");
|
711 |
jpanel1.add(txtAvailableValuesLabel,cc.xy(3,3)); |
712 |
|
713 |
txtAvailableValuesValue.setName("txtAvailableValuesValue");
|
714 |
jpanel1.add(txtAvailableValuesValue,cc.xy(3,5)); |
715 |
|
716 |
addFillComponents(jpanel1,new int[]{ 2,3 },new int[]{ 2,4,6 }); |
717 |
return jpanel1;
|
718 |
} |
719 |
|
720 |
public JPanel createPanel17() |
721 |
{ |
722 |
JPanel jpanel1 = new JPanel(); |
723 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
724 |
CellConstraints cc = new CellConstraints();
|
725 |
jpanel1.setLayout(formlayout1); |
726 |
|
727 |
lblIsPrimaryKey.setName("lblIsPrimaryKey");
|
728 |
lblIsPrimaryKey.setText("_Primary_key");
|
729 |
jpanel1.add(lblIsPrimaryKey,cc.xy(1,1)); |
730 |
|
731 |
chkIsPrimaryKey.setName("chkIsPrimaryKey");
|
732 |
jpanel1.add(chkIsPrimaryKey,cc.xy(3,1)); |
733 |
|
734 |
lblIsAutomatic.setName("lblIsAutomatic");
|
735 |
lblIsAutomatic.setText("_Value_automatic");
|
736 |
jpanel1.add(lblIsAutomatic,cc.xy(5,1)); |
737 |
|
738 |
chkIsAutomatic.setName("chkIsAutomatic");
|
739 |
jpanel1.add(chkIsAutomatic,cc.xy(7,1)); |
740 |
|
741 |
lblAllowNulls.setName("lblAllowNulls");
|
742 |
lblAllowNulls.setText("_Allow_nulls");
|
743 |
jpanel1.add(lblAllowNulls,cc.xy(9,1)); |
744 |
|
745 |
chkAllowNulls.setName("chkAllowNulls");
|
746 |
jpanel1.add(chkAllowNulls,cc.xy(11,1)); |
747 |
|
748 |
addFillComponents(jpanel1,new int[]{ 2,4,6,8,10,12 },new int[0]); |
749 |
return jpanel1;
|
750 |
} |
751 |
|
752 |
/**
|
753 |
* Initializer
|
754 |
*/
|
755 |
protected void initializePanel() |
756 |
{ |
757 |
setLayout(new BorderLayout()); |
758 |
add(createPanel(), BorderLayout.CENTER);
|
759 |
} |
760 |
|
761 |
|
762 |
} |