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 @ 44844

History | View | Annotate | Download (31 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 lblRequiredBytes = new JLabel();
49
   JTextField txtRequiredBytes = 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("_Precision");
255
      jpanel1.add(lblPrecision,cc.xy(2,6));
256

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

    
261
      txtPrecision.setName("txtPrecision");
262
      jpanel1.add(txtPrecision,cc.xy(4,6));
263

    
264
      txtDefaultValue.setName("txtDefaultValue");
265
      jpanel1.add(txtDefaultValue,cc.xy(4,10));
266

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

    
271
      cboDataProfile.setName("cboDataProfile");
272
      jpanel1.add(cboDataProfile,cc.xy(4,12));
273

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

    
279
      jpanel1.add(createPanel2(),cc.xy(4,14));
280
      lblScale.setName("lblScale");
281
      lblScale.setText("_Scale");
282
      jpanel1.add(lblScale,cc.xy(2,8));
283

    
284
      txtScale.setName("txtScale");
285
      jpanel1.add(txtScale,cc.xy(4,8));
286

    
287
      lblRelationType.setName("lblRelationType");
288
      lblRelationType.setText("_Relation_type");
289
      jpanel1.add(lblRelationType,cc.xy(2,16));
290

    
291
      cboRelationType.setName("cboRelationType");
292
      jpanel1.add(cboRelationType,cc.xy(4,16));
293

    
294
      lblRequiredBytes.setName("lblRequiredBytes");
295
      lblRequiredBytes.setText("_required_bytes");
296
      jpanel1.add(lblRequiredBytes,cc.xy(2,2));
297

    
298
      txtRequiredBytes.setName("txtRequiredBytes");
299
      jpanel1.add(txtRequiredBytes,cc.xy(4,2));
300

    
301
      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 });
302
      return jpanel1;
303
   }
304

    
305
   public JPanel createPanel2()
306
   {
307
      JPanel jpanel1 = new JPanel();
308
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
309
      CellConstraints cc = new CellConstraints();
310
      jpanel1.setLayout(formlayout1);
311

    
312
      btnVirtualField.setActionCommand("...");
313
      btnVirtualField.setName("btnVirtualField");
314
      btnVirtualField.setText("...");
315
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
316
      btnVirtualField.setBorder(emptyborder1);
317
      jpanel1.add(btnVirtualField,cc.xy(3,1));
318

    
319
      txtVirtualField.setName("txtVirtualField");
320
      jpanel1.add(txtVirtualField,cc.xy(1,1));
321

    
322
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
323
      return jpanel1;
324
   }
325

    
326
   public JPanel createPanel3()
327
   {
328
      JPanel jpanel1 = new JPanel();
329
      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");
330
      CellConstraints cc = new CellConstraints();
331
      jpanel1.setLayout(formlayout1);
332

    
333
      lblGeometryType.setName("lblGeometryType");
334
      lblGeometryType.setText("_Geometry_type");
335
      jpanel1.add(lblGeometryType,cc.xy(2,2));
336

    
337
      lblGeometrySubtype.setName("lblGeometrySubtype");
338
      lblGeometrySubtype.setText("_Geometry_subtype");
339
      jpanel1.add(lblGeometrySubtype,cc.xy(2,4));
340

    
341
      lblCRS.setName("lblCRS");
342
      lblCRS.setText("_CRS");
343
      jpanel1.add(lblCRS,cc.xy(2,6));
344

    
345
      cboGeometryType.setName("cboGeometryType");
346
      jpanel1.add(cboGeometryType,cc.xy(4,2));
347

    
348
      cboGeometrySubtype.setName("cboGeometrySubtype");
349
      jpanel1.add(cboGeometrySubtype,cc.xy(4,4));
350

    
351
      jpanel1.add(createPanel4(),cc.xy(4,6));
352
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
353
      return jpanel1;
354
   }
355

    
356
   public JPanel createPanel4()
