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

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

    
116
   /**
117
    * Default constructor
118
    */
119
   public DefaultFeatureAttributePanelView()
120
   {
121
      initializePanel();
122
   }
123

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

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

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

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

    
164
   }
165

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

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

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

    
210
      lblFieldName.setName("lblFieldName");
211
      lblFieldName.setText("_Field_name");
212
      jpanel1.add(lblFieldName,cc.xy(2,2));
213

    
214
      txtFieldName.setName("txtFieldName");
215
      jpanel1.add(txtFieldName,cc.xy(4,2));
216

    
217
      lblFieldType.setName("lblFieldType");
218
      lblFieldType.setText("_Field_type");
219
      jpanel1.add(lblFieldType,cc.xy(2,4));
220

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

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

    
236
   public JPanel createPanel1()
237
   {
238
      JPanel jpanel1 = new JPanel();
239
      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");
240
      CellConstraints cc = new CellConstraints();
241
      jpanel1.setLayout(formlayout1);
242

    
243
      lblSize.setName("lblSize");
244
      lblSize.setText("_Size");
245
      jpanel1.add(lblSize,cc.xy(2,2));
246

    
247
      txtSize.setName("txtSize");
248
      jpanel1.add(txtSize,cc.xy(4,2));
249

    
250
      lblPrecision.setName("lblPrecision");
251
      lblPrecision.setText("_Precision");
252
      jpanel1.add(lblPrecision,cc.xy(2,4));
253

    
254
      lblDefaultValue.setName("lblDefaultValue");
255
      lblDefaultValue.setText("_Default_value");
256
      jpanel1.add(lblDefaultValue,cc.xy(2,8));
257

    
258
      txtPrecision.setName("txtPrecision");
259
      jpanel1.add(txtPrecision,cc.xy(4,4));
260

    
261
      txtDefaultValue.setName("txtDefaultValue");
262
      jpanel1.add(txtDefaultValue,cc.xy(4,8));
263

    
264
      lblDataProfile.setName("lblDataProfile");
265
      lblDataProfile.setText("_Data_profile");
266
      jpanel1.add(lblDataProfile,cc.xy(2,10));
267

    
268
      cboDataProfile.setName("cboDataProfile");
269
      jpanel1.add(cboDataProfile,cc.xy(4,10));
270

    
271
      chkVirtualField.setActionCommand("Campo virtual");
272
      chkVirtualField.setName("chkVirtualField");
273
      chkVirtualField.setText("_Virtual_field");
274
      jpanel1.add(chkVirtualField,cc.xy(2,12));
275

    
276
      jpanel1.add(createPanel2(),cc.xy(4,12));
277
      lblScale.setName("lblScale");
278
      lblScale.setText("_Scale");
279
      jpanel1.add(lblScale,cc.xy(2,6));
280

    
281
      txtScale.setName("txtScale");
282
      jpanel1.add(txtScale,cc.xy(4,6));
283

    
284
      JLabel jlabel1 = new JLabel();
285
      jlabel1.setText("_Relation_type");
286
      jpanel1.add(jlabel1,cc.xy(2,14));
287

    
288
      cboRelationType.setName("cboRelationType");
289
      jpanel1.add(cboRelationType,cc.xy(4,14));
290

    
291
      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 });
292
      return jpanel1;
293
   }
294

    
295
   public JPanel createPanel2()
296
   {
297
      JPanel jpanel1 = new JPanel();
298
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
299
      CellConstraints cc = new CellConstraints();
300
      jpanel1.setLayout(formlayout1);
301

    
302
      btnVirtualField.setActionCommand("...");
303
      btnVirtualField.setName("btnVirtualField");
304
      btnVirtualField.setText("...");
305
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
306
      btnVirtualField.setBorder(emptyborder1);
307
      jpanel1.add(btnVirtualField,cc.xy(3,1));
308

    
309
      txtVirtualField.setName("txtVirtualField");
310
      jpanel1.add(txtVirtualField,cc.xy(1,1));
311

    
312
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
313
      return jpanel1;
314
   }
315

    
316
   public JPanel createPanel3()
