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

History | View | Annotate | Download (29.7 KB)

1 44077 jjdelcerro
package org.gvsig.fmap.dal.swing.impl.featuretype;
2
3
import com.jeta.forms.components.line.HorizontalLineComponent;
4 45739 jjdelcerro
import com.jeta.forms.components.separator.TitledSeparator;
5 44077 jjdelcerro
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 45739 jjdelcerro
import javax.swing.JCheckBox;
16 44253 jjdelcerro
import javax.swing.JComboBox;
17 44077 jjdelcerro
import javax.swing.JFrame;
18 44253 jjdelcerro
import javax.swing.JLabel;
19 44077 jjdelcerro
import javax.swing.JPanel;
20
import javax.swing.JScrollPane;
21 44253 jjdelcerro
import javax.swing.JTabbedPane;
22 44077 jjdelcerro
import javax.swing.JTable;
23 44253 jjdelcerro
import javax.swing.JTextArea;
24
import javax.swing.JTextField;
25 45739 jjdelcerro
import javax.swing.border.EmptyBorder;
26 44077 jjdelcerro
27
28 44713 jjdelcerro
public class DefaultFeatureTypePanelView extends JPanel
29 44077 jjdelcerro
{
30 44253 jjdelcerro
   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 44505 jjdelcerro
   JLabel lblTags = new JLabel();
36 45873 jjdelcerro
   JPanel gridTags = new JPanel();
37 46850 jjdelcerro
   HorizontalLineComponent horizontallinecomponent1 = new HorizontalLineComponent();
38 45873 jjdelcerro
   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 46850 jjdelcerro
   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 45739 jjdelcerro
   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 lblRuleValidation = new JLabel();
78
   JTextField txtRuleName = new JTextField();
79
   JCheckBox chkRuleCheckAtFinishEditing = new JCheckBox();
80 46738 jjdelcerro
   JTextArea txtRuleValidation = new JTextArea();
81 45739 jjdelcerro
   JButton btnRuleValidation = new JButton();
82
   JButton btnRuleValidationHistory = new JButton();
83
   JButton btnRuleValidationBookmarks = new JButton();
84 47378 jjdelcerro
   JTextArea txtRuleDescription = new JTextArea();
85
   JLabel lblRuleCheckAtUpdate = new JLabel();
86
   JCheckBox chkRuleCheckAtUpdate = new JCheckBox();
87
   JLabel lblRuleCheckAtEditFeature = new JLabel();
88
   JCheckBox chkRuleCheckAtEditFeature = new JCheckBox();
89 45739 jjdelcerro
   JButton btnRuleFormFieldAccept = new JButton();
90
   JButton btnRuleFormFieldDiscard = new JButton();
91
   JButton btnRuleFormFieldModify = new JButton();
92 44505 jjdelcerro
   JPanel pnlCfgActions = new JPanel();
93 44077 jjdelcerro
94
   /**
95
    * Default constructor
96
    */
97 44713 jjdelcerro
   public DefaultFeatureTypePanelView()
98 44077 jjdelcerro
   {
99
      initializePanel();
100
   }
101
102
   /**
103
    * Adds fill components to empty cells in the first row and first column of the grid.
104
    * This ensures that the grid spacing will be the same as shown in the designer.
105
    * @param cols an array of column indices in the first row where fill components should be added.
106
    * @param rows an array of row indices in the first column where fill components should be added.
107
    */
108
   void addFillComponents( Container panel, int[] cols, int[] rows )
109
   {
110
      Dimension filler = new Dimension(10,10);
111
112
      boolean filled_cell_11 = false;
113
      CellConstraints cc = new CellConstraints();
114
      if ( cols.length > 0 && rows.length > 0 )
115
      {
116
         if ( cols[0] == 1 && rows[0] == 1 )
117
         {
118
            /** add a rigid area  */
119
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
120
            filled_cell_11 = true;
121
         }
122
      }
123
124
      for( int index = 0; index < cols.length; index++ )
125
      {
126
         if ( cols[index] == 1 && filled_cell_11 )
127
         {
128
            continue;
129
         }
130
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
131
      }
132
133
      for( int index = 0; index < rows.length; index++ )
134
      {
135
         if ( rows[index] == 1 && filled_cell_11 )
136
         {
137
            continue;
138
         }
139
         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
140
      }
141
142
   }
143
144
   /**
145
    * Helper method to load an image file from the CLASSPATH
146
    * @param imageName the package and name of the file to load relative to the CLASSPATH
147
    * @return an ImageIcon instance with the specified image file
148
    * @throws IllegalArgumentException if the image resource cannot be loaded.
149
    */
150
   public ImageIcon loadImage( String imageName )
151
   {
152
      try
153
      {
154
         ClassLoader classloader = getClass().getClassLoader();
155
         java.net.URL url = classloader.getResource( imageName );
156
         if ( url != null )
157
         {
158
            ImageIcon icon = new ImageIcon( url );
159
            return icon;
160
         }
161
      }
162
      catch( Exception e )
163
      {
164
         e.printStackTrace();
165
      }
166
      throw new IllegalArgumentException( "Unable to load image: " + imageName );
167
   }
168
169
   /**
170
    * Method for recalculating the component orientation for
171
    * right-to-left Locales.
172
    * @param orientation the component orientation to be applied
173
    */
174
   public void applyComponentOrientation( ComponentOrientation orientation )
175
   {
176
      // Not yet implemented...
177
      // I18NUtils.applyComponentOrientation(this, orientation);
178
      super.applyComponentOrientation(orientation);
179
   }
180
181
   public JPanel createPanel()
182
   {
183
      JPanel jpanel1 = new JPanel();
184 44505 jjdelcerro
      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");
185 44253 jjdelcerro
      CellConstraints cc = new CellConstraints();
186
      jpanel1.setLayout(formlayout1);
187
188
      tabFeatureType.setName("tabFeatureType");
189 46850 jjdelcerro
      tabFeatureType.addTab("_General",null,createPanel1());
190
      tabFeatureType.addTab("_Columns",null,createPanel4());
191 45739 jjdelcerro
      tabFeatureType.addTab("_Rules",null,createPanel7());
192 44505 jjdelcerro
      jpanel1.add(tabFeatureType,cc.xy(2,3));
193 44253 jjdelcerro
194 45873 jjdelcerro
      jpanel1.add(createPanel13(),cc.xy(2,2));
195 44505 jjdelcerro
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4 });
196 44253 jjdelcerro
      return jpanel1;
