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 / DefaultFeatureTypePanelView.java @ 46850

History | View | Annotate | Download (28.7 KB)

1
package org.gvsig.fmap.dal.swing.impl.featuretype;
2

    
3
import com.jeta.forms.components.line.HorizontalLineComponent;
4
import com.jeta.forms.components.separator.TitledSeparator;
5
import com.jeta.open.i18n.I18NUtils;
6
import com.jgoodies.forms.layout.CellConstraints;
7
import com.jgoodies.forms.layout.FormLayout;
8
import java.awt.BorderLayout;
9
import java.awt.ComponentOrientation;
10
import java.awt.Container;
11
import java.awt.Dimension;
12
import javax.swing.Box;
13
import javax.swing.ImageIcon;
14
import javax.swing.JButton;
15
import javax.swing.JCheckBox;
16
import javax.swing.JComboBox;
17
import javax.swing.JFrame;
18
import javax.swing.JLabel;
19
import javax.swing.JPanel;
20
import javax.swing.JScrollPane;
21
import javax.swing.JTabbedPane;
22
import javax.swing.JTable;
23
import javax.swing.JTextArea;
24
import javax.swing.JTextField;
25
import javax.swing.border.EmptyBorder;
26

    
27

    
28
public class DefaultFeatureTypePanelView extends JPanel
29
{
30
   JTabbedPane tabFeatureType = new JTabbedPane();
31
   JLabel lblLabel = new JLabel();
32
   JLabel lblDescription = new JLabel();
33
   JTextField txtLabel = new JTextField();
34
   JTextArea txtDescription = new JTextArea();
35
   JLabel lblTags = new JLabel();
36
   JPanel gridTags = new JPanel();
37
   HorizontalLineComponent horizontallinecomponent1 = new HorizontalLineComponent();
38
   JPanel gridTagsItems = new JPanel();
39
   JTable tblTagsItems = new JTable();
40
   JButton btnTagsNew = new JButton();
41
   JButton btnTagsDelete = new JButton();
42
   JPanel gridTagsItem = new JPanel();
43
   JButton btnTagsAccept = new JButton();
44
   JButton btnTagsDiscard = new JButton();
45
   JButton btnTagsModify = new JButton();
46
   JPanel grdTagsItemView = new JPanel();
47
   JLabel lblTagsItemName = new JLabel();
48
   JLabel lblTagsItemValue = new JLabel();
49
   JComboBox cboTagsItemName = new JComboBox();
50
   JComboBox cboTagsItemValue = new JComboBox();
51
   JLabel lblTagsItemNotes = new JLabel();
52
   JLabel lblTagsItemNotesValue = new JLabel();
53
   JPanel gridAttributes = new JPanel();
54
   HorizontalLineComponent horizontallinecomponent2 = new HorizontalLineComponent();
55
   JPanel gridAttributesTable = new JPanel();
56
   JTable tblFields = new JTable();
57
   JButton btnNew = new JButton();
58
   JButton btnDelete = new JButton();
59
   JPanel gridAttributesDetail = new JPanel();
60
   JPanel pnlField = new JPanel();
61
   JButton btnFormFieldAccept = new JButton();
62
   JButton btnFormFieldDiscard = new JButton();
63
   JButton btnFormFieldModify = new JButton();
64
   JCheckBox chkRulesValidateFeatureBeforeInsert = new JCheckBox();
65
   JCheckBox chkRulesValidateFeaturesAtFinishEditing = new JCheckBox();
66
   TitledSeparator lblRulesDefaultRules = new TitledSeparator();
67
   TitledSeparator lblRulesCustomRules = new TitledSeparator();
68
   JPanel gridRules = new JPanel();
69
   JPanel gridRulesTable = new JPanel();
70
   JTable tblRules = new JTable();
71
   JButton btnRulesNew = new JButton();
72
   JButton btnRulesDelete = new JButton();
73
   JPanel gridRulesDetail = new JPanel();
74
   JLabel lblRuleName = new JLabel();
75
   JLabel lblRuleDescription = new JLabel();
76
   JLabel lblRuleCheckAtFinishEditing = new JLabel();
77
   JLabel lblRuleCheckAtUpdate = new JLabel();
78
   JLabel lblRuleValidation = new JLabel();
79
   JTextField txtRuleName = new JTextField();
80
   JCheckBox chkRuleCheckAtFinishEditing = new JCheckBox();
81
   JCheckBox chkRuleCheckAtUpdate = new JCheckBox();
82
   JTextField txtRuleDescription = new JTextField();
83
   JTextArea txtRuleValidation = new JTextArea();
84
   JButton btnRuleValidation = new JButton();
85
   JButton btnRuleValidationHistory = new JButton();
86
   JButton btnRuleValidationBookmarks = new JButton();
87
   JButton btnRuleFormFieldAccept = new JButton();
88
   JButton btnRuleFormFieldDiscard = new JButton();
89
   JButton btnRuleFormFieldModify = new JButton();
90
   JPanel pnlCfgActions = new JPanel();
91

    
92
   /**
93
    * Default constructor
94
    */
95
   public DefaultFeatureTypePanelView()
96
   {
97
      initializePanel();
98
   }
99

    
100
   /**
101
    * Adds fill components to empty cells in the first row and first column of the grid.
102
    * This ensures that the grid spacing will be the same as shown in the designer.
103
    * @param cols an array of column indices in the first row where fill components should be added.
104
    * @param rows an array of row indices in the first column where fill components should be added.
105
    */
106
   void addFillComponents( Container panel, int[] cols, int[] rows )
107
   {
108
      Dimension filler = new Dimension(10,10);
109

    
110
      boolean filled_cell_11 = false;
111
      CellConstraints cc = new CellConstraints();
112
      if ( cols.length > 0 && rows.length > 0 )
113
      {
114
         if ( cols[0] == 1 && rows[0] == 1 )
115
         {
116
            /** add a rigid area  */
117
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
118
            filled_cell_11 = true;
119
         }
120
      }
121

    
122
      for( int index = 0; index < cols.length; index++ )
123
      {
124
         if ( cols[index] == 1 && filled_cell_11 )
125
         {
126
            continue;
127
         }
128
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
129
      }
130

    
131
      for( int index = 0; index < rows.length; index++ )
132
      {
133
         if ( rows[index] == 1 && filled_cell_11 )
134
         {
135
            continue;
136
         }
137
         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
138
      }
139

    
140
   }
141

    
142
   /**
143
    * Helper method to load an image file from the CLASSPATH
144
    * @param imageName the package and name of the file to load relative to the CLASSPATH
145
    * @return an ImageIcon instance with the specified image file
146
    * @throws IllegalArgumentException if the image resource cannot be loaded.
147
    */
148
   public ImageIcon loadImage( String imageName )
149
   {
150
      try
151
      {
152
         ClassLoader classloader = getClass().getClassLoader();
153
         java.net.URL url = classloader.getResource( imageName );
154
         if ( url != null )
155
         {
156
            ImageIcon icon = new ImageIcon( url );
157
            return icon;
158
         }
159
      }
160
      catch( Exception e )
161
      {
162
         e.printStackTrace();
163
      }
164
      throw new IllegalArgumentException( "Unable to load image: " + imageName );
165
   }
166

    
167
   /**
168
    * Method for recalculating the component orientation for 
169
    * right-to-left Locales.
170
    * @param orientation the component orientation to be applied
171
    */
172
   public void applyComponentOrientation( ComponentOrientation orientation )
173
   {
174
      // Not yet implemented...
175
      // I18NUtils.applyComponentOrientation(this, orientation);
176
      super.applyComponentOrientation(orientation);
177
   }
178

    
179
   public JPanel createPanel()
180
   {
181
      JPanel jpanel1 = new JPanel();
182
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE");
183
      CellConstraints cc = new CellConstraints();
184
      jpanel1.setLayout(formlayout1);
185

    
186
      tabFeatureType.setName("tabFeatureType");
187
      tabFeatureType.addTab("_General",null,createPanel1());
188
      tabFeatureType.addTab("_Columns",null,createPanel4());
189
      tabFeatureType.addTab("_Rules",null,createPanel7());
190
      jpanel1.add(tabFeatureType,cc.xy(2,3));
191

    
192
      jpanel1.add(createPanel13(),cc.xy(2,2));
193
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4 });
194
      return jpanel1;
