Statistics
| Revision:

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 / DefaultFeatureAttributePanelView.java @ 44947

History | View | Annotate | Download (31.9 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.JList;
18
import javax.swing.JPanel;
19
import javax.swing.JScrollPane;
20
import javax.swing.JTabbedPane;
21
import javax.swing.JTable;
22
import javax.swing.JTextArea;
23
import javax.swing.JTextField;
24
import javax.swing.border.EmptyBorder;
25

    
26

    
27
public class DefaultFeatureAttributePanelView extends JPanel
28
{
29
   JLabel lblFieldName = new JLabel();
30
   JTextField txtFieldName = new JTextField();
31
   JLabel lblFieldType = new JLabel();
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 lblRelationType = new JLabel();
47
   JComboBox cboRelationType = new JComboBox();
48
   JLabel lblDisplaySize = new JLabel();
49
   JTextField txtDisplaySize = new JTextField();
50
   JLabel lblGeometryType = new JLabel();
51
   JLabel lblGeometrySubtype = new JLabel();
52
   JLabel lblCRS = new JLabel();
53
   JComboBox cboGeometryType = new JComboBox();
54
   JComboBox cboGeometrySubtype = new JComboBox();
55
   JButton btnCRS = new JButton();
56
   JTextField txtCRS = new JTextField();
57
   JLabel lblDateFormat = new JLabel();
58
   JComboBox cboDateFormat = new JComboBox();
59
   JLabel lblInterval = new JLabel();
60
   JLabel lblIntervalStart = new JLabel();
61
   JLabel lblIntervalEnd = new JLabel();
62
   JTextField txtIntervalStart = new JTextField();
63
   JButton btnIntervalStart = new JButton();
64
   JButton btnIntervalEnd = new JButton();
65
   JTextField txtIntervalEnd = new JTextField();
66
   JLabel lblTagsName = new JLabel();
67
   JLabel lblTagsValue = new JLabel();
68
   JComboBox cboTagsName = new JComboBox();
69
   JTable tblTags = new JTable();
70
   JLabel lblTagsDescription = new JLabel();
71
   JButton btnTagsAdd = new JButton();
72
   JButton btnTagsUpdate = new JButton();
73
   JButton btnTagsRemove = new JButton();
74
   JComboBox cboTagsValue = new JComboBox();
75
   JCheckBox chkIsForeingKey = new JCheckBox();
76
   JLabel lblForeingKeyTableName = new JLabel();
77
   JLabel lblForeingKeyCodeName = new JLabel();
78
   JLabel lblForeingKeyLabelFormula = new JLabel();
79
   JComboBox cboForeingKeyTableName = new JComboBox();
80
   JComboBox cboForeingKeyCodeName = new JComboBox();
81
   JTextField txtForeingKeyFormula = new JTextField();
82
   JButton btnForeingKeyFormula = new JButton();
83
   JLabel lblIsClosedList = new JLabel();
84
   JCheckBox chkIsClosedList = new JCheckBox();
85
   JTabbedPane tabLayout = new JTabbedPane();
86
   JLabel lblGroup = new JLabel();
87
   JLabel lblOrder = new JLabel();
88
   JComboBox cboGroup = new JComboBox();
89
   JTextField txtOrder = new JTextField();
90
   JLabel lblHidden = new JLabel();
91
   JCheckBox chkHidden = new JCheckBox();
92
   JLabel lblLabel = new JLabel();
93
   JTextField txtLabel = new JTextField();
94
   JLabel lblDescription = new JLabel();
95
   JTextArea txtDescription = new JTextArea();
96
   JLabel lblMinValue = new JLabel();
97
   JTextField txtMinValue = new JTextField();
98
   JLabel lblMaxValue = new JLabel();
99
   JTextField txtMaxValue = new JTextField();
100
   JLabel lblAvailableValues = new JLabel();
101
   JButton btnAvailableValuesAdd = new JButton();
102
   JButton btnAvailableValuesUpdate = new JButton();
103
   JButton btnAvailableValuesRemove = new JButton();
104
   JButton btnAvailableValuesRemoveAll = new JButton();
105
   JLabel lblAvailableValuesLabel = new JLabel();
106
   JLabel lblAvailableValuesValue = new JLabel();
107
   JTextField txtAvailableValuesLabel = new JTextField();
108
   JTextField txtAvailableValuesValue = new JTextField();
109
   JList lstAvailableValues = new JList();
110
   JLabel lblIsPrimaryKey = new JLabel();
111
   JCheckBox chkIsPrimaryKey = new JCheckBox();
112
   JLabel lblIsAutomatic = new JLabel();
113
   JCheckBox chkIsAutomatic = new JCheckBox();
114
   JLabel lblAllowNulls = new JLabel();
115
   JCheckBox chkAllowNulls = new JCheckBox();
116
   JComboBox cboFieldType = new JComboBox();
117
   JButton btnFieldType = new JButton();
118

    
119
   /**
120
    * Default constructor
121
    */
122
   public DefaultFeatureAttributePanelView()
123
   {
124
      initializePanel();
125
   }
126

    
127
   /**
128
    * Adds fill components to empty cells in the first row and first column of the grid.
129
    * This ensures that the grid spacing will be the same as shown in the designer.
130
    * @param cols an array of column indices in the first row where fill components should be added.
131
    * @param rows an array of row indices in the first column where fill components should be added.
132
    */
133
   void addFillComponents( Container panel, int[] cols, int[] rows )
134
   {
135
      Dimension filler = new Dimension(10,10);
136

    
137
      boolean filled_cell_11 = false;
138
      CellConstraints cc = new CellConstraints();
139
      if ( cols.length > 0 && rows.length > 0 )
140
      {
141
         if ( cols[0] == 1 && rows[0] == 1 )
142
         {
143
            /** add a rigid area  */
144
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
145
            filled_cell_11 = true;
146
         }
147
      }
148

    
149
      for( int index = 0; index < cols.length; index++ )
150
      {
151
         if ( cols[index] == 1 && filled_cell_11 )
152
         {
153
            continue;
154
         }
155
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
156
      }
157

    
158
      for( int index = 0; index < rows.length; index++ )
159
      {
160
         if ( rows[index] == 1 && filled_cell_11 )
161
         {
162
            continue;
163
         }
164
         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
165
      }
166

    
167
   }
168

    
169
   /**
170
    * Helper method to load an image file from the CLASSPATH
171
    * @param imageName the package and name of the file to load relative to the CLASSPATH
172
    * @return an ImageIcon instance with the specified image file
173
    * @throws IllegalArgumentException if the image resource cannot be loaded.
174
    */
175
   public ImageIcon loadImage( String imageName )
176
   {
177
      try
178
      {
179
         ClassLoader classloader = getClass().getClassLoader();
180
         java.net.URL url = classloader.getResource( imageName );
181
         if ( url != null )
182
         {
183
            ImageIcon icon = new ImageIcon( url );
184
            return icon;
185
         }
186
      }
187
      catch( Exception e )
188
      {
189
         e.printStackTrace();
190
      }
191
      throw new IllegalArgumentException( "Unable to load image: " + imageName );
192
   }
193

    
194
   /**
195
    * Method for recalculating the component orientation for 
196
    * right-to-left Locales.
197
    * @param orientation the component orientation to be applied
198
    */
199
   public void applyComponentOrientation( ComponentOrientation orientation )
200
   {
201
      // Not yet implemented...
202
      // I18NUtils.applyComponentOrientation(this, orientation);
203
      super.applyComponentOrientation(orientation);
204
   }
205

    
206
   public JPanel createPanel()
207
   {
208
      JPanel jpanel1 = new JPanel();
209
      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");
210
      CellConstraints cc = new CellConstraints();
211
      jpanel1.setLayout(formlayout1);
212

    
213
      lblFieldName.setName("lblFieldName");
214
      lblFieldName.setText("_Field_name");
215
      jpanel1.add(lblFieldName,cc.xy(2,2));
216

    
217
      txtFieldName.setName("txtFieldName");
218
      jpanel1.add(txtFieldName,cc.xy(4,2));
219

    
220
      lblFieldType.setName("lblFieldType");
221
      lblFieldType.setText("_Field_type");
222
      jpanel1.add(lblFieldType,cc.xy(2,4));
223

    
224
      tabAditionalFields.setName("tabAditionalFields");
225
      tabAditionalFields.addTab("_Basic_fields",null,createPanel1());
226
      tabAditionalFields.addTab("_Geometry",null,createPanel3());
227
      tabAditionalFields.addTab("_Time",null,createPanel5());
228
      tabAditionalFields.addTab("_Tags",null,createPanel7());
229
      tabAditionalFields.addTab("_ForeingKey",null,createPanel10());
230
      tabAditionalFields.addTab("_Visualization",null,createPanel11());
231
      jpanel1.add(tabAditionalFields,cc.xywh(2,8,3,1));
232

    
233
      jpanel1.add(createPanel17(),cc.xy(4,6));
234
      jpanel1.add(createPanel18(),cc.xy(4,4));
235
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9 });
236
      return jpanel1;
237
   }