357
   {
358
      JPanel jpanel1 = new JPanel();
359
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
360
      CellConstraints cc = new CellConstraints();
361
      jpanel1.setLayout(formlayout1);
362

    
363
      btnCRS.setActionCommand("...");
364
      btnCRS.setName("btnCRS");
365
      btnCRS.setText("...");
366
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
367
      btnCRS.setBorder(emptyborder1);
368
      jpanel1.add(btnCRS,cc.xy(3,1));
369

    
370
      txtCRS.setName("txtCRS");
371
      jpanel1.add(txtCRS,cc.xy(1,1));
372

    
373
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
374
      return jpanel1;
375
   }
376

    
377
   public JPanel createPanel5()
378
   {
379
      JPanel jpanel1 = new JPanel();
380
      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");
381
      CellConstraints cc = new CellConstraints();
382
      jpanel1.setLayout(formlayout1);
383

    
384
      lblDateFormat.setName("lblDateFormat");
385
      lblDateFormat.setText("_Date_format");
386
      jpanel1.add(lblDateFormat,cc.xy(2,2));
387

    
388
      cboDateFormat.setEditable(true);
389
      cboDateFormat.setName("cboDateFormat");
390
      cboDateFormat.setRequestFocusEnabled(false);
391
      jpanel1.add(cboDateFormat,cc.xy(4,2));
392

    
393
      lblInterval.setName("lblInterval");
394
      lblInterval.setText("_Interval");
395
      jpanel1.add(lblInterval,new CellConstraints(2,5,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
396

    
397
      jpanel1.add(createPanel6(),cc.xy(4,5));
398
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6 });
399
      return jpanel1;
400
   }
401

    
402
   public JPanel createPanel6()
403
   {
404
      JPanel jpanel1 = new JPanel();
405
      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");
406
      CellConstraints cc = new CellConstraints();
407
      jpanel1.setLayout(formlayout1);
408

    
409
      lblIntervalStart.setName("lblIntervalStart");
410
      lblIntervalStart.setText("_Start");
411
      jpanel1.add(lblIntervalStart,cc.xy(1,1));
412

    
413
      lblIntervalEnd.setName("lblIntervalEnd");
414
      lblIntervalEnd.setText("_End");
415
      jpanel1.add(lblIntervalEnd,cc.xy(1,3));
416

    
417
      txtIntervalStart.setName("txtIntervalStart");
418
      jpanel1.add(txtIntervalStart,cc.xy(3,1));
419

    
420
      btnIntervalStart.setActionCommand("...");
421
      btnIntervalStart.setName("btnIntervalStart");
422
      btnIntervalStart.setText("...");
423
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
424
      btnIntervalStart.setBorder(emptyborder1);
425
      jpanel1.add(btnIntervalStart,cc.xy(5,1));
426

    
427
      btnIntervalEnd.setActionCommand("...");
428
      btnIntervalEnd.setName("btnIntervalEnd");
429
      btnIntervalEnd.setText("...");
430
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
431
      btnIntervalEnd.setBorder(emptyborder2);
432
      jpanel1.add(btnIntervalEnd,cc.xy(5,3));
433

    
434
      txtIntervalEnd.setName("txtIntervalEnd");
435
      jpanel1.add(txtIntervalEnd,cc.xy(3,3));
436

    
437
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2 });
438
      return jpanel1;
439
   }
440

    
441
   public JPanel createPanel7()
442
   {
443
      JPanel jpanel1 = new JPanel();
444
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)");
445
      CellConstraints cc = new CellConstraints();
446
      jpanel1.setLayout(formlayout1);
447

    
448
      jpanel1.add(createPanel8(),cc.xy(1,1));
449
      addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 });
450
      return jpanel1;
451
   }
452

    
453
   public JPanel createPanel8()