317
   {
318
      JPanel jpanel1 = new JPanel();
319
      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");
320
      CellConstraints cc = new CellConstraints();
321
      jpanel1.setLayout(formlayout1);
322

    
323
      lblGeometryType.setName("lblGeometryType");
324
      lblGeometryType.setText("_Geometry_type");
325
      jpanel1.add(lblGeometryType,cc.xy(2,2));
326

    
327
      lblGeometrySubtype.setName("lblGeometrySubtype");
328
      lblGeometrySubtype.setText("_Geometry_subtype");
329
      jpanel1.add(lblGeometrySubtype,cc.xy(2,4));
330

    
331
      lblCRS.setName("lblCRS");
332
      lblCRS.setText("_CRS");
333
      jpanel1.add(lblCRS,cc.xy(2,6));
334

    
335
      cboGeometryType.setName("cboGeometryType");
336
      jpanel1.add(cboGeometryType,cc.xy(4,2));
337

    
338
      cboGeometrySubtype.setName("cboGeometrySubtype");
339
      jpanel1.add(cboGeometrySubtype,cc.xy(4,4));
340

    
341
      jpanel1.add(createPanel4(),cc.xy(4,6));
342
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
343
      return jpanel1;
344
   }
345

    
346
   public JPanel createPanel4()
347
   {
348
      JPanel jpanel1 = new JPanel();
349
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
350
      CellConstraints cc = new CellConstraints();
351
      jpanel1.setLayout(formlayout1);
352

    
353
      btnCRS.setActionCommand("...");
354
      btnCRS.setName("btnCRS");
355
      btnCRS.setText("...");
356
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
357
      btnCRS.setBorder(emptyborder1);
358
      jpanel1.add(btnCRS,cc.xy(3,1));
359

    
360
      txtCRS.setName("txtCRS");
361
      jpanel1.add(txtCRS,cc.xy(1,1));
362

    
363
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
364
      return jpanel1;
365
   }
366

    
367
   public JPanel createPanel5()
368
   {
369
      JPanel jpanel1 = new JPanel();
370
      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");
371
      CellConstraints cc = new CellConstraints();
372
      jpanel1.setLayout(formlayout1);
373

    
374
      lblDateFormat.setName("lblDateFormat");
375
      lblDateFormat.setText("_Date_format");
376
      jpanel1.add(lblDateFormat,cc.xy(2,2));
377

    
378
      cboDateFormat.setEditable(true);
379
      cboDateFormat.setName("cboDateFormat");
380
      cboDateFormat.setRequestFocusEnabled(false);
381
      jpanel1.add(cboDateFormat,cc.xy(4,2));
382

    
383
      lblInterval.setName("lblInterval");
384
      lblInterval.setText("_Interval");
385
      jpanel1.add(lblInterval,new CellConstraints(2,5,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
386

    
387
      jpanel1.add(createPanel6(),cc.xy(4,5));
388
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6 });
389
      return jpanel1;
390
   }
391

    
392
   public JPanel createPanel6()
393
   {
394
      JPanel jpanel1 = new JPanel();
395
      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");
396
      CellConstraints cc = new CellConstraints();
397
      jpanel1.setLayout(formlayout1);
398

    
399
      lblIntervalStart.setName("lblIntervalStart");
400
      lblIntervalStart.setText("_Start");
401
      jpanel1.add(lblIntervalStart,cc.xy(1,1));
402

    
403
      lblIntervalEnd.setName("lblIntervalEnd");
404
      lblIntervalEnd.setText("_End");
405
      jpanel1.add(lblIntervalEnd,cc.xy(1,3));
406

    
407
      txtIntervalStart.setName("txtIntervalStart");
408
      jpanel1.add(txtIntervalStart,cc.xy(3,1));
409

    
410
      btnIntervalStart.setActionCommand("...");
411
      btnIntervalStart.setName("btnIntervalStart");
412
      btnIntervalStart.setText("...");
413
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
414
      btnIntervalStart.setBorder(emptyborder1);
415
      jpanel1.add(btnIntervalStart,cc.xy(5,1));
416

    
417
      btnIntervalEnd.setActionCommand("...");
418
      btnIntervalEnd.setName("btnIntervalEnd");
419
      btnIntervalEnd.setText("...");
420
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
421
      btnIntervalEnd.setBorder(emptyborder2);
422
      jpanel1.add(btnIntervalEnd,cc.xy(5,3));
423

    
424
      txtIntervalEnd.setName("txtIntervalEnd");
425
      jpanel1.add(txtIntervalEnd,cc.xy(3,3));
426

    
427
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2 });
428
      return jpanel1;