238

    
239
   public JPanel createPanel1()
240
   {
241
      JPanel jpanel1 = new JPanel();
242
      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,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
243
      CellConstraints cc = new CellConstraints();
244
      jpanel1.setLayout(formlayout1);
245

    
246
      lblSize.setName("lblSize");
247
      lblSize.setText("_Size");
248
      jpanel1.add(lblSize,cc.xy(2,4));
249

    
250
      txtSize.setName("txtSize");
251
      jpanel1.add(txtSize,cc.xy(4,4));
252

    
253
      lblPrecision.setName("lblPrecision");
254
      lblPrecision.setText("_Total_digits_precision");
255
      lblPrecision.setToolTipText("_Number_of_digits_used_to_represent_the_number_Includes_the_digits_of_the_integer_part_and_the_digits_of_the_decimal_part");
256
      jpanel1.add(lblPrecision,cc.xy(2,6));
257

    
258
      lblDefaultValue.setName("lblDefaultValue");
259
      lblDefaultValue.setText("_Default_value");
260
      jpanel1.add(lblDefaultValue,cc.xy(2,10));
261

    
262
      txtPrecision.setName("txtPrecision");
263
      txtPrecision.setToolTipText("_Number_of_digits_used_to_represent_the_number_Includes_the_digits_of_the_integer_part_and_the_digits_of_the_decimal_part");
264
      jpanel1.add(txtPrecision,cc.xy(4,6));
265

    
266
      txtDefaultValue.setName("txtDefaultValue");
267
      jpanel1.add(txtDefaultValue,cc.xy(4,10));
268

    
269
      lblDataProfile.setName("lblDataProfile");
270
      lblDataProfile.setText("_Data_profile");
271
      jpanel1.add(lblDataProfile,cc.xy(2,12));
272

    
273
      cboDataProfile.setName("cboDataProfile");
274
      jpanel1.add(cboDataProfile,cc.xy(4,12));
275

    
276
      chkVirtualField.setActionCommand("Campo virtual");
277
      chkVirtualField.setName("chkVirtualField");
278
      chkVirtualField.setText("_Virtual_field");
279
      jpanel1.add(chkVirtualField,cc.xy(2,14));
280

    
281
      jpanel1.add(createPanel2(),cc.xy(4,14));
282
      lblScale.setName("lblScale");
283
      lblScale.setText("_Decimal_digits_escale");
284
      lblScale.setToolTipText("_Number_of_decimal_digits_used_to_represent_the_number");
285
      jpanel1.add(lblScale,cc.xy(2,8));
286

    
287
      txtScale.setName("txtScale");
288
      txtScale.setToolTipText("_Number_of_decimal_digits_used_to_represent_the_number");
289
      jpanel1.add(txtScale,cc.xy(4,8));
290

    
291
      lblRelationType.setName("lblRelationType");
292
      lblRelationType.setText("_Relation_type");
293
      jpanel1.add(lblRelationType,cc.xy(2,16));
294

    
295
      cboRelationType.setName("cboRelationType");
296
      jpanel1.add(cboRelationType,cc.xy(4,16));
297

    
298
      lblDisplaySize.setName("lblDisplaySize");
299
      lblDisplaySize.setText("_Required_bytes");
300
      lblDisplaySize.setToolTipText("_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer");
301
      jpanel1.add(lblDisplaySize,cc.xy(2,2));
302

    
303
      txtDisplaySize.setName("txtDisplaySize");
304
      txtDisplaySize.setToolTipText("_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer");
305
      jpanel1.add(txtDisplaySize,cc.xy(4,2));
306

    
307
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 });
308
      return jpanel1;