454
   {
455
      JPanel jpanel1 = new JPanel();
456
      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");
457
      CellConstraints cc = new CellConstraints();
458
      jpanel1.setLayout(formlayout1);
459

    
460
      lblTagsName.setName("lblTagsName");
461
      lblTagsName.setText("_Name");
462
      jpanel1.add(lblTagsName,cc.xy(2,3));
463

    
464
      lblTagsValue.setName("lblTagsValue");
465
      lblTagsValue.setText("_Value");
466
      jpanel1.add(lblTagsValue,cc.xy(2,5));
467

    
468
      cboTagsName.setEditable(true);
469
      cboTagsName.setName("cboTagsName");
470
      cboTagsName.setRequestFocusEnabled(false);
471
      jpanel1.add(cboTagsName,cc.xy(4,3));
472

    
473
      tblTags.setName("tblTags");
474
      JScrollPane jscrollpane1 = new JScrollPane();
475
      jscrollpane1.setViewportView(tblTags);
476
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
477
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
478
      jpanel1.add(jscrollpane1,cc.xywh(2,1,3,1));
479

    
480
      lblTagsDescription.setName("lblTagsDescription");
481
      jpanel1.add(lblTagsDescription,cc.xy(4,6));
482

    
483
      jpanel1.add(createPanel9(),cc.xywh(6,1,1,5));
484
      cboTagsValue.setEditable(true);
485
      cboTagsValue.setName("cboTagsValue");
486
      cboTagsValue.setRequestFocusEnabled(false);
487
      jpanel1.add(cboTagsValue,cc.xy(4,5));
488

    
489
      addFillComponents(jpanel1,new int[]{ 1,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6 });
490
      return jpanel1;
491
   }
492

    
493
   public JPanel createPanel9()
494
   {
495
      JPanel jpanel1 = new JPanel();
496
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
497
      CellConstraints cc = new CellConstraints();
498
      jpanel1.setLayout(formlayout1);
499

    
500
      btnTagsAdd.setActionCommand("_Add");
501
      btnTagsAdd.setName("btnTagsAdd");
502
      btnTagsAdd.setText("_Add");
503
      jpanel1.add(btnTagsAdd,cc.xy(1,1));
504

    
505
      btnTagsUpdate.setActionCommand("_Update");
506
      btnTagsUpdate.setName("btnTagsUpdate");
507
      btnTagsUpdate.setText("_Update");
508
      jpanel1.add(btnTagsUpdate,cc.xy(1,3));
509

    
510
      btnTagsRemove.setActionCommand("_Remove");
511
      btnTagsRemove.setName("btnTagsRemove");
512
      btnTagsRemove.setText("_Remove");
513
      jpanel1.add(btnTagsRemove,cc.xy(1,5));
514

    
515
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4 });
516
      return jpanel1;
517
   }
518

    
519
   public JPanel createPanel10()
