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

History | View | Annotate | Download (24.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
   JPanel gridAttributes = new JPanel();
32
   HorizontalLineComponent horizontallinecomponent1 = new HorizontalLineComponent();
33
   JPanel gridAttributesTable = new JPanel();
34
   JTable tblFields = new JTable();
35
   JButton btnNew = new JButton();
36
   JButton btnDelete = new JButton();
37
   JPanel gridAttributesDetail = new JPanel();
38
   JPanel pnlField = new JPanel();
39
   JButton btnFormFieldAccept = new JButton();
40
   JButton btnFormFieldDiscard = new JButton();
41
   JButton btnFormFieldModify = new JButton();
42
   JLabel lblLabel = new JLabel();
43
   JLabel lblDescription = new JLabel();
44
   JTextField txtLabel = new JTextField();
45
   JTextArea txtDescription = new JTextArea();
46
   JLabel lblTags = new JLabel();
47
   JLabel lblTagsName = new JLabel();
48
   JLabel lblTagsValue = new JLabel();
49
   JComboBox cboTagsName = new JComboBox();
50
   JTable tblTags = new JTable();
51
   JLabel lblTagsDescription = new JLabel();
52
   JComboBox cboTagsValue = new JComboBox();
53
   JButton btnTagsAdd = new JButton();
54
   JButton btnTagsUpdate = new JButton();
55
   JButton btnTagsRemove = new JButton();
56
   JCheckBox chkRulesValidateFeatureBeforeInsert = new JCheckBox();
57
   JCheckBox chkRulesValidateFeaturesAtFinishEditing = new JCheckBox();
58
   TitledSeparator lblRulesDefaultRules = new TitledSeparator();
59
   TitledSeparator lblRulesCustomRules = new TitledSeparator();
60
   JPanel gridRules = new JPanel();
61
   JPanel gridRulesTable = new JPanel();
62
   JTable tblRules = new JTable();
63
   JButton btnRulesNew = new JButton();
64
   JButton btnRulesDelete = new JButton();
65
   JPanel gridRulesDetail = new JPanel();
66
   JLabel lblRuleName = new JLabel();
67
   JLabel lblRuleDescription = new JLabel();
68
   JLabel lblRuleCheckAtFinishEditing = new JLabel();
69
   JLabel lblRuleCheckAtUpdate = new JLabel();
70
   JLabel lblRuleValidation = new JLabel();
71
   JTextField txtRuleName = new JTextField();
72
   JCheckBox chkRuleCheckAtFinishEditing = new JCheckBox();
73
   JCheckBox chkRuleCheckAtUpdate = new JCheckBox();
74
   JTextField txtRuleDescription = new JTextField();
75
   JTextField txtRuleValidation = new JTextField();
76
   JButton btnRuleValidation = new JButton();
77
   JButton btnRuleValidationHistory = new JButton();
78
   JButton btnRuleValidationBookmarks = new JButton();
79
   JButton btnRuleFormFieldAccept = new JButton();
80
   JButton btnRuleFormFieldDiscard = new JButton();
81
   JButton btnRuleFormFieldModify = new JButton();
82
   JPanel pnlCfgActions = new JPanel();
83

    
84
   /**
85
    * Default constructor
86
    */
87
   public DefaultFeatureTypePanelView()
88
   {
89
      initializePanel();
90
   }
91

    
92
   /**
93
    * Adds fill components to empty cells in the first row and first column of the grid.
94
    * This ensures that the grid spacing will be the same as shown in the designer.
95
    * @param cols an array of column indices in the first row where fill components should be added.
96
    * @param rows an array of row indices in the first column where fill components should be added.
97
    */
98
   void addFillComponents( Container panel, int[] cols, int[] rows )
99
   {
100
      Dimension filler = new Dimension(10,10);
101

    
102
      boolean filled_cell_11 = false;
103
      CellConstraints cc = new CellConstraints();
104
      if ( cols.length > 0 && rows.length > 0 )
105
      {
106
         if ( cols[0] == 1 && rows[0] == 1 )
107
         {
108
            /** add a rigid area  */
109
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
110
            filled_cell_11 = true;
111
         }
112
      }
113

    
114
      for( int index = 0; index < cols.length; index++ )
115
      {
116
         if ( cols[index] == 1 && filled_cell_11 )
117
         {
118
            continue;
119
         }
120
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
121
      }
122

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

    
132
   }
133

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

    
159
   /**
160
    * Method for recalculating the component orientation for 
161
    * right-to-left Locales.
162
    * @param orientation the component orientation to be applied
163
    */
164
   public void applyComponentOrientation( ComponentOrientation orientation )
165
   {
166
      // Not yet implemented...
167
      // I18NUtils.applyComponentOrientation(this, orientation);
168
      super.applyComponentOrientation(orientation);
169
   }
170

    
171
   public JPanel createPanel()
172
   {
173
      JPanel jpanel1 = new JPanel();
174
      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");
175
      CellConstraints cc = new CellConstraints();
176
      jpanel1.setLayout(formlayout1);
177

    
178
      tabFeatureType.setName("tabFeatureType");
179
      tabFeatureType.addTab("_Main",null,createPanel1());
180
      tabFeatureType.addTab("_Visualization",null,createPanel4());
181
      tabFeatureType.addTab("_Rules",null,createPanel7());
182
      jpanel1.add(tabFeatureType,cc.xy(2,3));
183

    
184
      jpanel1.add(createPanel12(),cc.xy(2,2));
185
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4 });
186
      return jpanel1;