309
   }
310

    
311
   public JPanel createPanel2()
312
   {
313
      JPanel jpanel1 = new JPanel();
314
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
315
      CellConstraints cc = new CellConstraints();
316
      jpanel1.setLayout(formlayout1);
317

    
318
      btnVirtualField.setActionCommand("...");
319
      btnVirtualField.setName("btnVirtualField");
320
      btnVirtualField.setText("...");
321
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
322
      btnVirtualField.setBorder(emptyborder1);
323
      jpanel1.add(btnVirtualField,cc.xy(3,1));
324

    
325
      txtVirtualField.setName("txtVirtualField");
326
      jpanel1.add(txtVirtualField,cc.xy(1,1));
327

    
328
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
329
      return jpanel1;
330
   }
331

    
332
   public JPanel createPanel3()
333
   {
334
      JPanel jpanel1 = new JPanel();
335
      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");
336
      CellConstraints cc = new CellConstraints();
337
      jpanel1.setLayout(formlayout1);
338

    
339
      lblGeometryType.setName("lblGeometryType");
340
      lblGeometryType.setText("_Geometry_type");
341
      jpanel1.add(lblGeometryType,cc.xy(2,2));
342

    
343
      lblGeometrySubtype.setName("lblGeometrySubtype");
344
      lblGeometrySubtype.setText("_Geometry_subtype");
345
      jpanel1.add(lblGeometrySubtype,cc.xy(2,4));
346

    
347
      lblCRS.setName("lblCRS");
348
      lblCRS.setText("_CRS");
349
      jpanel1.add(lblCRS,cc.xy(2,6));
350

    
351
      cboGeometryType.setName("cboGeometryType");
352
      jpanel1.add(cboGeometryType,cc.xy(4,2));
353

    
354
      cboGeometrySubtype.setName("cboGeometrySubtype");
355
      jpanel1.add(cboGeometrySubtype,cc.xy(4,4));
356

    
357
      jpanel1.add(createPanel4(),cc.xy(4,6));
358
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
359
      return jpanel1;
360
   }