195
   }
196

    
197
   public JPanel createPanel1()
198
   {
199
      JPanel jpanel1 = new JPanel();
200
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(0.1),CENTER:2DLU:NONE,FILL:DEFAULT:GROW(0.8),CENTER:2DLU:NONE");
201
      CellConstraints cc = new CellConstraints();
202
      jpanel1.setLayout(formlayout1);
203

    
204
      lblLabel.setName("lblLabel");
205
      lblLabel.setText("_Label");
206
      jpanel1.add(lblLabel,cc.xy(2,2));
207

    
208
      lblDescription.setName("lblDescription");
209
      lblDescription.setText("_Description");
210
      lblDescription.setVerticalAlignment(JLabel.TOP);
211
      jpanel1.add(lblDescription,new CellConstraints(2,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
212

    
213
      txtLabel.setName("txtLabel");
214
      jpanel1.add(txtLabel,cc.xy(4,2));
215

    
216
      txtDescription.setName("txtDescription");
217
      JScrollPane jscrollpane1 = new JScrollPane();
218
      jscrollpane1.setViewportView(txtDescription);
219
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
220
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
221
      jpanel1.add(jscrollpane1,new CellConstraints(4,4,1,1,CellConstraints.DEFAULT,CellConstraints.FILL));
222

    
223
      lblTags.setName("lblTags");
224
      lblTags.setText("_Tags");
225
      lblTags.setVerticalAlignment(JLabel.TOP);
226
      jpanel1.add(lblTags,cc.xy(2,6));
227

    
228
      jpanel1.add(creategridTags(),cc.xy(4,6));
229
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
230
      return jpanel1;
231
   }
232

    
233
   public JPanel creategridTags()
234
   {
235
      gridTags.setName("gridTags");
236
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
237
      CellConstraints cc = new CellConstraints();
238
      gridTags.setLayout(formlayout1);
239

    
240
      gridTags.add(horizontallinecomponent1,cc.xy(1,2));
241

    
242
      gridTags.add(creategridTagsItems(),cc.xy(1,1));
243
      gridTags.add(creategridTagsItem(),cc.xy(1,3));
244
      addFillComponents(gridTags,new int[]{ 1 },new int[]{ 1,3 });
245
      return gridTags;
246
   }
247

    
248
   public JPanel creategridTagsItems()
249
   {
250
      gridTagsItems.setName("gridTagsItems");
251
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
252
      CellConstraints cc = new CellConstraints();
253
      gridTagsItems.setLayout(formlayout1);
254

    
255
      tblTagsItems.setName("tblTagsItems");
256
      JScrollPane jscrollpane1 = new JScrollPane();
257
      jscrollpane1.setViewportView(tblTagsItems);
258
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
259
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
260
      gridTagsItems.add(jscrollpane1,cc.xy(1,1));
261

    
262
      gridTagsItems.add(createPanel2(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
263
      addFillComponents(gridTagsItems,new int[]{ 2,3 },new int[0]);
264
      return gridTagsItems;
265
   }
266

    
267
   public JPanel createPanel2()
268
   {
269
      JPanel jpanel1 = new JPanel();
270
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE");
271
      CellConstraints cc = new CellConstraints();
272
      jpanel1.setLayout(formlayout1);
273

    
274
      btnTagsNew.setActionCommand("_New");
275
      btnTagsNew.setName("btnTagsNew");
276
      btnTagsNew.setText("_New");
277
      jpanel1.add(btnTagsNew,cc.xy(2,1));
278

    
279
      btnTagsDelete.setActionCommand("_Delete");
280
      btnTagsDelete.setName("btnTagsDelete");
281
      btnTagsDelete.setText("_Delete");
282
      jpanel1.add(btnTagsDelete,cc.xy(2,3));
283

    
284
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
285
      return jpanel1;
286
   }
287

    
288
   public JPanel creategridTagsItem()
289
   {
290
      gridTagsItem.setName("gridTagsItem");
291
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
292
      CellConstraints cc = new CellConstraints();
293
      gridTagsItem.setLayout(formlayout1);
294

    
295
      gridTagsItem.add(createPanel3(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
296
      gridTagsItem.add(creategrdTagsItemView(),cc.xy(1,1));
297
      addFillComponents(gridTagsItem,new int[]{ 1,2,3 },new int[]{ 1 });
298
      return gridTagsItem;
299
   }
300

    
301
   public JPanel createPanel3()
302
   {
303
      JPanel jpanel1 = new JPanel();
304
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
305
      CellConstraints cc = new CellConstraints();
306
      jpanel1.setLayout(formlayout1);
307

    
308
      btnTagsAccept.setActionCommand("JButton");
309
      btnTagsAccept.setName("btnTagsAccept");
310
      btnTagsAccept.setText("Accept");
311
      jpanel1.add(btnTagsAccept,cc.xy(2,3));
312

    
313
      btnTagsDiscard.setActionCommand("JButton");
314
      btnTagsDiscard.setName("btnTagsDiscard");
315
      btnTagsDiscard.setText("_Discard");
316
      jpanel1.add(btnTagsDiscard,cc.xy(2,5));
317

    
318
      btnTagsModify.setActionCommand("JButton");
319
      btnTagsModify.setName("btnTagsModify");
320
      btnTagsModify.setText("_Modify");
321
      jpanel1.add(btnTagsModify,cc.xy(2,1));
322

    
323
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
324
      return jpanel1;
325
   }
326

    
327
   public JPanel creategrdTagsItemView()
328
   {
329
      grdTagsItemView.setName("grdTagsItemView");
330
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
331
      CellConstraints cc = new CellConstraints();
332
      grdTagsItemView.setLayout(formlayout1);
333

    
334
      lblTagsItemName.setName("lblTagsItemName");
335
      lblTagsItemName.setText("_Name");
336
      grdTagsItemView.add(lblTagsItemName,cc.xy(1,1));
337

    
338
      lblTagsItemValue.setName("lblTagsItemValue");
339
      lblTagsItemValue.setText("_Value");
340
      grdTagsItemView.add(lblTagsItemValue,cc.xy(1,3));
341

    
342
      cboTagsItemName.setName("cboTagsItemName");
343
      grdTagsItemView.add(cboTagsItemName,cc.xy(3,1));
344

    
345
      cboTagsItemValue.setEditable(true);
346
      cboTagsItemValue.setName("cboTagsItemValue");
347
      cboTagsItemValue.setRequestFocusEnabled(false);
348
      grdTagsItemView.add(cboTagsItemValue,cc.xy(3,3));
349

    
350
      lblTagsItemNotes.setName("lblTagsItemNotes");
351
      lblTagsItemNotes.setText("_Notes");
352
      grdTagsItemView.add(lblTagsItemNotes,new CellConstraints(1,5,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
353

    
354
      lblTagsItemNotesValue.setName("lblTagsItemNotesValue");
355
      grdTagsItemView.add(lblTagsItemNotesValue,cc.xy(3,5));
356

    
357
      addFillComponents(grdTagsItemView,new int[]{ 2 },new int[]{ 2,4 });
358
      return grdTagsItemView;
359
   }
360

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

    
368
      jpanel1.add(creategridAttributes(),cc.xy(2,2));
369
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
370
      return jpanel1;
371
   }
372

    
373
   public JPanel creategridAttributes()
374
   {
375
      gridAttributes.setName("gridAttributes");
376
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)");
377
      CellConstraints cc = new CellConstraints();
378
      gridAttributes.setLayout(formlayout1);
379

    
380
      gridAttributes.add(horizontallinecomponent2,cc.xy(1,2));
381

    
382
      gridAttributes.add(creategridAttributesTable(),cc.xy(1,1));
383
      gridAttributes.add(creategridAttributesDetail(),cc.xy(1,3));
384
      addFillComponents(gridAttributes,new int[]{ 1 },new int[]{ 1,3 });
385
      return gridAttributes;
386
   }
387

    
388
   public JPanel creategridAttributesTable()
389
   {
390
      gridAttributesTable.setName("gridAttributesTable");
391
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
392
      CellConstraints cc = new CellConstraints();
393
      gridAttributesTable.setLayout(formlayout1);
394

    
395
      tblFields.setName("tblFields");
396
      JScrollPane jscrollpane1 = new JScrollPane();
397
      jscrollpane1.setViewportView(tblFields);
398
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
399
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
400
      gridAttributesTable.add(jscrollpane1,cc.xy(1,1));
401

    
402
      gridAttributesTable.add(createPanel5(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
403
      addFillComponents(gridAttributesTable,new int[]{ 2,3 },new int[0]);
404
      return gridAttributesTable;
405
   }
406

    
407
   public JPanel createPanel5()
408
   {
409
      JPanel jpanel1 = new JPanel();
410
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)");
411
      CellConstraints cc = new CellConstraints();
412
      jpanel1.setLayout(formlayout1);
413

    
414
      btnNew.setActionCommand("_New");
415
      btnNew.setName("btnNew");
416
      btnNew.setText("_New");
417
      jpanel1.add(btnNew,cc.xy(2,1));
418

    
419
      btnDelete.setActionCommand("_Delete");
420
      btnDelete.setName("btnDelete");
421
      btnDelete.setText("_Delete");
422
      jpanel1.add(btnDelete,cc.xy(2,3));
423

    
424
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
425
      return jpanel1;
426
   }
427

    
428
   public JPanel creategridAttributesDetail()
429
   {
430
      gridAttributesDetail.setName("gridAttributesDetail");
431
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
432
      CellConstraints cc = new CellConstraints();
433
      gridAttributesDetail.setLayout(formlayout1);
434

    
435
      pnlField.setName("pnlField");
436
      gridAttributesDetail.add(pnlField,cc.xy(1,1));
437

    
438
      gridAttributesDetail.add(createPanel6(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
439
      addFillComponents(gridAttributesDetail,new int[]{ 2,3 },new int[0]);
440
      return gridAttributesDetail;
441
   }
442

    
443
   public JPanel createPanel6()
444
   {
445
      JPanel jpanel1 = new JPanel();
446
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
447
      CellConstraints cc = new CellConstraints();
448
      jpanel1.setLayout(formlayout1);
449

    
450
      btnFormFieldAccept.setActionCommand("JButton");
451
      btnFormFieldAccept.setName("btnFormFieldAccept");
452
      btnFormFieldAccept.setText("Accept");
453
      jpanel1.add(btnFormFieldAccept,cc.xy(2,3));
454

    
455
      btnFormFieldDiscard.setActionCommand("JButton");
456
      btnFormFieldDiscard.setName("btnFormFieldDiscard");
457
      btnFormFieldDiscard.setText("_Discard");
458
      jpanel1.add(btnFormFieldDiscard,cc.xy(2,5));
459

    
460
      btnFormFieldModify.setActionCommand("JButton");
461
      btnFormFieldModify.setName("btnFormFieldModify");
462
      btnFormFieldModify.setText("_Modify");
463
      jpanel1.add(btnFormFieldModify,cc.xy(2,1));
464

    
465
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
466
      return jpanel1;
467
   }
468

    
469
   public JPanel createPanel7()
470
   {
471
      JPanel jpanel1 = new JPanel();
472
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE");
473
      CellConstraints cc = new CellConstraints();
474
      jpanel1.setLayout(formlayout1);
475

    
476
      chkRulesValidateFeatureBeforeInsert.setActionCommand("_Validate_features_before_insert");
477
      chkRulesValidateFeatureBeforeInsert.setName("chkRulesValidateFeatureBeforeInsert");
478
      chkRulesValidateFeatureBeforeInsert.setText("_Validate_features_before_insert");
479
      jpanel1.add(chkRulesValidateFeatureBeforeInsert,cc.xy(2,4));
480

    
481
      chkRulesValidateFeaturesAtFinishEditing.setActionCommand("_Validate_features_at_finish_editing");
482
      chkRulesValidateFeaturesAtFinishEditing.setName("chkRulesValidateFeaturesAtFinishEditing");
483
      chkRulesValidateFeaturesAtFinishEditing.setText("_Validate_features_at_finish_editing");
484
      jpanel1.add(chkRulesValidateFeaturesAtFinishEditing,cc.xy(2,6));
485

    
486
      lblRulesDefaultRules.setName("lblRulesDefaultRules");
487
      lblRulesDefaultRules.setText("_Default_rules");
488
      jpanel1.add(lblRulesDefaultRules,cc.xywh(2,2,3,1));
489

    
490
      lblRulesCustomRules.setName("lblRulesCustomRules");
491
      lblRulesCustomRules.setText("_Custom_rules");
492
      jpanel1.add(lblRulesCustomRules,cc.xywh(2,7,3,1));
493

    
494
      jpanel1.add(creategridRules(),cc.xywh(2,9,3,1));
495
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10 });
496
      return jpanel1;
497
   }
498

    
499
   public JPanel creategridRules()
500
   {
501
      gridRules.setName("gridRules");
502
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:GROW(1.0)");
503
      CellConstraints cc = new CellConstraints();
504
      gridRules.setLayout(formlayout1);
505

    
506
      gridRules.add(creategridRulesTable(),cc.xy(1,1));
507
      gridRules.add(creategridRulesDetail(),cc.xy(1,2));
508
      addFillComponents(gridRules,new int[]{ 1 },new int[]{ 1,2 });
509
      return gridRules;
510
   }
511

    
512
   public JPanel creategridRulesTable()
513
   {
514
      gridRulesTable.setName("gridRulesTable");
515
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
516
      CellConstraints cc = new CellConstraints();
517
      gridRulesTable.setLayout(formlayout1);
518

    
519
      tblRules.setName("tblRules");
520
      JScrollPane jscrollpane1 = new JScrollPane();
521
      jscrollpane1.setViewportView(tblRules);
522
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
523
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
524
      gridRulesTable.add(jscrollpane1,cc.xy(1,1));
525

    
526
      gridRulesTable.add(createPanel8(),cc.xy(3,1));
527
      addFillComponents(gridRulesTable,new int[]{ 2,3 },new int[0]);
528
      return gridRulesTable;
529
   }
530

    
531
   public JPanel createPanel8()
532
   {
533
      JPanel jpanel1 = new JPanel();
534
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)");
535
      CellConstraints cc = new CellConstraints();
536
      jpanel1.setLayout(formlayout1);
537

    
538
      btnRulesNew.setActionCommand("_New");
539
      btnRulesNew.setName("btnRulesNew");
540
      btnRulesNew.setText("_New");
541
      jpanel1.add(btnRulesNew,cc.xy(2,1));
542

    
543
      btnRulesDelete.setActionCommand("_Delete");
544
      btnRulesDelete.setName("btnRulesDelete");
545
      btnRulesDelete.setText("_Delete");
546
      jpanel1.add(btnRulesDelete,cc.xy(2,3));
547

    
548
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
549
      return jpanel1;
550
   }
551

    
552
   public JPanel creategridRulesDetail()
553
   {
554
      gridRulesDetail.setName("gridRulesDetail");
555
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
556
      CellConstraints cc = new CellConstraints();
557
      gridRulesDetail.setLayout(formlayout1);
558

    
559
      gridRulesDetail.add(createPanel9(),cc.xy(1,1));
560
      gridRulesDetail.add(createPanel12(),cc.xy(3,1));
561
      addFillComponents(gridRulesDetail,new int[]{ 1,2,3 },new int[]{ 1 });
562
      return gridRulesDetail;
563
   }
564

    
565
   public JPanel createPanel9()
566
   {
567
      JPanel jpanel1 = new JPanel();
568
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU: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(1.0)");
569
      CellConstraints cc = new CellConstraints();
570
      jpanel1.setLayout(formlayout1);
571

    
572
      lblRuleName.setName("lblRuleName");
573
      lblRuleName.setText("_Name");
574
      jpanel1.add(lblRuleName,cc.xy(1,1));
575

    
576
      lblRuleDescription.setName("lblRuleDescription");
577
      lblRuleDescription.setText("_Description");
578
      jpanel1.add(lblRuleDescription,cc.xy(1,3));
579

    
580
      lblRuleCheckAtFinishEditing.setName("lblRuleCheckAtFinishEditing");
581
      lblRuleCheckAtFinishEditing.setText("_Check_at_finish_editing");
582
      jpanel1.add(lblRuleCheckAtFinishEditing,cc.xy(1,5));
583

    
584
      lblRuleCheckAtUpdate.setName("lblRuleCheckAtUpdate");
585
      lblRuleCheckAtUpdate.setText("_Check_at_insert");
586
      jpanel1.add(lblRuleCheckAtUpdate,cc.xy(1,7));
587

    
588
      lblRuleValidation.setName("lblRuleValidation");
589
      lblRuleValidation.setText("_Validation");
590
      jpanel1.add(lblRuleValidation,new CellConstraints(1,9,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
591

    
592
      txtRuleName.setName("txtRuleName");
593
      jpanel1.add(txtRuleName,cc.xy(3,1));
594

    
595
      chkRuleCheckAtFinishEditing.setName("chkRuleCheckAtFinishEditing");
596
      jpanel1.add(chkRuleCheckAtFinishEditing,cc.xy(3,5));
597

    
598
      chkRuleCheckAtUpdate.setName("chkRuleCheckAtUpdate");
599
      jpanel1.add(chkRuleCheckAtUpdate,cc.xy(3,7));
600

    
601
      txtRuleDescription.setName("txtRuleDescription");
602
      jpanel1.add(txtRuleDescription,cc.xy(3,3));
603

    
604
      jpanel1.add(createPanel10(),cc.xy(3,9));
605
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2,4,6,8 });
606
      return jpanel1;
607
   }
608

    
609
   public JPanel createPanel10()
610
   {
611
      JPanel jpanel1 = new JPanel();
612
      FormLayout formlayout1 = new FormLayout("FILL:200PX:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
613
      CellConstraints cc = new CellConstraints();
614
      jpanel1.setLayout(formlayout1);
615

    
616
      txtRuleValidation.setName("txtRuleValidation");
617
      JScrollPane jscrollpane1 = new JScrollPane();
618
      jscrollpane1.setViewportView(txtRuleValidation);
619
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
620
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
621
      jpanel1.add(jscrollpane1,cc.xy(1,1));
622

    
623
      jpanel1.add(createPanel11(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
624
      addFillComponents(jpanel1,new int[]{ 2,3 },new int[0]);
625
      return jpanel1;
626
   }
627

    
628
   public JPanel createPanel11()
629
   {
630
      JPanel jpanel1 = new JPanel();
631
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
632
      CellConstraints cc = new CellConstraints();
633
      jpanel1.setLayout(formlayout1);
634

    
635
      btnRuleValidation.setActionCommand("...");
636
      btnRuleValidation.setName("btnRuleValidation");
637
      btnRuleValidation.setOpaque(false);
638
      btnRuleValidation.setText("...");
639
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
640
      btnRuleValidation.setBorder(emptyborder1);
641
      jpanel1.add(btnRuleValidation,cc.xy(1,1));
642

    
643
      btnRuleValidationHistory.setActionCommand("...");
644
      btnRuleValidationHistory.setName("btnRuleValidationHistory");
645
      btnRuleValidationHistory.setOpaque(false);
646
      btnRuleValidationHistory.setText("...");
647
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
648
      btnRuleValidationHistory.setBorder(emptyborder2);
649
      jpanel1.add(btnRuleValidationHistory,cc.xy(1,3));
650

    
651
      btnRuleValidationBookmarks.setActionCommand("...");
652
      btnRuleValidationBookmarks.setName("btnRuleValidationBookmarks");
653
      btnRuleValidationBookmarks.setOpaque(false);
654
      btnRuleValidationBookmarks.setText("...");
655
      EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
656
      btnRuleValidationBookmarks.setBorder(emptyborder3);
657
      jpanel1.add(btnRuleValidationBookmarks,cc.xy(1,5));
658

    
659
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4 });
660
      return jpanel1;
661
   }
662

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

    
670
      btnRuleFormFieldAccept.setActionCommand("JButton");
671
      btnRuleFormFieldAccept.setName("btnRuleFormFieldAccept");
672
      btnRuleFormFieldAccept.setText("Accept");
673
      jpanel1.add(btnRuleFormFieldAccept,cc.xy(2,3));
674

    
675
      btnRuleFormFieldDiscard.setActionCommand("JButton");
676
      btnRuleFormFieldDiscard.setName("btnRuleFormFieldDiscard");
677
      btnRuleFormFieldDiscard.setText("_Discard");
678
      jpanel1.add(btnRuleFormFieldDiscard,cc.xy(2,5));
679

    
680
      btnRuleFormFieldModify.setActionCommand("JButton");
681
      btnRuleFormFieldModify.setName("btnRuleFormFieldModify");
682
      btnRuleFormFieldModify.setText("_Modify");
683
      jpanel1.add(btnRuleFormFieldModify,cc.xy(2,1));
684

    
685
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5,6 });
686
      return jpanel1;
687
   }
688

    
689
   public JPanel createPanel13()
690
   {
691
      JPanel jpanel1 = new JPanel();
692
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
693
      CellConstraints cc = new CellConstraints();
694
      jpanel1.setLayout(formlayout1);
695

    
696
      pnlCfgActions.setName("pnlCfgActions");
697
      pnlCfgActions.setOpaque(false);
698
      jpanel1.add(pnlCfgActions,cc.xy(2,1));
699

    
700
      addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 });
701
      return jpanel1;
702
   }
703

    
704
   /**
705
    * Initializer
706
    */
707
   protected void initializePanel()
708
   {
709
      setLayout(new BorderLayout());
710
      add(createPanel(), BorderLayout.CENTER);
711
   }
712

    
713

    
714
}