187
   }
188

    
189
   public JPanel createPanel1()
190
   {
191
      JPanel jpanel1 = new JPanel();
192
      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");
193
      CellConstraints cc = new CellConstraints();
194
      jpanel1.setLayout(formlayout1);
195

    
196
      jpanel1.add(creategridAttributes(),cc.xy(2,2));
197
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
198
      return jpanel1;
199
   }
200

    
201
   public JPanel creategridAttributes()
202
   {
203
      gridAttributes.setName("gridAttributes");
204
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
205
      CellConstraints cc = new CellConstraints();
206
      gridAttributes.setLayout(formlayout1);
207

    
208
      gridAttributes.add(horizontallinecomponent1,cc.xy(1,2));
209

    
210
      gridAttributes.add(creategridAttributesTable(),cc.xy(1,1));
211
      gridAttributes.add(creategridAttributesDetail(),cc.xy(1,3));
212
      addFillComponents(gridAttributes,new int[]{ 1 },new int[]{ 1,3 });
213
      return gridAttributes;
214
   }
215

    
216
   public JPanel creategridAttributesTable()
217
   {
218
      gridAttributesTable.setName("gridAttributesTable");
219
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
220
      CellConstraints cc = new CellConstraints();
221
      gridAttributesTable.setLayout(formlayout1);
222

    
223
      tblFields.setName("tblFields");
224
      JScrollPane jscrollpane1 = new JScrollPane();
225
      jscrollpane1.setViewportView(tblFields);
226
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
227
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
228
      gridAttributesTable.add(jscrollpane1,cc.xy(1,1));
229

    
230
      gridAttributesTable.add(createPanel2(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
231
      addFillComponents(gridAttributesTable,new int[]{ 2,3 },new int[0]);
232
      return gridAttributesTable;
233
   }
234

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

    
242
      btnNew.setActionCommand("_New");
243
      btnNew.setName("btnNew");
244
      btnNew.setText("_New");
245
      jpanel1.add(btnNew,cc.xy(2,1));
246

    
247
      btnDelete.setActionCommand("_Delete");
248
      btnDelete.setName("btnDelete");
249
      btnDelete.setText("_Delete");
250
      jpanel1.add(btnDelete,cc.xy(2,3));
251

    
252
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
253
      return jpanel1;
254
   }
255

    
256
   public JPanel creategridAttributesDetail()
257
   {
258
      gridAttributesDetail.setName("gridAttributesDetail");
259
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
260
      CellConstraints cc = new CellConstraints();
261
      gridAttributesDetail.setLayout(formlayout1);
262

    
263
      pnlField.setName("pnlField");
264
      gridAttributesDetail.add(pnlField,cc.xy(1,1));
265

    
266
      gridAttributesDetail.add(createPanel3(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
267
      addFillComponents(gridAttributesDetail,new int[]{ 2,3 },new int[0]);
268
      return gridAttributesDetail;
269
   }
270

    
271
   public JPanel createPanel3()
272
   {
273
      JPanel jpanel1 = new JPanel();
274
      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");
275
      CellConstraints cc = new CellConstraints();
276
      jpanel1.setLayout(formlayout1);
277

    
278
      btnFormFieldAccept.setActionCommand("JButton");
279
      btnFormFieldAccept.setName("btnFormFieldAccept");
280
      btnFormFieldAccept.setText("Accept");
281
      jpanel1.add(btnFormFieldAccept,cc.xy(2,3));
282

    
283
      btnFormFieldDiscard.setActionCommand("JButton");
284
      btnFormFieldDiscard.setName("btnFormFieldDiscard");
285
      btnFormFieldDiscard.setText("_Discard");
286
      jpanel1.add(btnFormFieldDiscard,cc.xy(2,5));
287

    
288
      btnFormFieldModify.setActionCommand("JButton");
289
      btnFormFieldModify.setName("btnFormFieldModify");
290
      btnFormFieldModify.setText("_Modify");
291
      jpanel1.add(btnFormFieldModify,cc.xy(2,1));
292

    
293
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
294
      return jpanel1;
295
   }
296

    
297
   public JPanel createPanel4()
298
   {
299
      JPanel jpanel1 = new JPanel();
300
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT: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");
301
      CellConstraints cc = new CellConstraints();
302
      jpanel1.setLayout(formlayout1);
303

    
304
      lblLabel.setName("lblLabel");
305
      lblLabel.setText("_Label");
306
      jpanel1.add(lblLabel,cc.xy(2,2));
307

    
308
      lblDescription.setName("lblDescription");
309
      lblDescription.setText("_Description");
310
      lblDescription.setVerticalAlignment(JLabel.TOP);
311
      jpanel1.add(lblDescription,new CellConstraints(2,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
312

    
313
      txtLabel.setName("txtLabel");
314
      jpanel1.add(txtLabel,cc.xy(4,2));
315

    
316
      txtDescription.setName("txtDescription");
317
      JScrollPane jscrollpane1 = new JScrollPane();
318
      jscrollpane1.setViewportView(txtDescription);
319
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
320
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
321
      jpanel1.add(jscrollpane1,new CellConstraints(4,4,1,1,CellConstraints.DEFAULT,CellConstraints.FILL));
322

    
323
      lblTags.setName("lblTags");
324
      lblTags.setText("_Tags");
325
      lblTags.setVerticalAlignment(JLabel.TOP);
326
      jpanel1.add(lblTags,cc.xy(2,6));
327

    
328
      jpanel1.add(createPanel5(),cc.xy(4,6));
329
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
330
      return jpanel1;
331
   }
332

    
333
   public JPanel createPanel5()
334
   {
335
      JPanel jpanel1 = new JPanel();
336
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:GROW(0.1)");
337
      CellConstraints cc = new CellConstraints();
338
      jpanel1.setLayout(formlayout1);
339

    
340
      lblTagsName.setName("lblTagsName");
341
      lblTagsName.setText("_Name");
342
      jpanel1.add(lblTagsName,cc.xy(1,3));
343

    
344
      lblTagsValue.setName("lblTagsValue");
345
      lblTagsValue.setText("_Value");
346
      jpanel1.add(lblTagsValue,cc.xy(1,5));
347

    
348
      cboTagsName.setEditable(true);
349
      cboTagsName.setName("cboTagsName");
350
      jpanel1.add(cboTagsName,cc.xy(3,3));
351

    
352
      tblTags.setName("tblTags");
353
      JScrollPane jscrollpane1 = new JScrollPane();
354
      jscrollpane1.setViewportView(tblTags);
355
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
356
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
357
      jpanel1.add(jscrollpane1,cc.xywh(1,1,3,1));
358

    
359
      lblTagsDescription.setName("lblTagsDescription");
360
      jpanel1.add(lblTagsDescription,cc.xy(3,6));
361

    
362
      cboTagsValue.setEditable(true);
363
      cboTagsValue.setName("cboTagsValue");
364
      jpanel1.add(cboTagsValue,cc.xy(3,5));
365

    
366
      jpanel1.add(createPanel6(),cc.xywh(5,1,1,5));
367
      addFillComponents(jpanel1,new int[]{ 2,3,4,5 },new int[]{ 2,4,6 });
368
      return jpanel1;
369
   }
370

    
371
   public JPanel createPanel6()
372
   {
373
      JPanel jpanel1 = new JPanel();
374
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
375
      CellConstraints cc = new CellConstraints();
376
      jpanel1.setLayout(formlayout1);
377

    
378
      btnTagsAdd.setActionCommand("_Add");
379
      btnTagsAdd.setName("btnTagsAdd");
380
      btnTagsAdd.setText("_Add");
381
      jpanel1.add(btnTagsAdd,cc.xy(1,1));
382

    
383
      btnTagsUpdate.setActionCommand("_Update");
384
      btnTagsUpdate.setName("btnTagsUpdate");
385
      btnTagsUpdate.setText("_Update");
386
      jpanel1.add(btnTagsUpdate,cc.xy(1,3));
387

    
388
      btnTagsRemove.setActionCommand("_Remove");
389
      btnTagsRemove.setName("btnTagsRemove");
390
      btnTagsRemove.setText("_Remove");
391
      jpanel1.add(btnTagsRemove,cc.xy(1,5));
392

    
393
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4 });
394
      return jpanel1;
395
   }
396

    
397
   public JPanel createPanel7()
398
   {
399
      JPanel jpanel1 = new JPanel();
400
      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");
401
      CellConstraints cc = new CellConstraints();
402
      jpanel1.setLayout(formlayout1);
403

    
404
      chkRulesValidateFeatureBeforeInsert.setActionCommand("_Validate_features_before_insert");
405
      chkRulesValidateFeatureBeforeInsert.setName("chkRulesValidateFeatureBeforeInsert");
406
      chkRulesValidateFeatureBeforeInsert.setText("_Validate_features_before_insert");
407
      jpanel1.add(chkRulesValidateFeatureBeforeInsert,cc.xy(2,4));
408

    
409
      chkRulesValidateFeaturesAtFinishEditing.setActionCommand("_Validate_features_at_finish_editing");
410
      chkRulesValidateFeaturesAtFinishEditing.setName("chkRulesValidateFeaturesAtFinishEditing");
411
      chkRulesValidateFeaturesAtFinishEditing.setText("_Validate_features_at_finish_editing");
412
      jpanel1.add(chkRulesValidateFeaturesAtFinishEditing,cc.xy(2,6));
413

    
414
      lblRulesDefaultRules.setName("lblRulesDefaultRules");
415
      lblRulesDefaultRules.setText("_Default_rules");
416
      jpanel1.add(lblRulesDefaultRules,cc.xywh(2,2,3,1));
417

    
418
      lblRulesCustomRules.setName("lblRulesCustomRules");
419
      lblRulesCustomRules.setText("_Custom_rules");
420
      jpanel1.add(lblRulesCustomRules,cc.xywh(2,7,3,1));
421

    
422
      jpanel1.add(creategridRules(),cc.xywh(2,9,3,1));
423
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10 });
424
      return jpanel1;
425
   }
426

    
427
   public JPanel creategridRules()
428
   {
429
      gridRules.setName("gridRules");
430
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:GROW(1.0)");
431
      CellConstraints cc = new CellConstraints();
432
      gridRules.setLayout(formlayout1);
433

    
434
      gridRules.add(creategridRulesTable(),cc.xy(1,1));
435
      gridRules.add(creategridRulesDetail(),cc.xy(1,2));
436
      addFillComponents(gridRules,new int[]{ 1 },new int[]{ 1,2 });
437
      return gridRules;
438
   }
439

    
440
   public JPanel creategridRulesTable()
441
   {
442
      gridRulesTable.setName("gridRulesTable");
443
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
444
      CellConstraints cc = new CellConstraints();
445
      gridRulesTable.setLayout(formlayout1);
446

    
447
      tblRules.setEnabled(false);
448
      tblRules.setName("tblRules");
449
      JScrollPane jscrollpane1 = new JScrollPane();
450
      jscrollpane1.setViewportView(tblRules);
451
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
452
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
453
      gridRulesTable.add(jscrollpane1,cc.xy(1,1));
454

    
455
      gridRulesTable.add(createPanel8(),cc.xy(3,1));
456
      addFillComponents(gridRulesTable,new int[]{ 2,3 },new int[0]);
457
      return gridRulesTable;
458
   }
459

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

    
467
      btnRulesNew.setActionCommand("_New");
468
      btnRulesNew.setName("btnRulesNew");
469
      btnRulesNew.setText("_New");
470
      jpanel1.add(btnRulesNew,cc.xy(2,1));
471

    
472
      btnRulesDelete.setActionCommand("_Delete");
473
      btnRulesDelete.setName("btnRulesDelete");
474
      btnRulesDelete.setText("_Delete");
475
      jpanel1.add(btnRulesDelete,cc.xy(2,3));
476

    
477
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
478
      return jpanel1;
479
   }