361

    
362
   public JPanel createPanel4()
363
   {
364
      JPanel jpanel1 = new JPanel();
365
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
366
      CellConstraints cc = new CellConstraints();
367
      jpanel1.setLayout(formlayout1);
368

    
369
      btnCRS.setActionCommand("...");
370
      btnCRS.setName("btnCRS");
371
      btnCRS.setText("...");
372
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
373
      btnCRS.setBorder(emptyborder1);
374
      jpanel1.add(btnCRS,cc.xy(3,1));
375

    
376
      txtCRS.setName("txtCRS");
377
      jpanel1.add(txtCRS,cc.xy(1,1));
378

    
379
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
380
      return jpanel1;
381
   }
382

    
383
   public JPanel createPanel5()
384
   {
385
      JPanel jpanel1 = new JPanel();
386
      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");
387
      CellConstraints cc = new CellConstraints();
388
      jpanel1.setLayout(formlayout1);
389

    
390
      lblDateFormat.setName("lblDateFormat");
391
      lblDateFormat.setText("_Date_format");
392
      jpanel1.add(lblDateFormat,cc.xy(2,2));
393

    
394
      cboDateFormat.setEditable(true);
395
      cboDateFormat.setName("cboDateFormat");
396
      cboDateFormat.setRequestFocusEnabled(false);
397
      jpanel1.add(cboDateFormat,cc.xy(4,2));
398

    
399
      lblInterval.setName("lblInterval");
400
      lblInterval.setText("_Interval");
401
      jpanel1.add(lblInterval,new CellConstraints(2,5,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
402

    
403
      jpanel1.add(createPanel6(),cc.xy(4,5));
404
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6 });
405
      return jpanel1;
406
   }
407

    
408
   public JPanel createPanel6()