429
   }
430

    
431
   public JPanel createPanel7()
432
   {
433
      JPanel jpanel1 = new JPanel();
434
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)");
435
      CellConstraints cc = new CellConstraints();
436
      jpanel1.setLayout(formlayout1);
437

    
438
      jpanel1.add(createPanel8(),cc.xy(1,1));
439
      addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 });
440
      return jpanel1;
441
   }
442

    
443
   public JPanel createPanel8()
444
   {
445
      JPanel jpanel1 = new JPanel();
446
      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");
447
      CellConstraints cc = new CellConstraints();
448
      jpanel1.setLayout(formlayout1);
449

    
450
      lblTagsName.setName("lblTagsName");
451
      lblTagsName.setText("_Name");
452
      jpanel1.add(lblTagsName,cc.xy(2,3));
453

    
454
      lblTagsValue.setName("lblTagsValue");
455
      lblTagsValue.setText("_Value");
456
      jpanel1.add(lblTagsValue,cc.xy(2,5));
457

    
458
      cboTagsName.setEditable(true);
459
      cboTagsName.setName("cboTagsName");
460
      cboTagsName.setRequestFocusEnabled(false);
461
      jpanel1.add(cboTagsName,cc.xy(4,3));
462

    
463
      tblTags.setName("tblTags");
464
      JScrollPane jscrollpane1 = new JScrollPane();
465
      jscrollpane1.setViewportView(tblTags);
466
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
467
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
468
      jpanel1.add(jscrollpane1,cc.xywh(2,1,3,1));
469

    
470
      lblTagsDescription.setName("lblTagsDescription");
471
      jpanel1.add(lblTagsDescription,cc.xy(4,6));
472

    
473
      jpanel1.add(createPanel9(),cc.xywh(6,1,1,5));
474
      cboTagsValue.setEditable(true);
475
      cboTagsValue.setName("cboTagsValue");
476
      cboTagsValue.setRequestFocusEnabled(false);
477
      jpanel1.add(cboTagsValue,cc.xy(4,5));
478

    
479
      addFillComponents(jpanel1,new int[]{ 1,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6 });
480
      return jpanel1;
481
   }
482

    
483
   public JPanel createPanel9()
484
   {
485
      JPanel jpanel1 = new JPanel();
486
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
487
      CellConstraints cc = new CellConstraints();
488
      jpanel1.setLayout(formlayout1);
489

    
490
      btnTagsAdd.setActionCommand("_Add");
491
      btnTagsAdd.setName("btnTagsAdd");
492
      btnTagsAdd.setText("_Add");
493
      jpanel1.add(btnTagsAdd,cc.xy(1,1));
494

    
495
      btnTagsUpdate.setActionCommand("_Update");
496
      btnTagsUpdate.setName("btnTagsUpdate");
497
      btnTagsUpdate.setText("_Update");
498
      jpanel1.add(btnTagsUpdate,cc.xy(1,3));
499

    
500
      btnTagsRemove.setActionCommand("_Remove");
501
      btnTagsRemove.setName("btnTagsRemove");
502
      btnTagsRemove.setText("_Remove");
503
      jpanel1.add(btnTagsRemove,cc.xy(1,5));
504

    
505
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4 });
506
      return jpanel1;
507
   }
508

    
509
   public JPanel createPanel10()