197
   }
198
199
   public JPanel createPanel1()
200
   {
201
      JPanel jpanel1 = new JPanel();
202 46850 jjdelcerro
      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");
203 44077 jjdelcerro
      CellConstraints cc = new CellConstraints();
204
      jpanel1.setLayout(formlayout1);
205
206 44253 jjdelcerro
      lblLabel.setName("lblLabel");
207
      lblLabel.setText("_Label");
208
      jpanel1.add(lblLabel,cc.xy(2,2));
209
210
      lblDescription.setName("lblDescription");
211
      lblDescription.setText("_Description");
212
      lblDescription.setVerticalAlignment(JLabel.TOP);
213
      jpanel1.add(lblDescription,new CellConstraints(2,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
214
215
      txtLabel.setName("txtLabel");
216
      jpanel1.add(txtLabel,cc.xy(4,2));
217
218
      txtDescription.setName("txtDescription");
219
      JScrollPane jscrollpane1 = new JScrollPane();
220
      jscrollpane1.setViewportView(txtDescription);
221
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
222
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
223
      jpanel1.add(jscrollpane1,new CellConstraints(4,4,1,1,CellConstraints.DEFAULT,CellConstraints.FILL));
224
225
      lblTags.setName("lblTags");
226
      lblTags.setText("_Tags");
227
      lblTags.setVerticalAlignment(JLabel.TOP);
228
      jpanel1.add(lblTags,cc.xy(2,6));
229
230 45873 jjdelcerro
      jpanel1.add(creategridTags(),cc.xy(4,6));
231 44253 jjdelcerro
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7 });
232
      return jpanel1;
233
   }