480

    
481
   public JPanel creategridRulesDetail()
482
   {
483
      gridRulesDetail.setName("gridRulesDetail");
484
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
485
      CellConstraints cc = new CellConstraints();
486
      gridRulesDetail.setLayout(formlayout1);
487

    
488
      gridRulesDetail.add(createPanel9(),cc.xy(1,1));
489
      gridRulesDetail.add(createPanel11(),cc.xy(3,1));
490
      addFillComponents(gridRulesDetail,new int[]{ 1,2,3 },new int[]{ 1 });
491
      return gridRulesDetail;
492
   }
493

    
494
   public JPanel createPanel9()
495
   {
496
      JPanel jpanel1 = new JPanel();
497
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,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,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
498
      CellConstraints cc = new CellConstraints();
499
      jpanel1.setLayout(formlayout1);
500

    
501
      lblRuleName.setName("lblRuleName");
502
      lblRuleName.setText("_Name");
503
      jpanel1.add(lblRuleName,cc.xy(1,1));
504

    
505
      lblRuleDescription.setName("lblRuleDescription");
506
      lblRuleDescription.setText("_Description");
507
      jpanel1.add(lblRuleDescription,cc.xy(1,3));
508

    
509
      lblRuleCheckAtFinishEditing.setName("lblRuleCheckAtFinishEditing");
510
      lblRuleCheckAtFinishEditing.setText("_Check_at_finish_editing");
511
      jpanel1.add(lblRuleCheckAtFinishEditing,cc.xy(1,5));
512

    
513
      lblRuleCheckAtUpdate.setName("lblRuleCheckAtUpdate");
514
      lblRuleCheckAtUpdate.setText("_Check_at_insert");
515
      jpanel1.add(lblRuleCheckAtUpdate,cc.xy(1,7));
516

    
517
      lblRuleValidation.setName("lblRuleValidation");
518
      lblRuleValidation.setText("_Validation");
519
      jpanel1.add(lblRuleValidation,cc.xy(1,9));
520

    
521
      txtRuleName.setName("txtRuleName");
522
      jpanel1.add(txtRuleName,cc.xy(3,1));
523

    
524
      chkRuleCheckAtFinishEditing.setName("chkRuleCheckAtFinishEditing");
525
      jpanel1.add(chkRuleCheckAtFinishEditing,cc.xy(3,5));
526

    
527
      chkRuleCheckAtUpdate.setName("chkRuleCheckAtUpdate");
528
      jpanel1.add(chkRuleCheckAtUpdate,cc.xy(3,7));
529

    
530
      txtRuleDescription.setName("txtRuleDescription");
531
      jpanel1.add(txtRuleDescription,cc.xy(3,3));
532

    
533
      jpanel1.add(createPanel10(),cc.xy(3,9));
534
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2,4,6,8 });
535
      return jpanel1;