510
   {
511
      JPanel jpanel1 = new JPanel();
512
      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");
513
      CellConstraints cc = new CellConstraints();
514
      jpanel1.setLayout(formlayout1);
515

    
516
      chkIsForeingKey.setActionCommand("_is_foreing_key");
517
      chkIsForeingKey.setName("chkIsForeingKey");
518
      chkIsForeingKey.setText("_is_foreing_key");
519
      jpanel1.add(chkIsForeingKey,cc.xywh(2,2,3,1));
520

    
521
      lblForeingKeyTableName.setName("lblForeingKeyTableName");
522
      lblForeingKeyTableName.setText("_Table");
523
      jpanel1.add(lblForeingKeyTableName,cc.xy(2,6));
524

    
525
      lblForeingKeyCodeName.setName("lblForeingKeyCodeName");
526
      lblForeingKeyCodeName.setText("_Code");
527
      jpanel1.add(lblForeingKeyCodeName,cc.xy(2,8));
528

    
529
      lblForeingKeyLabelFormula.setName("lblForeingKeyLabelFormula");
530
      lblForeingKeyLabelFormula.setText("_Label_formula");
531
      jpanel1.add(lblForeingKeyLabelFormula,cc.xy(2,10));
532

    
533
      cboForeingKeyTableName.setEditable(true);
534
      cboForeingKeyTableName.setName("cboForeingKeyTableName");
535
      cboForeingKeyTableName.setRequestFocusEnabled(false);
536
      jpanel1.add(cboForeingKeyTableName,cc.xywh(4,6,3,1));
537

    
538
      cboForeingKeyCodeName.setEditable(true);
539
      cboForeingKeyCodeName.setName("cboForeingKeyCodeName");
540
      cboForeingKeyCodeName.setRequestFocusEnabled(false);
541
      jpanel1.add(cboForeingKeyCodeName,cc.xywh(4,8,3,1));
542

    
543
      txtForeingKeyFormula.setName("txtForeingKeyFormula");
544
      jpanel1.add(txtForeingKeyFormula,cc.xy(4,10));
545

    
546
      btnForeingKeyFormula.setActionCommand("...");
547
      btnForeingKeyFormula.setName("btnForeingKeyFormula");
548
      btnForeingKeyFormula.setText("...");
549
      jpanel1.add(btnForeingKeyFormula,cc.xy(6,10));
550

    
551
      lblIsClosedList.setName("lblIsClosedList");
552
      lblIsClosedList.setText("_is_closed_list");
553
      jpanel1.add(lblIsClosedList,cc.xy(2,4));
554

    
555
      chkIsClosedList.setName("chkIsClosedList");
556
      jpanel1.add(chkIsClosedList,cc.xy(4,4));
557

    
558
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 });
559
      return jpanel1;
560
   }
561

    
562
   public JPanel createPanel11()
563
   {
564
      JPanel jpanel1 = new JPanel();
565
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)");
566
      CellConstraints cc = new CellConstraints();
567
      jpanel1.setLayout(formlayout1);
568

    
569
      tabLayout.setName("tabLayout");
570
      tabLayout.setTabPlacement(JTabbedPane.LEFT);
571
      tabLayout.addTab("_Basic",null,createPanel12());
572
      tabLayout.addTab("_Values",null,createPanel13());
573
      jpanel1.add(tabLayout,cc.xy(1,1));
574

    
575
      addFillComponents(jpanel1,new int[0],new int[0]);
576
      return jpanel1;
577
   }
578

    
579
   public JPanel createPanel12()
580
   {
581
      JPanel jpanel1 = new JPanel();
582
      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)");
583
      CellConstraints cc = new CellConstraints();
584
      jpanel1.setLayout(formlayout1);
585

    
586
      lblGroup.setName("lblGroup");
587
      lblGroup.setText("_Group");
588
      jpanel1.add(lblGroup,cc.xy(2,2));
589

    
590
      lblOrder.setName("lblOrder");
591
      lblOrder.setText("_Order");
592
      jpanel1.add(lblOrder,cc.xy(2,4));
593

    
594
      cboGroup.setEditable(true);
595
      cboGroup.setName("cboGroup");
596
      cboGroup.setRequestFocusEnabled(false);
597
      jpanel1.add(cboGroup,cc.xy(4,2));
598

    
599
      txtOrder.setName("txtOrder");
600
      jpanel1.add(txtOrder,cc.xy(4,4));
601

    
602
      lblHidden.setName("lblHidden");
603
      lblHidden.setText("_Hidden");
604
      jpanel1.add(lblHidden,cc.xy(2,6));
605

    
606
      chkHidden.setName("chkHidden");