234
235 45873 jjdelcerro
   public JPanel creategridTags()
236 44253 jjdelcerro
   {
237 45873 jjdelcerro
      gridTags.setName("gridTags");
238
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
239 44253 jjdelcerro
      CellConstraints cc = new CellConstraints();
240 45873 jjdelcerro
      gridTags.setLayout(formlayout1);
241 44253 jjdelcerro
242 46850 jjdelcerro
      gridTags.add(horizontallinecomponent1,cc.xy(1,2));
243 44253 jjdelcerro
244 45873 jjdelcerro
      gridTags.add(creategridTagsItems(),cc.xy(1,1));
245
      gridTags.add(creategridTagsItem(),cc.xy(1,3));
246
      addFillComponents(gridTags,new int[]{ 1 },new int[]{ 1,3 });
247
      return gridTags;
248
   }
249 44253 jjdelcerro
250 45873 jjdelcerro
   public JPanel creategridTagsItems()
251
   {
252
      gridTagsItems.setName("gridTagsItems");
253 46850 jjdelcerro
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
254 45873 jjdelcerro
      CellConstraints cc = new CellConstraints();
255
      gridTagsItems.setLayout(formlayout1);
256 44253 jjdelcerro
257 45873 jjdelcerro
      tblTagsItems.setName("tblTagsItems");
258 44253 jjdelcerro
      JScrollPane jscrollpane1 = new JScrollPane();
259 45873 jjdelcerro
      jscrollpane1.setViewportView(tblTagsItems);
260 44253 jjdelcerro
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
261
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
262 45873 jjdelcerro
      gridTagsItems.add(jscrollpane1,cc.xy(1,1));
263 44253 jjdelcerro
264 46850 jjdelcerro
      gridTagsItems.add(createPanel2(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
265 45873 jjdelcerro
      addFillComponents(gridTagsItems,new int[]{ 2,3 },new int[0]);
266
      return gridTagsItems;
267
   }
268 44253 jjdelcerro
269 46850 jjdelcerro
   public JPanel createPanel2()
270 45873 jjdelcerro
   {
271
      JPanel jpanel1 = new JPanel();
272 46850 jjdelcerro
      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");
273 45873 jjdelcerro
      CellConstraints cc = new CellConstraints();
274
      jpanel1.setLayout(formlayout1);
275 44351 jjdelcerro
276 45873 jjdelcerro
      btnTagsNew.setActionCommand("_New");
277
      btnTagsNew.setName("btnTagsNew");
278
      btnTagsNew.setText("_New");
279
      jpanel1.add(btnTagsNew,cc.xy(2,1));
280
281
      btnTagsDelete.setActionCommand("_Delete");
282
      btnTagsDelete.setName("btnTagsDelete");
283
      btnTagsDelete.setText("_Delete");
284
      jpanel1.add(btnTagsDelete,cc.xy(2,3));
285
286
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
287 44253 jjdelcerro
      return jpanel1;
288
   }
289
290 45873 jjdelcerro
   public JPanel creategridTagsItem()
291
   {
292
      gridTagsItem.setName("gridTagsItem");
293
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
294
      CellConstraints cc = new CellConstraints();
295
      gridTagsItem.setLayout(formlayout1);
296
297 46850 jjdelcerro
      gridTagsItem.add(createPanel3(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
298 45873 jjdelcerro
      gridTagsItem.add(creategrdTagsItemView(),cc.xy(1,1));
299
      addFillComponents(gridTagsItem,new int[]{ 1,2,3 },new int[]{ 1 });
300
      return gridTagsItem;
301
   }
302
303 46850 jjdelcerro
   public JPanel createPanel3()
304 44253 jjdelcerro
   {
305
      JPanel jpanel1 = new JPanel();
306 45873 jjdelcerro
      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");
307 44253 jjdelcerro
      CellConstraints cc = new CellConstraints();
308
      jpanel1.setLayout(formlayout1);
309
310 45873 jjdelcerro
      btnTagsAccept.setActionCommand("JButton");
311
      btnTagsAccept.setName("btnTagsAccept");
312
      btnTagsAccept.setText("Accept");
313
      jpanel1.add(btnTagsAccept,cc.xy(2,3));
314 44253 jjdelcerro
315 45873 jjdelcerro
      btnTagsDiscard.setActionCommand("JButton");
316
      btnTagsDiscard.setName("btnTagsDiscard");
317
      btnTagsDiscard.setText("_Discard");
318
      jpanel1.add(btnTagsDiscard,cc.xy(2,5));
319 44253 jjdelcerro
320 45873 jjdelcerro
      btnTagsModify.setActionCommand("JButton");
321
      btnTagsModify.setName("btnTagsModify");
322
      btnTagsModify.setText("_Modify");
323
      jpanel1.add(btnTagsModify,cc.xy(2,1));
324 44253 jjdelcerro
325 45873 jjdelcerro
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
326 44253 jjdelcerro
      return jpanel1;
327
   }
328
329 45873 jjdelcerro
   public JPanel creategrdTagsItemView()
330
   {
331
      grdTagsItemView.setName("grdTagsItemView");
332 46850 jjdelcerro
      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");
333 45873 jjdelcerro
      CellConstraints cc = new CellConstraints();
334
      grdTagsItemView.setLayout(formlayout1);
335
336
      lblTagsItemName.setName("lblTagsItemName");
337
      lblTagsItemName.setText("_Name");
338
      grdTagsItemView.add(lblTagsItemName,cc.xy(1,1));
339
340
      lblTagsItemValue.setName("lblTagsItemValue");
341
      lblTagsItemValue.setText("_Value");
342
      grdTagsItemView.add(lblTagsItemValue,cc.xy(1,3));
343
344 46876 jjdelcerro
      cboTagsItemName.setEditable(true);
345 45873 jjdelcerro
      cboTagsItemName.setName("cboTagsItemName");
346 46876 jjdelcerro
      cboTagsItemName.setRequestFocusEnabled(false);
347 45873 jjdelcerro
      grdTagsItemView.add(cboTagsItemName,cc.xy(3,1));
348
349
      cboTagsItemValue.setEditable(true);
350
      cboTagsItemValue.setName("cboTagsItemValue");
351
      cboTagsItemValue.setRequestFocusEnabled(false);
352
      grdTagsItemView.add(cboTagsItemValue,cc.xy(3,3));
353
354
      lblTagsItemNotes.setName("lblTagsItemNotes");
355
      lblTagsItemNotes.setText("_Notes");
356
      grdTagsItemView.add(lblTagsItemNotes,new CellConstraints(1,5,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
357
358
      lblTagsItemNotesValue.setName("lblTagsItemNotesValue");
359
      grdTagsItemView.add(lblTagsItemNotesValue,cc.xy(3,5));
360
361
      addFillComponents(grdTagsItemView,new int[]{ 2 },new int[]{ 2,4 });
362
      return grdTagsItemView;
363
   }
364
365 46850 jjdelcerro
   public JPanel createPanel4()
366
   {
367
      JPanel jpanel1 = new JPanel();
368
      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");
369
      CellConstraints cc = new CellConstraints();
370
      jpanel1.setLayout(formlayout1);
371
372
      jpanel1.add(creategridAttributes(),cc.xy(2,2));
373
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
374
      return jpanel1;
375
   }
376
377
   public JPanel creategridAttributes()
378
   {
379
      gridAttributes.setName("gridAttributes");
380
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)");
381
      CellConstraints cc = new CellConstraints();
382
      gridAttributes.setLayout(formlayout1);
383
384
      gridAttributes.add(horizontallinecomponent2,cc.xy(1,2));
385
386
      gridAttributes.add(creategridAttributesTable(),cc.xy(1,1));
387
      gridAttributes.add(creategridAttributesDetail(),cc.xy(1,3));
388
      addFillComponents(gridAttributes,new int[]{ 1 },new int[]{ 1,3 });
389
      return gridAttributes;
390
   }
391
392
   public JPanel creategridAttributesTable()
393
   {
394
      gridAttributesTable.setName("gridAttributesTable");
395
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
396
      CellConstraints cc = new CellConstraints();
397
      gridAttributesTable.setLayout(formlayout1);
398
399
      tblFields.setName("tblFields");
400
      JScrollPane jscrollpane1 = new JScrollPane();
401
      jscrollpane1.setViewportView(tblFields);
402
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
403
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
404
      gridAttributesTable.add(jscrollpane1,cc.xy(1,1));
405
406
      gridAttributesTable.add(createPanel5(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
407
      addFillComponents(gridAttributesTable,new int[]{ 2,3 },new int[0]);
408
      return gridAttributesTable;
409
   }
410
411
   public JPanel createPanel5()
412
   {
413
      JPanel jpanel1 = new JPanel();
414
      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)");
415
      CellConstraints cc = new CellConstraints();
416
      jpanel1.setLayout(formlayout1);
417
418
      btnNew.setActionCommand("_New");
419
      btnNew.setName("btnNew");
420
      btnNew.setText("_New");
421
      jpanel1.add(btnNew,cc.xy(2,1));
422
423
      btnDelete.setActionCommand("_Delete");
424
      btnDelete.setName("btnDelete");
425
      btnDelete.setText("_Delete");
426
      jpanel1.add(btnDelete,cc.xy(2,3));
427
428
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
429
      return jpanel1;
430
   }
431
432
   public JPanel creategridAttributesDetail()
433
   {
434
      gridAttributesDetail.setName("gridAttributesDetail");
435
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
436
      CellConstraints cc = new CellConstraints();
437
      gridAttributesDetail.setLayout(formlayout1);
438
439
      pnlField.setName("pnlField");
440
      gridAttributesDetail.add(pnlField,cc.xy(1,1));
441
442
      gridAttributesDetail.add(createPanel6(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
443
      addFillComponents(gridAttributesDetail,new int[]{ 2,3 },new int[0]);
444
      return gridAttributesDetail;
445
   }
446
447
   public JPanel createPanel6()
448
   {
449
      JPanel jpanel1 = new JPanel();
450
      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");
451
      CellConstraints cc = new CellConstraints();
452
      jpanel1.setLayout(formlayout1);
453
454
      btnFormFieldAccept.setActionCommand("JButton");
455
      btnFormFieldAccept.setName("btnFormFieldAccept");
456
      btnFormFieldAccept.setText("Accept");
457
      jpanel1.add(btnFormFieldAccept,cc.xy(2,3));
458
459
      btnFormFieldDiscard.setActionCommand("JButton");
460
      btnFormFieldDiscard.setName("btnFormFieldDiscard");
461
      btnFormFieldDiscard.setText("_Discard");
462
      jpanel1.add(btnFormFieldDiscard,cc.xy(2,5));
463
464
      btnFormFieldModify.setActionCommand("JButton");
465
      btnFormFieldModify.setName("btnFormFieldModify");
466
      btnFormFieldModify.setText("_Modify");
467
      jpanel1.add(btnFormFieldModify,cc.xy(2,1));
468
469
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
470
      return jpanel1;
471
   }
472
473 44505 jjdelcerro
   public JPanel createPanel7()
474
   {
475
      JPanel jpanel1 = new JPanel();
476 45739 jjdelcerro
      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");
477
      CellConstraints cc = new CellConstraints();
478
      jpanel1.setLayout(formlayout1);
479
480
      chkRulesValidateFeatureBeforeInsert.setActionCommand("_Validate_features_before_insert");
481
      chkRulesValidateFeatureBeforeInsert.setName("chkRulesValidateFeatureBeforeInsert");
482
      chkRulesValidateFeatureBeforeInsert.setText("_Validate_features_before_insert");
483
      jpanel1.add(chkRulesValidateFeatureBeforeInsert,cc.xy(2,4));
484
485
      chkRulesValidateFeaturesAtFinishEditing.setActionCommand("_Validate_features_at_finish_editing");
486
      chkRulesValidateFeaturesAtFinishEditing.setName("chkRulesValidateFeaturesAtFinishEditing");
487
      chkRulesValidateFeaturesAtFinishEditing.setText("_Validate_features_at_finish_editing");
488
      jpanel1.add(chkRulesValidateFeaturesAtFinishEditing,cc.xy(2,6));
489
490
      lblRulesDefaultRules.setName("lblRulesDefaultRules");
491
      lblRulesDefaultRules.setText("_Default_rules");
492
      jpanel1.add(lblRulesDefaultRules,cc.xywh(2,2,3,1));
493
494
      lblRulesCustomRules.setName("lblRulesCustomRules");
495
      lblRulesCustomRules.setText("_Custom_rules");
496
      jpanel1.add(lblRulesCustomRules,cc.xywh(2,7,3,1));
497
498
      jpanel1.add(creategridRules(),cc.xywh(2,9,3,1));
499
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10 });
500
      return jpanel1;
501
   }
502
503
   public JPanel creategridRules()
504
   {
505
      gridRules.setName("gridRules");
506
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:GROW(1.0)");
507
      CellConstraints cc = new CellConstraints();
508
      gridRules.setLayout(formlayout1);
509
510
      gridRules.add(creategridRulesTable(),cc.xy(1,1));
511
      gridRules.add(creategridRulesDetail(),cc.xy(1,2));
512
      addFillComponents(gridRules,new int[]{ 1 },new int[]{ 1,2 });
513
      return gridRules;
514
   }
515
516
   public JPanel creategridRulesTable()
517
   {
518
      gridRulesTable.setName("gridRulesTable");
519 46850 jjdelcerro
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
520 45739 jjdelcerro
      CellConstraints cc = new CellConstraints();
521
      gridRulesTable.setLayout(formlayout1);
522
523
      tblRules.setName("tblRules");
524
      JScrollPane jscrollpane1 = new JScrollPane();
525
      jscrollpane1.setViewportView(tblRules);
526
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
527
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
528
      gridRulesTable.add(jscrollpane1,cc.xy(1,1));
529
530
      gridRulesTable.add(createPanel8(),cc.xy(3,1));
531
      addFillComponents(gridRulesTable,new int[]{ 2,3 },new int[0]);
532
      return gridRulesTable;
533
   }
534
535
   public JPanel createPanel8()
536
   {
537
      JPanel jpanel1 = new JPanel();
538
      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)");
539
      CellConstraints cc = new CellConstraints();
540
      jpanel1.setLayout(formlayout1);
541
542
      btnRulesNew.setActionCommand("_New");
543
      btnRulesNew.setName("btnRulesNew");
544
      btnRulesNew.setText("_New");
545
      jpanel1.add(btnRulesNew,cc.xy(2,1));
546
547
      btnRulesDelete.setActionCommand("_Delete");
548
      btnRulesDelete.setName("btnRulesDelete");
549
      btnRulesDelete.setText("_Delete");
550
      jpanel1.add(btnRulesDelete,cc.xy(2,3));
551
552
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 });
553
      return jpanel1;
554
   }
555
556
   public JPanel creategridRulesDetail()
557
   {
558
      gridRulesDetail.setName("gridRulesDetail");
559
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
560
      CellConstraints cc = new CellConstraints();
561
      gridRulesDetail.setLayout(formlayout1);
562
563
      gridRulesDetail.add(createPanel9(),cc.xy(1,1));
564 45873 jjdelcerro
      gridRulesDetail.add(createPanel12(),cc.xy(3,1));
565 45739 jjdelcerro
      addFillComponents(gridRulesDetail,new int[]{ 1,2,3 },new int[]{ 1 });
566
      return gridRulesDetail;
567
   }
568
569
   public JPanel createPanel9()
570
   {
571
      JPanel jpanel1 = new JPanel();
572 47378 jjdelcerro
      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:GROW(0.2),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)");
573 45739 jjdelcerro
      CellConstraints cc = new CellConstraints();
574
      jpanel1.setLayout(formlayout1);
575
576
      lblRuleName.setName("lblRuleName");
577
      lblRuleName.setText("_Name");
578
      jpanel1.add(lblRuleName,cc.xy(1,1));
579
580
      lblRuleDescription.setName("lblRuleDescription");
581
      lblRuleDescription.setText("_Description");
582 47378 jjdelcerro
      jpanel1.add(lblRuleDescription,new CellConstraints(1,3,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
583 45739 jjdelcerro
584
      lblRuleCheckAtFinishEditing.setName("lblRuleCheckAtFinishEditing");
585
      lblRuleCheckAtFinishEditing.setText("_Check_at_finish_editing");
586
      jpanel1.add(lblRuleCheckAtFinishEditing,cc.xy(1,5));
587
588
      lblRuleValidation.setName("lblRuleValidation");
589
      lblRuleValidation.setText("_Validation");
590 47378 jjdelcerro
      jpanel1.add(lblRuleValidation,new CellConstraints(1,11,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
591 45739 jjdelcerro
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 47378 jjdelcerro
      jpanel1.add(createPanel10(),cc.xy(3,11));
599
      txtRuleDescription.setName("txtRuleDescription");
600
      JScrollPane jscrollpane1 = new JScrollPane();
601
      jscrollpane1.setViewportView(txtRuleDescription);
602
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
603
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
604
      jpanel1.add(jscrollpane1,new CellConstraints(3,3,1,1,CellConstraints.FILL,CellConstraints.FILL));
605
606
      lblRuleCheckAtUpdate.setName("lblRuleCheckAtUpdate");
607
      lblRuleCheckAtUpdate.setText("_Check_at_insert_or_update_feature");
608
      jpanel1.add(lblRuleCheckAtUpdate,cc.xy(1,7));
609
610 45739 jjdelcerro
      chkRuleCheckAtUpdate.setName("chkRuleCheckAtUpdate");
611
      jpanel1.add(chkRuleCheckAtUpdate,cc.xy(3,7));
612
613 47378 jjdelcerro
      lblRuleCheckAtEditFeature.setName("lblRuleCheckAtEditFeature");
614
      lblRuleCheckAtEditFeature.setText("_Check_at_edit_feature");
615
      jpanel1.add(lblRuleCheckAtEditFeature,cc.xy(1,9));
616 45739 jjdelcerro
617 47378 jjdelcerro
      chkRuleCheckAtEditFeature.setName("chkRuleCheckAtEditFeature");
618
      jpanel1.add(chkRuleCheckAtEditFeature,cc.xy(3,9));
619
620
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2,4,6,8,10 });
621 45739 jjdelcerro
      return jpanel1;
622
   }
623
624
   public JPanel createPanel10()
625
   {
626
      JPanel jpanel1 = new JPanel();
627 46850 jjdelcerro
      FormLayout formlayout1 = new FormLayout("FILL:200PX:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
628 45739 jjdelcerro
      CellConstraints cc = new CellConstraints();
629
      jpanel1.setLayout(formlayout1);
630
631
      txtRuleValidation.setName("txtRuleValidation");
632 45873 jjdelcerro
      JScrollPane jscrollpane1 = new JScrollPane();
633
      jscrollpane1.setViewportView(txtRuleValidation);
634
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
635
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
636
      jpanel1.add(jscrollpane1,cc.xy(1,1));
637 45739 jjdelcerro
638 46738 jjdelcerro
      jpanel1.add(createPanel11(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
639 45873 jjdelcerro
      addFillComponents(jpanel1,new int[]{ 2,3 },new int[0]);
640
      return jpanel1;
641
   }
642
643
   public JPanel createPanel11()
644
   {
645
      JPanel jpanel1 = new JPanel();
646
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
647
      CellConstraints cc = new CellConstraints();
648
      jpanel1.setLayout(formlayout1);
649
650 45739 jjdelcerro
      btnRuleValidation.setActionCommand("...");
651
      btnRuleValidation.setName("btnRuleValidation");
652 46850 jjdelcerro
      btnRuleValidation.setOpaque(false);
653 45739 jjdelcerro
      btnRuleValidation.setText("...");
654
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
655
      btnRuleValidation.setBorder(emptyborder1);
656 45873 jjdelcerro
      jpanel1.add(btnRuleValidation,cc.xy(1,1));
657 45739 jjdelcerro
658
      btnRuleValidationHistory.setActionCommand("...");
659
      btnRuleValidationHistory.setName("btnRuleValidationHistory");
660 46850 jjdelcerro
      btnRuleValidationHistory.setOpaque(false);
661 45739 jjdelcerro
      btnRuleValidationHistory.setText("...");
662
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
663
      btnRuleValidationHistory.setBorder(emptyborder2);
664 45873 jjdelcerro
      jpanel1.add(btnRuleValidationHistory,cc.xy(1,3));
665 45739 jjdelcerro
666
      btnRuleValidationBookmarks.setActionCommand("...");
667
      btnRuleValidationBookmarks.setName("btnRuleValidationBookmarks");
668 46850 jjdelcerro
      btnRuleValidationBookmarks.setOpaque(false);
669 45739 jjdelcerro
      btnRuleValidationBookmarks.setText("...");
670
      EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
671
      btnRuleValidationBookmarks.setBorder(emptyborder3);
672 45873 jjdelcerro
      jpanel1.add(btnRuleValidationBookmarks,cc.xy(1,5));
673 45739 jjdelcerro
674 45873 jjdelcerro
      addFillComponents(jpanel1,new int[0],new int[]{ 2,4 });
675 45739 jjdelcerro
      return jpanel1;
676
   }
677
678 45873 jjdelcerro
   public JPanel createPanel12()
679 45739 jjdelcerro
   {
680
      JPanel jpanel1 = new JPanel();
681
      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)");
682
      CellConstraints cc = new CellConstraints();
683
      jpanel1.setLayout(formlayout1);
684
685
      btnRuleFormFieldAccept.setActionCommand("JButton");
686
      btnRuleFormFieldAccept.setName("btnRuleFormFieldAccept");
687
      btnRuleFormFieldAccept.setText("Accept");
688
      jpanel1.add(btnRuleFormFieldAccept,cc.xy(2,3));
689
690
      btnRuleFormFieldDiscard.setActionCommand("JButton");
691
      btnRuleFormFieldDiscard.setName("btnRuleFormFieldDiscard");
692
      btnRuleFormFieldDiscard.setText("_Discard");
693
      jpanel1.add(btnRuleFormFieldDiscard,cc.xy(2,5));
694
695
      btnRuleFormFieldModify.setActionCommand("JButton");
696
      btnRuleFormFieldModify.setName("btnRuleFormFieldModify");
697
      btnRuleFormFieldModify.setText("_Modify");
698
      jpanel1.add(btnRuleFormFieldModify,cc.xy(2,1));
699
700
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5,6 });
701
      return jpanel1;
702
   }
703
704 45873 jjdelcerro
   public JPanel createPanel13()
705 45739 jjdelcerro
   {
706
      JPanel jpanel1 = new JPanel();
707 44505 jjdelcerro
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
708
      CellConstraints cc = new CellConstraints();
709
      jpanel1.setLayout(formlayout1);
710
711
      pnlCfgActions.setName("pnlCfgActions");
712
      pnlCfgActions.setOpaque(false);
713
      jpanel1.add(pnlCfgActions,cc.xy(2,1));
714
715
      addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 });
716
      return jpanel1;
717
   }
718
719 44077 jjdelcerro
   /**
720
    * Initializer
721
    */
722
   protected void initializePanel()
723
   {
724
      setLayout(new BorderLayout());
725
      add(createPanel(), BorderLayout.CENTER);
726
   }
727
728
729
}