520
   {
521
      JPanel jpanel1 = new JPanel();
522
      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");
523
      CellConstraints cc = new CellConstraints();
524
      jpanel1.setLayout(formlayout1);
525

    
526
      chkIsForeingKey.setActionCommand("_is_foreing_key");
527
      chkIsForeingKey.setName("chkIsForeingKey");
528
      chkIsForeingKey.setText("_is_foreing_key");
529
      jpanel1.add(chkIsForeingKey,cc.xywh(2,2,3,1));
530

    
531
      lblForeingKeyTableName.setName("lblForeingKeyTableName");
532
      lblForeingKeyTableName.setText("_Table");
533
      jpanel1.add(lblForeingKeyTableName,cc.xy(2,6));
534

    
535
      lblForeingKeyCodeName.setName("lblForeingKeyCodeName");
536
      lblForeingKeyCodeName.setText("_Code");
537
      jpanel1.add(lblForeingKeyCodeName,cc.xy(2,8));
538

    
539
      lblForeingKeyLabelFormula.setName("lblForeingKeyLabelFormula");
540
      lblForeingKeyLabelFormula.setText("_Label_formula");
541
      jpanel1.add(lblForeingKeyLabelFormula,cc.xy(2,10));
542

    
543
      cboForeingKeyTableName.setEditable(true);
544
      cboForeingKeyTableName.setName("cboForeingKeyTableName");
545
      cboForeingKeyTableName.setRequestFocusEnabled(false);
546
      jpanel1.add(cboForeingKeyTableName,cc.xywh(4,6,3,1));
547

    
548
      cboForeingKeyCodeName.setEditable(true);
549
      cboForeingKeyCodeName.setName("cboForeingKeyCodeName");
550
      cboForeingKeyCodeName.setRequestFocusEnabled(false);
551
      jpanel1.add(cboForeingKeyCodeName,cc.xywh(4,8,3,1));
552

    
553
      txtForeingKeyFormula.setName("txtForeingKeyFormula");
554
      jpanel1.add(txtForeingKeyFormula,cc.xy(4,10));
555

    
556
      btnForeingKeyFormula.setActionCommand("...");
557
      btnForeingKeyFormula.setName("btnForeingKeyFormula");
558
      btnForeingKeyFormula.setText("...");
559
      jpanel1.add(btnForeingKeyFormula,cc.xy(6,10));
560

    
561
      lblIsClosedList.setName("lblIsClosedList");
562
      lblIsClosedList.setText("_is_closed_list");
563
      jpanel1.add(lblIsClosedList,cc.xy(2,4));
564

    
565
      chkIsClosedList.setName("chkIsClosedList");
566
      jpanel1.add(chkIsClosedList,cc.xy(4,4));
567

    
568
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 });
569
      return jpanel1;
570
   }
571

    
572
   public JPanel createPanel11()
573
   {
574
      JPanel jpanel1 = new JPanel();
575
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)");
576
      CellConstraints cc = new CellConstraints();
577
      jpanel1.setLayout(formlayout1);
578

    
579
      tabLayout.setName("tabLayout");
580
      tabLayout.setTabPlacement(JTabbedPane.LEFT);
581
      tabLayout.addTab("_Basic",null,createPanel12());
582
      tabLayout.addTab("_Values",null,createPanel13());
583
      jpanel1.add(tabLayout,cc.xy(1,1));
584

    
585
      addFillComponents(jpanel1,new int[0],new int[0]);
586
      return jpanel1;
587
   }
588

    
589
   public JPanel createPanel12()
590
   {
591
      JPanel jpanel1 = new JPanel();
592
      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)");
593
      CellConstraints cc = new CellConstraints();
594
      jpanel1.setLayout(formlayout1);
595

    
596
      lblGroup.setName("lblGroup");
597
      lblGroup.setText("_Group");
598
      jpanel1.add(lblGroup,cc.xy(2,2));
599

    
600
      lblOrder.setName("lblOrder");
601
      lblOrder.setText("_Order");
602
      jpanel1.add(lblOrder,cc.xy(2,4));
603

    
604
      cboGroup.setEditable(true);
605
      cboGroup.setName("cboGroup");
606
      cboGroup.setRequestFocusEnabled(false);
607
      jpanel1.add(cboGroup,cc.xy(4,2));
608

    
609
      txtOrder.setName("txtOrder");
610
      jpanel1.add(txtOrder,cc.xy(4,4));
611

    
612
      lblHidden.setName("lblHidden");
613
      lblHidden.setText("_Hidden");
614
      jpanel1.add(lblHidden,cc.xy(2,6));
615

    
616
      chkHidden.setName("chkHidden");
617
      jpanel1.add(chkHidden,cc.xy(4,6));
618

    
619
      lblLabel.setName("lblLabel");
620
      lblLabel.setText("_Label");
621
      jpanel1.add(lblLabel,cc.xy(2,8));
622

    
623
      txtLabel.setName("txtLabel");
624
      jpanel1.add(txtLabel,cc.xy(4,8));
625

    
626
      lblDescription.setName("lblDescription");
627
      lblDescription.setText("_Description");