607
      jpanel1.add(chkHidden,cc.xy(4,6));
608

    
609
      lblLabel.setName("lblLabel");
610
      lblLabel.setText("_Label");
611
      jpanel1.add(lblLabel,cc.xy(2,8));
612

    
613
      txtLabel.setName("txtLabel");
614
      jpanel1.add(txtLabel,cc.xy(4,8));
615

    
616
      lblDescription.setName("lblDescription");
617
      lblDescription.setText("_Description");
618
      lblDescription.setVerticalAlignment(JLabel.TOP);
619
      jpanel1.add(lblDescription,new CellConstraints(2,10,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
620

    
621
      txtDescription.setName("txtDescription");
622
      JScrollPane jscrollpane1 = new JScrollPane();
623
      jscrollpane1.setViewportView(txtDescription);
624
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
625
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
626
      jpanel1.add(jscrollpane1,cc.xy(4,10));
627

    
628
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10 });
629
      return jpanel1;
630
   }
631

    
632
   public JPanel createPanel13()
633
   {
634
      JPanel jpanel1 = new JPanel();
635
      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");
636
      CellConstraints cc = new CellConstraints();
637
      jpanel1.setLayout(formlayout1);
638

    
639
      lblMinValue.setName("lblMinValue");
640
      lblMinValue.setText("_Minimum_value");
641
      jpanel1.add(lblMinValue,cc.xy(2,2));
642

    
643
      txtMinValue.setName("txtMinValue");
644
      jpanel1.add(txtMinValue,cc.xy(4,2));
645

    
646
      lblMaxValue.setName("lblMaxValue");
647
      lblMaxValue.setText("_Maximum_value");
648
      jpanel1.add(lblMaxValue,cc.xy(2,4));
649

    
650
      txtMaxValue.setName("txtMaxValue");
651
      jpanel1.add(txtMaxValue,cc.xy(4,4));
652

    
653
      lblAvailableValues.setName("lblAvailableValues");
654
      lblAvailableValues.setText("_List_of_values");
655
      jpanel1.add(lblAvailableValues,cc.xywh(2,6,3,1));
656

    
657
      jpanel1.add(createPanel14(),cc.xywh(2,7,3,1));
658
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
659
      return jpanel1;
660
   }
661

    
662
   public JPanel createPanel14()
663
   {
664
      JPanel jpanel1 = new JPanel();
665
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
666
      CellConstraints cc = new CellConstraints();
667
      jpanel1.setLayout(formlayout1);
668

    
669
      jpanel1.add(createPanel15(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
670
      jpanel1.add(createPanel16(),cc.xy(1,1));
671
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1 });
672
      return jpanel1;
673
   }
674

    
675
   public JPanel createPanel15()
676
   {
677
      JPanel jpanel1 = new JPanel();
678
      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");
679
      CellConstraints cc = new CellConstraints();
680
      jpanel1.setLayout(formlayout1);
681

    
682
      btnAvailableValuesAdd.setActionCommand("_Add");
683
      btnAvailableValuesAdd.setName("btnAvailableValuesAdd");
684
      btnAvailableValuesAdd.setText("_Add");
685
      jpanel1.add(btnAvailableValuesAdd,cc.xy(1,1));
686

    
687
      btnAvailableValuesUpdate.setActionCommand("_Update");
688
      btnAvailableValuesUpdate.setName("btnAvailableValuesUpdate");
689
      btnAvailableValuesUpdate.setText("_Update");
690
      jpanel1.add(btnAvailableValuesUpdate,cc.xy(1,3));
691

    
692
      btnAvailableValuesRemove.setActionCommand("_Remove");
693
      btnAvailableValuesRemove.setName("btnAvailableValuesRemove");
694
      btnAvailableValuesRemove.setText("_Remove");
695
      jpanel1.add(btnAvailableValuesRemove,cc.xy(1,5));
696

    
697
      btnAvailableValuesRemoveAll.setActionCommand("_Remove");
698
      btnAvailableValuesRemoveAll.setName("btnAvailableValuesRemoveAll");
699
      btnAvailableValuesRemoveAll.setText("_Remove_all");
700
      jpanel1.add(btnAvailableValuesRemoveAll,cc.xy(1,7));
701

    
702
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4,6,8 });
703
      return jpanel1;