536
   }
537

    
538
   public JPanel createPanel10()
539
   {
540
      JPanel jpanel1 = new JPanel();
541
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
542
      CellConstraints cc = new CellConstraints();
543
      jpanel1.setLayout(formlayout1);
544

    
545
      txtRuleValidation.setName("txtRuleValidation");
546
      jpanel1.add(txtRuleValidation,cc.xy(1,1));
547

    
548
      btnRuleValidation.setActionCommand("...");
549
      btnRuleValidation.setName("btnRuleValidation");
550
      btnRuleValidation.setText("...");
551
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
552
      btnRuleValidation.setBorder(emptyborder1);
553
      jpanel1.add(btnRuleValidation,cc.xy(3,1));
554

    
555
      btnRuleValidationHistory.setActionCommand("...");
556
      btnRuleValidationHistory.setName("btnRuleValidationHistory");
557
      btnRuleValidationHistory.setText("...");
558
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
559
      btnRuleValidationHistory.setBorder(emptyborder2);
560
      jpanel1.add(btnRuleValidationHistory,cc.xy(5,1));
561

    
562
      btnRuleValidationBookmarks.setActionCommand("...");
563
      btnRuleValidationBookmarks.setName("btnRuleValidationBookmarks");
564
      btnRuleValidationBookmarks.setText("...");
565
      EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
566
      btnRuleValidationBookmarks.setBorder(emptyborder3);
567
      jpanel1.add(btnRuleValidationBookmarks,cc.xy(7,1));
568

    
569
      addFillComponents(jpanel1,new int[]{ 2,4,6 },new int[0]);
570
      return jpanel1;
571
   }