628
      lblDescription.setVerticalAlignment(JLabel.TOP);
629
      jpanel1.add(lblDescription,new CellConstraints(2,10,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
630

    
631
      txtDescription.setName("txtDescription");
632
      JScrollPane jscrollpane1 = new JScrollPane();
633
      jscrollpane1.setViewportView(txtDescription);
634
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
635
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
636
      jpanel1.add(jscrollpane1,cc.xy(4,10));
637

    
638
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10 });
639
      return jpanel1;
640
   }
641

    
642
   public JPanel createPanel13()
643
   {
644
      JPanel jpanel1 = new JPanel();
645
      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");
646
      CellConstraints cc = new CellConstraints();
647
      jpanel1.setLayout(formlayout1);
648

    
649
      lblMinValue.setName("lblMinValue");
650
      lblMinValue.setText("_Minimum_value");
651
      jpanel1.add(lblMinValue,cc.xy(2,2));
652

    
653
      txtMinValue.setName("txtMinValue");
654
      jpanel1.add(txtMinValue,cc.xy(4,2));
655

    
656
      lblMaxValue.setName("lblMaxValue");
657
      lblMaxValue.setText("_Maximum_value");
658
      jpanel1.add(lblMaxValue,cc.xy(2,4));
659

    
660
      txtMaxValue.setName("txtMaxValue");
661
      jpanel1.add(txtMaxValue,cc.xy(4,4));
662

    
663
      lblAvailableValues.setName("lblAvailableValues");
664
      lblAvailableValues.setText("_List_of_values");
665
      jpanel1.add(lblAvailableValues,cc.xywh(2,6,3,1));
666

    
667
      jpanel1.add(createPanel14(),cc.xywh(2,7,3,1));
668
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
669
      return jpanel1;
670
   }
671

    
672
   public JPanel createPanel14()
673
   {
674
      JPanel jpanel1 = new JPanel();
675
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
676
      CellConstraints cc = new CellConstraints();
677
      jpanel1.setLayout(formlayout1);
678

    
679
      jpanel1.add(createPanel15(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
680
      jpanel1.add(createPanel16(),cc.xy(1,1));
681
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1 });
682
      return jpanel1;
683
   }
684

    
685
   public JPanel createPanel15()
686
   {
687
      JPanel jpanel1 = new JPanel();
688
      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");
689
      CellConstraints cc = new CellConstraints();
690
      jpanel1.setLayout(formlayout1);
691

    
692
      btnAvailableValuesAdd.setActionCommand("_Add");
693
      btnAvailableValuesAdd.setName("btnAvailableValuesAdd");
694
      btnAvailableValuesAdd.setText("_Add");
695
      jpanel1.add(btnAvailableValuesAdd,cc.xy(1,1));
696

    
697
      btnAvailableValuesUpdate.setActionCommand("_Update");
698
      btnAvailableValuesUpdate.setName("btnAvailableValuesUpdate");
699
      btnAvailableValuesUpdate.setText("_Update");
700
      jpanel1.add(btnAvailableValuesUpdate,cc.xy(1,3));
701

    
702
      btnAvailableValuesRemove.setActionCommand("_Remove");
703
      btnAvailableValuesRemove.setName("btnAvailableValuesRemove");
704
      btnAvailableValuesRemove.setText("_Remove");
705
      jpanel1.add(btnAvailableValuesRemove,cc.xy(1,5));
706

    
707
      btnAvailableValuesRemoveAll.setActionCommand("_Remove");
708
      btnAvailableValuesRemoveAll.setName("btnAvailableValuesRemoveAll");
709
      btnAvailableValuesRemoveAll.setText("_Remove_all");
710
      jpanel1.add(btnAvailableValuesRemoveAll,cc.xy(1,7));
711

    
712
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4,6,8 });
713
      return jpanel1;
714
   }
715

    
716
   public JPanel createPanel16()