409
   {
410
      JPanel jpanel1 = new JPanel();
411
      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");
412
      CellConstraints cc = new CellConstraints();
413
      jpanel1.setLayout(formlayout1);
414

    
415
      lblIntervalStart.setName("lblIntervalStart");
416
      lblIntervalStart.setText("_Start");
417
      jpanel1.add(lblIntervalStart,cc.xy(1,1));
418

    
419
      lblIntervalEnd.setName("lblIntervalEnd");
420
      lblIntervalEnd.setText("_End");
421
      jpanel1.add(lblIntervalEnd,cc.xy(1,3));
422

    
423
      txtIntervalStart.setName("txtIntervalStart");
424
      jpanel1.add(txtIntervalStart,cc.xy(3,1));
425

    
426
      btnIntervalStart.setActionCommand("...");
427
      btnIntervalStart.setName("btnIntervalStart");
428
      btnIntervalStart.setText("...");
429
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
430
      btnIntervalStart.setBorder(emptyborder1);
431
      jpanel1.add(btnIntervalStart,cc.xy(5,1));
432

    
433
      btnIntervalEnd.setActionCommand("...");
434
      btnIntervalEnd.setName("btnIntervalEnd");
435
      btnIntervalEnd.setText("...");
436
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
437
      btnIntervalEnd.setBorder(emptyborder2);
438
      jpanel1.add(btnIntervalEnd,cc.xy(5,3));
439

    
440
      txtIntervalEnd.setName("txtIntervalEnd");
441
      jpanel1.add(txtIntervalEnd,cc.xy(3,3));
442

    
443
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2 });
444
      return jpanel1;
445
   }
446

    
447
   public JPanel createPanel7()
448
   {
449
      JPanel jpanel1 = new JPanel();
450
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)");
451
      CellConstraints cc = new CellConstraints();
452
      jpanel1.setLayout(formlayout1);
453

    
454
      jpanel1.add(createPanel8(),cc.xy(1,1));
455
      addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 });
456
      return jpanel1;
457
   }
458

    
459
   public JPanel createPanel8()
460
   {
461
      JPanel jpanel1 = new JPanel();
462
      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");
463
      CellConstraints cc = new CellConstraints();
464
      jpanel1.setLayout(formlayout1);
465

    
466
      lblTagsName.setName("lblTagsName");
467
      lblTagsName.setText("_Name");
468
      jpanel1.add(lblTagsName,cc.xy(2,3));
469

    
470
      lblTagsValue.setName("lblTagsValue");
471
      lblTagsValue.setText("_Value");
472
      jpanel1.add(lblTagsValue,cc.xy(2,5));
473

    
474
      cboTagsName.setEditable(true);
475
      cboTagsName.setName("cboTagsName");
476
      cboTagsName.setRequestFocusEnabled(false);
477
      jpanel1.add(cboTagsName,cc.xy(4,3));
478

    
479
      tblTags.setName("tblTags");
480
      JScrollPane jscrollpane1 = new JScrollPane();
481
      jscrollpane1.setViewportView(tblTags);
482
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
483
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
484
      jpanel1.add(jscrollpane1,cc.xywh(2,1,3,1));
485

    
486
      lblTagsDescription.setName("lblTagsDescription");
487
      jpanel1.add(lblTagsDescription,cc.xy(4,6));
488

    
489
      jpanel1.add(createPanel9(),cc.xywh(6,1,1,5));
490
      cboTagsValue.setEditable(true);
491
      cboTagsValue.setName("cboTagsValue");
492
      cboTagsValue.setRequestFocusEnabled(false);
493
      jpanel1.add(cboTagsValue,cc.xy(4,5));
494

    
495
      addFillComponents(jpanel1,new int[]{ 1,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6 });
496
      return jpanel1;
497
   }
498

    
499
   public JPanel createPanel9()
500
   {
501
      JPanel jpanel1 = new JPanel();
502
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
503
      CellConstraints cc = new CellConstraints();
504
      jpanel1.setLayout(formlayout1);
505

    
506
      btnTagsAdd.setActionCommand("_Add");
507
      btnTagsAdd.setName("btnTagsAdd");
508
      btnTagsAdd.setText("_Add");
509
      jpanel1.add(btnTagsAdd,cc.xy(1,1));
510

    
511
      btnTagsUpdate.setActionCommand("_Update");
512
      btnTagsUpdate.setName("btnTagsUpdate");
513
      btnTagsUpdate.setText("_Update");
514
      jpanel1.add(btnTagsUpdate,cc.xy(1,3));
515

    
516
      btnTagsRemove.setActionCommand("_Remove");
517
      btnTagsRemove.setName("btnTagsRemove");
518
      btnTagsRemove.setText("_Remove");
519
      jpanel1.add(btnTagsRemove,cc.xy(1,5));
520

    
521
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4 });
522
      return jpanel1;
523
   }
524

    
525
   public JPanel createPanel10()