572

    
573
   public JPanel createPanel11()
574
   {
575
      JPanel jpanel1 = new JPanel();
576
      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)");
577
      CellConstraints cc = new CellConstraints();
578
      jpanel1.setLayout(formlayout1);
579

    
580
      btnRuleFormFieldAccept.setActionCommand("JButton");
581
      btnRuleFormFieldAccept.setName("btnRuleFormFieldAccept");
582
      btnRuleFormFieldAccept.setText("Accept");
583
      jpanel1.add(btnRuleFormFieldAccept,cc.xy(2,3));
584

    
585
      btnRuleFormFieldDiscard.setActionCommand("JButton");
586
      btnRuleFormFieldDiscard.setName("btnRuleFormFieldDiscard");
587
      btnRuleFormFieldDiscard.setText("_Discard");
588
      jpanel1.add(btnRuleFormFieldDiscard,cc.xy(2,5));
589

    
590
      btnRuleFormFieldModify.setActionCommand("JButton");
591
      btnRuleFormFieldModify.setName("btnRuleFormFieldModify");
592
      btnRuleFormFieldModify.setText("_Modify");
593
      jpanel1.add(btnRuleFormFieldModify,cc.xy(2,1));
594

    
595
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5,6 });
596
      return jpanel1;
597
   }
598

    
599
   public JPanel createPanel12()
600
   {
601
      JPanel jpanel1 = new JPanel();
602
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
603
      CellConstraints cc = new CellConstraints();
604
      jpanel1.setLayout(formlayout1);
605

    
606
      pnlCfgActions.setName("pnlCfgActions");
607
      pnlCfgActions.setOpaque(false);
608
      jpanel1.add(pnlCfgActions,cc.xy(2,1));
609

    
610
      addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 });
611
      return jpanel1;
612
   }
613

    
614
   /**
615
    * Initializer
616
    */
617
   protected void initializePanel()
618
   {
619
      setLayout(new BorderLayout());
620
      add(createPanel(), BorderLayout.CENTER);
621
   }
622

    
623

    
624
}