717
   {
718
      JPanel jpanel1 = new JPanel();
719
      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");
720
      CellConstraints cc = new CellConstraints();
721
      jpanel1.setLayout(formlayout1);
722

    
723
      lblAvailableValuesLabel.setName("lblAvailableValuesLabel");
724
      lblAvailableValuesLabel.setText("_Label");
725
      jpanel1.add(lblAvailableValuesLabel,cc.xy(1,3));
726

    
727
      lblAvailableValuesValue.setName("lblAvailableValuesValue");
728
      lblAvailableValuesValue.setText("_Value");
729
      jpanel1.add(lblAvailableValuesValue,cc.xy(1,5));
730

    
731
      txtAvailableValuesLabel.setName("txtAvailableValuesLabel");
732
      jpanel1.add(txtAvailableValuesLabel,cc.xy(3,3));
733

    
734
      txtAvailableValuesValue.setName("txtAvailableValuesValue");
735
      jpanel1.add(txtAvailableValuesValue,cc.xy(3,5));
736

    
737
      lstAvailableValues.setName("lstAvailableValues");
738
      JScrollPane jscrollpane1 = new JScrollPane();
739
      jscrollpane1.setViewportView(lstAvailableValues);
740
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
741
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
742
      jpanel1.add(jscrollpane1,cc.xywh(1,1,3,1));
743

    
744
      addFillComponents(jpanel1,new int[]{ 2,3 },new int[]{ 2,4,6 });
745
      return jpanel1;
746
   }
747

    
748
   public JPanel createPanel17()
749
   {
750
      JPanel jpanel1 = new JPanel();
751
      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");
752
      CellConstraints cc = new CellConstraints();
753
      jpanel1.setLayout(formlayout1);
754

    
755
      lblIsPrimaryKey.setName("lblIsPrimaryKey");
756
      lblIsPrimaryKey.setText("_Primary_key");
757
      jpanel1.add(lblIsPrimaryKey,cc.xy(1,1));
758

    
759
      chkIsPrimaryKey.setName("chkIsPrimaryKey");
760
      jpanel1.add(chkIsPrimaryKey,cc.xy(3,1));
761

    
762
      lblIsAutomatic.setName("lblIsAutomatic");
763
      lblIsAutomatic.setText("_Value_automatic");
764
      jpanel1.add(lblIsAutomatic,cc.xy(5,1));
765

    
766
      chkIsAutomatic.setName("chkIsAutomatic");
767
      jpanel1.add(chkIsAutomatic,cc.xy(7,1));
768

    
769
      lblAllowNulls.setName("lblAllowNulls");
770
      lblAllowNulls.setText("_Allow_nulls");
771
      jpanel1.add(lblAllowNulls,cc.xy(9,1));
772

    
773
      chkAllowNulls.setName("chkAllowNulls");
774
      jpanel1.add(chkAllowNulls,cc.xy(11,1));
775

    
776
      addFillComponents(jpanel1,new int[]{ 2,4,6,8,10,12 },new int[0]);
777
      return jpanel1;
778
   }
779

    
780
   public JPanel createPanel18()
781
   {
782
      JPanel jpanel1 = new JPanel();
783
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
784
      CellConstraints cc = new CellConstraints();
785
      jpanel1.setLayout(formlayout1);
786

    
787
      cboFieldType.setName("cboFieldType");
788
      jpanel1.add(cboFieldType,cc.xy(1,1));
789

    
790
      btnFieldType.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/featuretype/picker-datatype.png"));
791
      btnFieldType.setName("btnFieldType");
792
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
793
      btnFieldType.setBorder(emptyborder1);
794
      jpanel1.add(btnFieldType,cc.xy(3,1));
795

    
796
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
797
      return jpanel1;
798
   }
799

    
800
   /**
801
    * Initializer
802
    */
803
   protected void initializePanel()
804
   {
805
      setLayout(new BorderLayout());
806
      add(createPanel(), BorderLayout.CENTER);
807
   }
808

    
809

    
810
}