526
   {
527
      JPanel jpanel1 = new JPanel();
528
      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");
529
      CellConstraints cc = new CellConstraints();
530
      jpanel1.setLayout(formlayout1);
531

    
532
      chkIsForeingKey.setActionCommand("_is_foreing_key");
533
      chkIsForeingKey.setName("chkIsForeingKey");
534
      chkIsForeingKey.setText("_is_foreing_key");
535
      jpanel1.add(chkIsForeingKey,cc.xywh(2,2,3,1));
536

    
537
      lblForeingKeyTableName.setName("lblForeingKeyTableName");
538
      lblForeingKeyTableName.setText("_Table");
539
      jpanel1.add(lblForeingKeyTableName,cc.xy(2,6));
540

    
541
      lblForeingKeyCodeName.setName("lblForeingKeyCodeName");
542
      lblForeingKeyCodeName.setText("_Code");
543
      jpanel1.add(lblForeingKeyCodeName,cc.xy(2,8));
544

    
545
      lblForeingKeyLabelFormula.setName("lblForeingKeyLabelFormula");
546
      lblForeingKeyLabelFormula.setText("_Label_formula");
547
      jpanel1.add(lblForeingKeyLabelFormula,cc.xy(2,10));
548

    
549
      cboForeingKeyTableName.setEditable(true);
550
      cboForeingKeyTableName.setName("cboForeingKeyTableName");
551
      cboForeingKeyTableName.setRequestFocusEnabled(false);
552
      jpanel1.add(cboForeingKeyTableName,cc.xywh(4,6,3,1));
553

    
554
      cboForeingKeyCodeName.setEditable(true);
555
      cboForeingKeyCodeName.setName("cboForeingKeyCodeName");
556
      cboForeingKeyCodeName.setRequestFocusEnabled(false);
557
      jpanel1.add(cboForeingKeyCodeName,cc.xywh(4,8,3,1));
558

    
559
      txtForeingKeyFormula.setName("txtForeingKeyFormula");
560
      jpanel1.add(txtForeingKeyFormula,cc.xy(4,10));
561

    
562
      btnForeingKeyFormula.setActionCommand("...");
563
      btnForeingKeyFormula.setName("btnForeingKeyFormula");
564
      btnForeingKeyFormula.setText("...");
565
      jpanel1.add(btnForeingKeyFormula,cc.xy(6,10));
566

    
567
      lblIsClosedList.setName("lblIsClosedList");
568
      lblIsClosedList.setText("_is_closed_list");
569
      jpanel1.add(lblIsClosedList,cc.xy(2,4));
570

    
571
      chkIsClosedList.setName("chkIsClosedList");
572
      jpanel1.add(chkIsClosedList,cc.xy(4,4));
573

    
574
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 });
575
      return jpanel1;
576
   }
577

    
578
   public JPanel createPanel11()
579
   {
580
      JPanel jpanel1 = new JPanel();
581
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)");
582
      CellConstraints cc = new CellConstraints();
583
      jpanel1.setLayout(formlayout1);
584

    
585
      tabLayout.setName("tabLayout");
586
      tabLayout.setTabPlacement(JTabbedPane.LEFT);
587
      tabLayout.addTab("_Basic",null,createPanel12());
588
      tabLayout.addTab("_Values",null,createPanel13());
589
      jpanel1.add(tabLayout,cc.xy(1,1));
590

    
591
      addFillComponents(jpanel1,new int[0],new int[0]);
592
      return jpanel1;
593
   }
594

    
595
   public JPanel createPanel12()
596
   {
597
      JPanel jpanel1 = new JPanel();
598
      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)");
599
      CellConstraints cc = new CellConstraints();
600
      jpanel1.setLayout(formlayout1);
601

    
602
      lblGroup.setName("lblGroup");
603
      lblGroup.setText("_Group");
604
      jpanel1.add(lblGroup,cc.xy(2,2));
605

    
606
      lblOrder.setName("lblOrder");
607
      lblOrder.setText("_Order");
608
      jpanel1.add(lblOrder,cc.xy(2,4));
609

    
610
      cboGroup.setEditable(true);
611
      cboGroup.setName("cboGroup");
612
      cboGroup.setRequestFocusEnabled(false);
613
      jpanel1.add(cboGroup,cc.xy(4,2));
614

    
615
      txtOrder.setName("txtOrder");
