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

History | View | Annotate | Download (28.6 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
   JPanel gridTags = new JPanel();
48
   HorizontalLineComponent horizontallinecomponent2 = new HorizontalLineComponent();
49
   JPanel gridTagsItems = new JPanel();
50
   JTable tblTagsItems = new JTable();
51
   JButton btnTagsNew = new JButton();
52
   JButton btnTagsDelete = new JButton();
53
   JPanel gridTagsItem = new JPanel();
54
   JButton btnTagsAccept = new JButton();
55
   JButton btnTagsDiscard = new JButton();
56
   JButton btnTagsModify = new JButton();
57
   JPanel grdTagsItemView = new JPanel();
58
   JLabel lblTagsItemName = new JLabel();
59
   JLabel lblTagsItemValue = new JLabel();
60
   JComboBox cboTagsItemName = new JComboBox();
61
   JComboBox cboTagsItemValue = new JComboBox();
62
   JLabel lblTagsItemNotes = new JLabel();
63
   JLabel lblTagsItemNotesValue = new JLabel();
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
   JButton btnRuleValidation = new JButton();
84
   JButton btnRuleValidationHistory = new JButton();
85
   JButton btnRuleValidationBookmarks = new JButton();
86
   JTextArea txtRuleValidation = new JTextArea();
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("_Columns",null,createPanel1());
188
      tabFeatureType.addTab("_Visualization",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:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE");
201
      CellConstraints cc = new CellConstraints();
202
      jpanel1.setLayout(formlayout1);
203

    
204
      jpanel1.add(creategridAttributes(),cc.xy(2,2));
205
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
206
      return jpanel1;
207
   }
208

    
209
   public JPanel creategridAttributes()
210
   {
211
      gridAttributes.setName("gridAttributes");
212
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
213
      CellConstraints cc = new CellConstraints();
214
      gridAttributes.setLayout(formlayout1);
215

    
216
      gridAttributes.add(horizontallinecomponent1,cc.xy(1,2));
217

    
218
      gridAttributes.add(creategridAttributesTable(),cc.xy(1,1));
219
      gridAttributes.add(creategridAttributesDetail(),cc.xy(1,3));
220
      addFillComponents(gridAttributes,new int[]{ 1 },new int[]{ 1,3 });
221
      return gridAttributes;
222
   }
223

    
224
   public JPanel creategridAttributesTable()
225
   {
226
      gridAttributesTable.setName("gridAttributesTable");
227
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
228
      CellConstraints cc = new CellConstraints();
229
      gridAttributesTable.setLayout(formlayout1);
230

    
231
      tblFields.setName("tblFields");
232
      JScrollPane jscrollpane1 = new JScrollPane();
233
      jscrollpane1.setViewportView(tblFields);
234
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
235
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
236
      gridAttributesTable.add(jscrollpane1,cc.xy(1,1));
237

    
238
      gridAttributesTable.add(createPanel2(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
239
      addFillComponents(gridAttributesTable,new int[]{ 2,3 },new int[0]);
240
      return gridAttributesTable;
241
   }
242

    
243
   public JPanel createPanel2()
244
   {
245
      JPanel jpanel1 = new JPanel();
246
      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)");
247
      CellConstraints cc = new CellConstraints();
248
      jpanel1.setLayout(formlayout1);
249

    
250
      btnNew.setActionCommand("_New");
251
      btnNew.setName("btnNew");
252
      btnNew.setText("_New");
253
      jpanel1.add(btnNew,cc.xy(2,1));
254

    
255
      btnDelete.setActionCommand("_Delete");
256
      btnDelete.setName("btnDelete");
257
      btnDelete.setText("_Delete");
258
      jpanel1.add(btnDelete,cc.xy(2,3));
259

    
260
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
261
      return jpanel1;
262
   }
263

    
264
   public JPanel creategridAttributesDetail()
265
   {
266
      gridAttributesDetail.setName("gridAttributesDetail");
267
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
268
      CellConstraints cc = new CellConstraints();
269
      gridAttributesDetail.setLayout(formlayout1);
270

    
271
      pnlField.setName("pnlField");
272
      gridAttributesDetail.add(pnlField,cc.xy(1,1));
273

    
274
      gridAttributesDetail.add(createPanel3(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
275
      addFillComponents(gridAttributesDetail,new int[]{ 2,3 },new int[0]);
276
      return gridAttributesDetail;
277
   }
278

    
279
   public JPanel createPanel3()
280
   {
281
      JPanel jpanel1 = new JPanel();
282
      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");
283
      CellConstraints cc = new CellConstraints();
284
      jpanel1.setLayout(formlayout1);
285

    
286
      btnFormFieldAccept.setActionCommand("JButton");
287
      btnFormFieldAccept.setName("btnFormFieldAccept");
288
      btnFormFieldAccept.setText("Accept");
289
      jpanel1.add(btnFormFieldAccept,cc.xy(2,3));
290

    
291
      btnFormFieldDiscard.setActionCommand("JButton");
292
      btnFormFieldDiscard.setName("btnFormFieldDiscard");
293
      btnFormFieldDiscard.setText("_Discard");
294
      jpanel1.add(btnFormFieldDiscard,cc.xy(2,5));
295

    
296
      btnFormFieldModify.setActionCommand("JButton");
297
      btnFormFieldModify.setName("btnFormFieldModify");
298
      btnFormFieldModify.setText("_Modify");
299
      jpanel1.add(btnFormFieldModify,cc.xy(2,1));
300

    
301
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
302
      return jpanel1;
303
   }
304

    
305
   public JPanel createPanel4()
306
   {
307
      JPanel jpanel1 = new JPanel();
308
      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");
309
      CellConstraints cc = new CellConstraints();
310
      jpanel1.setLayout(formlayout1);
311

    
312
      lblLabel.setName("lblLabel");
313
      lblLabel.setText("_Label");
314
      jpanel1.add(lblLabel,cc.xy(2,2));
315

    
316
      lblDescription.setName("lblDescription");
317
      lblDescription.setText("_Description");
318
      lblDescription.setVerticalAlignment(JLabel.TOP);
319
      jpanel1.add(lblDescription,new CellConstraints(2,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
320

    
321
      txtLabel.setName("txtLabel");
322
      jpanel1.add(txtLabel,cc.xy(4,2));
323

    
324
      txtDescription.setName("txtDescription");
325
      JScrollPane jscrollpane1 = new JScrollPane();
326
      jscrollpane1.setViewportView(txtDescription);
327
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
328
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
329
      jpanel1.add(jscrollpane1,new CellConstraints(4,4,1,1,CellConstraints.DEFAULT,CellConstraints.FILL));
330

    
331
      lblTags.setName("lblTags");
332
      lblTags.setText("_Tags");
333
      lblTags.setVerticalAlignment(JLabel.TOP);
334
      jpanel1.add(lblTags,cc.xy(2,6));
335

    
336
      jpanel1.add(creategridTags(),cc.xy(4,6));
337
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
338
      return jpanel1;
339
   }
340

    
341
   public JPanel creategridTags()
342
   {
343
      gridTags.setName("gridTags");
344
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
345
      CellConstraints cc = new CellConstraints();
346
      gridTags.setLayout(formlayout1);
347

    
348
      gridTags.add(horizontallinecomponent2,cc.xy(1,2));
349

    
350
      gridTags.add(creategridTagsItems(),cc.xy(1,1));
351
      gridTags.add(creategridTagsItem(),cc.xy(1,3));
352
      addFillComponents(gridTags,new int[]{ 1 },new int[]{ 1,3 });
353
      return gridTags;
354
   }
355

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

    
363
      tblTagsItems.setName("tblTagsItems");
364
      JScrollPane jscrollpane1 = new JScrollPane();
365
      jscrollpane1.setViewportView(tblTagsItems);
366
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
367
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
368
      gridTagsItems.add(jscrollpane1,cc.xy(1,1));
369

    
370
      gridTagsItems.add(createPanel5(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
371
      addFillComponents(gridTagsItems,new int[]{ 2,3 },new int[0]);
372
      return gridTagsItems;
373
   }
374

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

    
382
      btnTagsNew.setActionCommand("_New");
383
      btnTagsNew.setName("btnTagsNew");
384
      btnTagsNew.setText("_New");
385
      jpanel1.add(btnTagsNew,cc.xy(2,1));
386

    
387
      btnTagsDelete.setActionCommand("_Delete");
388
      btnTagsDelete.setName("btnTagsDelete");
389
      btnTagsDelete.setText("_Delete");
390
      jpanel1.add(btnTagsDelete,cc.xy(2,3));
391

    
392
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
393
      return jpanel1;
394
   }
395

    
396
   public JPanel creategridTagsItem()
397
   {
398
      gridTagsItem.setName("gridTagsItem");
399
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
400
      CellConstraints cc = new CellConstraints();
401
      gridTagsItem.setLayout(formlayout1);
402

    
403
      gridTagsItem.add(createPanel6(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
404
      gridTagsItem.add(creategrdTagsItemView(),cc.xy(1,1));
405
      addFillComponents(gridTagsItem,new int[]{ 1,2,3 },new int[]{ 1 });
406
      return gridTagsItem;
407
   }
408

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

    
416
      btnTagsAccept.setActionCommand("JButton");
417
      btnTagsAccept.setName("btnTagsAccept");
418
      btnTagsAccept.setText("Accept");
419
      jpanel1.add(btnTagsAccept,cc.xy(2,3));
420

    
421
      btnTagsDiscard.setActionCommand("JButton");
422
      btnTagsDiscard.setName("btnTagsDiscard");
423
      btnTagsDiscard.setText("_Discard");
424
      jpanel1.add(btnTagsDiscard,cc.xy(2,5));
425

    
426
      btnTagsModify.setActionCommand("JButton");
427
      btnTagsModify.setName("btnTagsModify");
428
      btnTagsModify.setText("_Modify");
429
      jpanel1.add(btnTagsModify,cc.xy(2,1));
430

    
431
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
432
      return jpanel1;
433
   }
434

    
435
   public JPanel creategrdTagsItemView()
436
   {
437
      grdTagsItemView.setName("grdTagsItemView");
438
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
439
      CellConstraints cc = new CellConstraints();
440
      grdTagsItemView.setLayout(formlayout1);
441

    
442
      lblTagsItemName.setName("lblTagsItemName");
443
      lblTagsItemName.setText("_Name");
444
      grdTagsItemView.add(lblTagsItemName,cc.xy(1,1));
445

    
446
      lblTagsItemValue.setName("lblTagsItemValue");
447
      lblTagsItemValue.setText("_Value");
448
      grdTagsItemView.add(lblTagsItemValue,cc.xy(1,3));
449

    
450
      cboTagsItemName.setName("cboTagsItemName");
451
      grdTagsItemView.add(cboTagsItemName,cc.xy(3,1));
452

    
453
      cboTagsItemValue.setEditable(true);
454
      cboTagsItemValue.setName("cboTagsItemValue");
455
      cboTagsItemValue.setRequestFocusEnabled(false);
456
      grdTagsItemView.add(cboTagsItemValue,cc.xy(3,3));
457

    
458
      lblTagsItemNotes.setName("lblTagsItemNotes");
459
      lblTagsItemNotes.setText("_Notes");
460
      grdTagsItemView.add(lblTagsItemNotes,new CellConstraints(1,5,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
461

    
462
      lblTagsItemNotesValue.setName("lblTagsItemNotesValue");
463
      grdTagsItemView.add(lblTagsItemNotesValue,cc.xy(3,5));
464

    
465
      addFillComponents(grdTagsItemView,new int[]{ 2 },new int[]{ 2,4 });
466
      return grdTagsItemView;
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:DEFAULT: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.setEnabled(false);
520
      tblRules.setName("tblRules");
521
      JScrollPane jscrollpane1 = new JScrollPane();
522
      jscrollpane1.setViewportView(tblRules);
523
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
524
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
525
      gridRulesTable.add(jscrollpane1,cc.xy(1,1));
526

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

    
532
   public JPanel createPanel8()
533
   {
534
      JPanel jpanel1 = new JPanel();
535
      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)");
536
      CellConstraints cc = new CellConstraints();
537
      jpanel1.setLayout(formlayout1);
538

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
617
      jpanel1.add(createPanel11(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
618
      txtRuleValidation.setName("txtRuleValidation");
619
      JScrollPane jscrollpane1 = new JScrollPane();
620
      jscrollpane1.setViewportView(txtRuleValidation);
621
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
622
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
623
      jpanel1.add(jscrollpane1,cc.xy(1,1));
624

    
625
      addFillComponents(jpanel1,new int[]{ 2,3 },new int[0]);
626
      return jpanel1;
627
   }
628

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

    
636
      btnRuleValidation.setActionCommand("...");
637
      btnRuleValidation.setName("btnRuleValidation");
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.setText("...");
646
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
647
      btnRuleValidationHistory.setBorder(emptyborder2);
648
      jpanel1.add(btnRuleValidationHistory,cc.xy(1,3));
649

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

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

    
661
   public JPanel createPanel12()
662
   {
663
      JPanel jpanel1 = new JPanel();
664
      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)");
665
      CellConstraints cc = new CellConstraints();
666
      jpanel1.setLayout(formlayout1);
667

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

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

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

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

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

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

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

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

    
711

    
712
}