704
   }
705

    
706
   public JPanel createPanel16()
707
   {
708
      JPanel jpanel1 = new JPanel();
709
      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");
710
      CellConstraints cc = new CellConstraints();
711
      jpanel1.setLayout(formlayout1);
712

    
713
      lblAvailableValuesLabel.setName("lblAvailableValuesLabel");
714
      lblAvailableValuesLabel.setText("_Label");
715
      jpanel1.add(lblAvailableValuesLabel,cc.xy(1,3));
716

    
717
      lblAvailableValuesValue.setName("lblAvailableValuesValue");
718
      lblAvailableValuesValue.setText("_Value");
719
      jpanel1.add(lblAvailableValuesValue,cc.xy(1,5));
720

    
721
      txtAvailableValuesLabel.setName("txtAvailableValuesLabel");
722
      jpanel1.add(txtAvailableValuesLabel,cc.xy(3,3));
723

    
724
      txtAvailableValuesValue.setName("txtAvailableValuesValue");
725
      jpanel1.add(txtAvailableValuesValue,cc.xy(3,5));
726

    
727
      lstAvailableValues.setName("lstAvailableValues");
728
      JScrollPane jscrollpane1 = new JScrollPane();
729
      jscrollpane1.setViewportView(lstAvailableValues);
730
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
731
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
732
      jpanel1.add(jscrollpane1,cc.xywh(1,1,3,1));
733

    
734
      addFillComponents(jpanel1,new int[]{ 2,3 },new int[]{ 2,4,6 });
735
      return jpanel1;
736
   }
737

    
738
   public JPanel createPanel17()
739
   {
740
      JPanel jpanel1 = new JPanel();
741
      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");
742
      CellConstraints cc = new CellConstraints();
743
      jpanel1.setLayout(formlayout1);
744

    
745
      lblIsPrimaryKey.setName("lblIsPrimaryKey");
746
      lblIsPrimaryKey.setText("_Primary_key");
747
      jpanel1.add(lblIsPrimaryKey,cc.xy(1,1));
748

    
749
      chkIsPrimaryKey.setName("chkIsPrimaryKey");
750
      jpanel1.add(chkIsPrimaryKey,cc.xy(3,1));
751

    
752
      lblIsAutomatic.setName("lblIsAutomatic");
753
      lblIsAutomatic.setText("_Value_automatic");
754
      jpanel1.add(lblIsAutomatic,cc.xy(5,1));
755

    
756
      chkIsAutomatic.setName("chkIsAutomatic");
757
      jpanel1.add(chkIsAutomatic,cc.xy(7,1));
758

    
759
      lblAllowNulls.setName("lblAllowNulls");
760
      lblAllowNulls.setText("_Allow_nulls");
761
      jpanel1.add(lblAllowNulls,cc.xy(9,1));
762

    
763
      chkAllowNulls.setName("chkAllowNulls");
764
      jpanel1.add(chkAllowNulls,cc.xy(11,1));
765

    
766
      addFillComponents(jpanel1,new int[]{ 2,4,6,8,10,12 },new int[0]);
767
      return jpanel1;
768
   }
769

    
770
   public JPanel createPanel18()
771
   {
772
      JPanel jpanel1 = new JPanel();
773
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
774
      CellConstraints cc = new CellConstraints();
775
      jpanel1.setLayout(formlayout1);
776

    
777
      cboFieldType.setName("cboFieldType");
778
      jpanel1.add(cboFieldType,cc.xy(1,1));
779

    
780
      btnFieldType.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/featuretype/picker-datatype.png"));
781
      btnFieldType.setName("btnFieldType");
782
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
783
      btnFieldType.setBorder(emptyborder1);
784
      jpanel1.add(btnFieldType,cc.xy(3,1));
785

    
786
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
787
      return jpanel1;
788
   }
789

    
790
   /**
791
    * Initializer
792
    */
793
   protected void initializePanel()
794
   {
795
      setLayout(new BorderLayout());
796
      add(createPanel(), BorderLayout.CENTER);
797
   }
798

    
799

    
800
}