616
      jpanel1.add(txtOrder,cc.xy(4,4));
617

    
618
      lblHidden.setName("lblHidden");
619
      lblHidden.setText("_Hidden");
620
      jpanel1.add(lblHidden,cc.xy(2,6));
621

    
622
      chkHidden.setName("chkHidden");
623
      jpanel1.add(chkHidden,cc.xy(4,6));
624

    
625
      lblLabel.setName("lblLabel");
626
      lblLabel.setText("_Label");
627
      jpanel1.add(lblLabel,cc.xy(2,8));
628

    
629
      txtLabel.setName("txtLabel");
630
      jpanel1.add(txtLabel,cc.xy(4,8));
631

    
632
      lblDescription.setName("lblDescription");
633
      lblDescription.setText("_Description");
634
      lblDescription.setVerticalAlignment(JLabel.TOP);
635
      jpanel1.add(lblDescription,new CellConstraints(2,10,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
636

    
637
      txtDescription.setName("txtDescription");
638
      JScrollPane jscrollpane1 = new JScrollPane();
639
      jscrollpane1.setViewportView(txtDescription);
640
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
641
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
642
      jpanel1.add(jscrollpane1,cc.xy(4,10));
643

    
644
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10 });
645
      return jpanel1;
646
   }
647

    
648
   public JPanel createPanel13()
649
   {
650
      JPanel jpanel1 = new JPanel();
651
      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");
652
      CellConstraints cc = new CellConstraints();
653
      jpanel1.setLayout(formlayout1);
654

    
655
      lblMinValue.setName("lblMinValue");
656
      lblMinValue.setText("_Minimum_value");
657
      jpanel1.add(lblMinValue,cc.xy(2,2));
658

    
659
      txtMinValue.setName("txtMinValue");
660
      jpanel1.add(txtMinValue,cc.xy(4,2));
661

    
662
      lblMaxValue.setName("lblMaxValue");
663
      lblMaxValue.setText("_Maximum_value");
664
      jpanel1.add(lblMaxValue,cc.xy(2,4));
665

    
666
      txtMaxValue.setName("txtMaxValue");
667
      jpanel1.add(txtMaxValue,cc.xy(4,4));
668

    
669
      lblAvailableValues.setName("lblAvailableValues");
670
      lblAvailableValues.setText("_List_of_values");
671
      jpanel1.add(lblAvailableValues,cc.xywh(2,6,3,1));
672

    
673
      jpanel1.add(createPanel14(),cc.xywh(2,7,3,1));
674
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
675
      return jpanel1;
676
   }
677

    
678
   public JPanel createPanel14()
679
   {
680
      JPanel jpanel1 = new JPanel();
681
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
682
      CellConstraints cc = new CellConstraints();
683
      jpanel1.setLayout(formlayout1);
684

    
685
      jpanel1.add(createPanel15(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
686
      jpanel1.add(createPanel16(),cc.xy(1,1));
687
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1 });
688
      return jpanel1;
689
   }
690

    
691
   public JPanel createPanel15()
692
   {
693
      JPanel jpanel1 = new JPanel();
694
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:2DLU:NONE");
695
      CellConstraints cc = new CellConstraints();
696
      jpanel1.setLayout(formlayout1);
697

    
698
      btnAvailableValuesAdd.setActionCommand("_Add");
699
      btnAvailableValuesAdd.setName("btnAvailableValuesAdd");
700
      btnAvailableValuesAdd.setText("_Add");
701
      jpanel1.add(btnAvailableValuesAdd,cc.xy(1,1));
702

    
703
      btnAvailableValuesUpdate.setActionCommand("_Update");
704
      btnAvailableValuesUpdate.setName("btnAvailableValuesUpdate");
705
      btnAvailableValuesUpdate.setText("_Update");
706
      jpanel1.add(btnAvailableValuesUpdate,cc.xy(1,3));
707

    
708
      btnAvailableValuesRemove.setActionCommand("_Remove");
709
      btnAvailableValuesRemove.setName("btnAvailableValuesRemove");
710
      btnAvailableValuesRemove.setText("_Remove");
711
      jpanel1.add(btnAvailableValuesRemove,cc.xy(1,5));
712

    
713
      btnAvailableValuesRemoveAll.setActionCommand("_Remove");
714
      btnAvailableValuesRemoveAll.setName("btnAvailableValuesRemoveAll");
715
      btnAvailableValuesRemoveAll.setText("_Remove_all");
716
      jpanel1.add(btnAvailableValuesRemoveAll,cc.xy(1,7));
717

    
718
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4,6,8 });
719
      return jpanel1;
720
   }
721

    
722
   public JPanel createPanel16()
723
   {
724
      JPanel jpanel1 = new JPanel();
725
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
726
      CellConstraints cc = new CellConstraints();
727
      jpanel1.setLayout(formlayout1);
728

    
729
      lblAvailableValuesLabel.setName("lblAvailableValuesLabel");
730
      lblAvailableValuesLabel.setText("_Label");
731
      jpanel1.add(lblAvailableValuesLabel,cc.xy(1,3));
732

    
733
      lblAvailableValuesValue.setName("lblAvailableValuesValue");
734
      lblAvailableValuesValue.setText("_Value");
735
      jpanel1.add(lblAvailableValuesValue,cc.xy(1,5));
736

    
737
      txtAvailableValuesLabel.setName("txtAvailableValuesLabel");
738
      jpanel1.add(txtAvailableValuesLabel,cc.xy(3,3));
739

    
740
      txtAvailableValuesValue.setName("txtAvailableValuesValue");
741
      jpanel1.add(txtAvailableValuesValue,cc.xy(3,5));
742

    
743
      lstAvailableValues.setName("lstAvailableValues");
744
      JScrollPane jscrollpane1 = new JScrollPane();
745
      jscrollpane1.setViewportView(lstAvailableValues);
746
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
747
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
748
      jpanel1.add(jscrollpane1,cc.xywh(1,1,3,1));
749

    
750
      addFillComponents(jpanel1,new int[]{ 2,3 },new int[]{ 2,4,6 });
751
      return jpanel1;
752
   }
753

    
754
   public JPanel createPanel17()
755
   {
756
      JPanel jpanel1 = new JPanel();
757
      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");
758
      CellConstraints cc = new CellConstraints();
759
      jpanel1.setLayout(formlayout1);
760

    
761
      lblIsPrimaryKey.setName("lblIsPrimaryKey");
762
      lblIsPrimaryKey.setText("_Primary_key");
763
      jpanel1.add(lblIsPrimaryKey,cc.xy(1,1));
764

    
765
      chkIsPrimaryKey.setName("chkIsPrimaryKey");
766
      jpanel1.add(chkIsPrimaryKey,cc.xy(3,1));
767

    
768
      lblIsAutomatic.setName("lblIsAutomatic");
769
      lblIsAutomatic.setText("_Value_automatic");
770
      jpanel1.add(lblIsAutomatic,cc.xy(5,1));
771

    
772
      chkIsAutomatic.setName("chkIsAutomatic");
773
      jpanel1.add(chkIsAutomatic,cc.xy(7,1));
774

    
775
      lblAllowNulls.setName("lblAllowNulls");
776
      lblAllowNulls.setText("_Allow_nulls");
777
      jpanel1.add(lblAllowNulls,cc.xy(9,1));
778

    
779
      chkAllowNulls.setName("chkAllowNulls");
780
      jpanel1.add(chkAllowNulls,cc.xy(11,1));
781

    
782
      addFillComponents(jpanel1,new int[]{ 2,4,6,8,10,12 },new int[0]);
783
      return jpanel1;
784
   }
785

    
786
   public JPanel createPanel18()
787
   {
788
      JPanel jpanel1 = new JPanel();
789
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
790
      CellConstraints cc = new CellConstraints();
791
      jpanel1.setLayout(formlayout1);
792

    
793
      cboFieldType.setName("cboFieldType");
794
      jpanel1.add(cboFieldType,cc.xy(1,1));
795

    
796
      btnFieldType.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/featuretype/picker-datatype.png"));
797
      btnFieldType.setName("btnFieldType");
798
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
799
      btnFieldType.setBorder(emptyborder1);
800
      jpanel1.add(btnFieldType,cc.xy(3,1));
801

    
802
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
803
      return jpanel1;
804
   }
805

    
806
   /**
807
    * Initializer
808
    */
809
   protected void initializePanel()
810
   {
811
      setLayout(new BorderLayout());
812
      add(createPanel(), BorderLayout.CENTER);
813
   }
814

    
815

    
816
}