Revision 46850

View differences:

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/DefaultFeatureAttributePanel.java
2 2

  
3 3
import java.awt.Component;
4 4
import java.awt.event.ActionEvent;
5
import java.awt.event.ActionListener;
6 5
import org.gvsig.fmap.dal.swing.featuretype.FeatureTypeAttributePanel;
7 6
import java.awt.event.ItemEvent;
8 7
import java.net.URL;
......
22 21
import javax.swing.JList;
23 22
import javax.swing.JOptionPane;
24 23
import javax.swing.JScrollPane;
24
import javax.swing.JSplitPane;
25
import javax.swing.JTable;
25 26
import javax.swing.JTextField;
26 27
import javax.swing.ListModel;
27 28
import javax.swing.SwingUtilities;
......
30 31
import javax.swing.text.JTextComponent;
31 32
import org.apache.commons.io.FilenameUtils;
32 33
import org.apache.commons.lang3.StringUtils;
34
import org.apache.commons.lang3.tuple.ImmutablePair;
35
import org.apache.commons.lang3.tuple.Pair;
33 36
import org.cresques.cts.IProjection;
37
import org.gvsig.expressionevaluator.Code;
38
import org.gvsig.expressionevaluator.Code.Callable;
39
import org.gvsig.expressionevaluator.Code.Constant;
40
import org.gvsig.expressionevaluator.Code.Identifier;
41
import org.gvsig.expressionevaluator.Codes;
34 42
import org.gvsig.expressionevaluator.Expression;
43
import static org.gvsig.expressionevaluator.ExpressionBuilder.FUNCTION_GETATTR;
44
import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_EQ;
35 45
import org.gvsig.expressionevaluator.ExpressionUtils;
36 46
import org.gvsig.expressionevaluator.swing.CalculatorController;
37 47
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator;
......
39 49
import org.gvsig.expressionevaluator.swing.ExpressionPickerController;
40 50
import org.gvsig.fmap.dal.DALLocator;
41 51
import org.gvsig.fmap.dal.DataManager;
52
import static org.gvsig.fmap.dal.DataManager.FUNCTION_SELECT;
42 53
import org.gvsig.fmap.dal.DataStore;
43 54
import org.gvsig.fmap.dal.DataStoreProviderFactory;
44 55
import org.gvsig.fmap.dal.DataTypes;
56
import org.gvsig.fmap.dal.SQLBuilder;
45 57
import org.gvsig.fmap.dal.StoresRepository;
46
import org.gvsig.fmap.dal.complements.Search;
47 58
import org.gvsig.fmap.dal.exception.DataException;
59
import org.gvsig.fmap.dal.expressionevaluator.DALExpressionBuilder;
48 60
import org.gvsig.fmap.dal.expressionevaluator.FeatureAttributeEmulatorExpression;
49 61
import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable;
50 62
import org.gvsig.fmap.dal.feature.DataProfile;
......
61 73
import org.gvsig.fmap.dal.swing.DALSwingLocator;
62 74
import org.gvsig.fmap.dal.swing.DataSwingManager;
63 75
import org.gvsig.fmap.dal.swing.expressionevaluator.FeatureStoreElement;
76
import org.gvsig.fmap.dal.swing.featuretype.AttributeDescriptorAndExpressionPickerController;
77
import org.gvsig.fmap.dal.swing.featuretype.AttributeDescriptorPickerController;
64 78
import org.gvsig.fmap.dal.swing.featuretype.FeatureTypePanel;
65 79
import static org.gvsig.fmap.dal.swing.featuretype.FeatureTypePanel.MODE_EDIT_ALL;
66 80
import static org.gvsig.fmap.dal.swing.featuretype.FeatureTypePanel.MODE_EDIT_ONLY_METADATA;
......
84 98
import org.gvsig.tools.swing.api.ListElement;
85 99
import org.gvsig.tools.swing.api.ToolsSwingLocator;
86 100
import org.gvsig.tools.swing.api.ToolsSwingManager;
101
import org.gvsig.tools.swing.api.ToolsSwingUtils;
87 102
import org.gvsig.tools.swing.api.pickercontroller.DatePickerController;
88 103
import org.gvsig.tools.swing.api.pickercontroller.PickerController;
89 104
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
......
91 106
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
92 107
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2;
93 108
import org.gvsig.tools.swing.icontheme.IconTheme;
109
import org.gvsig.tools.util.LabeledValue;
110
import org.gvsig.tools.util.LabeledValueImpl;
94 111
import org.slf4j.Logger;
95 112
import org.slf4j.LoggerFactory;
96 113

  
......
114 131
    // ----
115 132
    private Feature sampleFeature;
116 133
    private String previousDefaultValue;
134
    private ToManyController toManyController;
135
    private JSplitPane splAttrTags;
117 136

  
118
    private static class ForeingKeyController {
137
    private static class ToOneController {
119 138

  
120
        private final JCheckBox chkIsForeingKey;
139
        private final JTextComponent txtMyFieldName;
140
        private final JComboBox cboRelationType;
121 141
        private final JCheckBox chkIsClosedList;
122 142
        private final JComboBox cboTable;
123
        private final JComboBox cboCode;
124
        private final JTextField txtFormula;
143
        private final JComboBox cboForeignField;
144
        private final JComboBox cboFormula;
125 145
        private final JButton btnFormula;
126 146
        private final JButton btnFormulaHistory;
127 147
        private final JButton btnFormulaBokkmarks;
128
        private ExpressionPickerController pickerFormula;
148
        private AttributeDescriptorAndExpressionPickerController pickerFormula;
149
        private AttributeDescriptorPickerController pickerCode;
129 150
        private boolean editable;
130 151
        private ForeingKey foreingKey;
131 152
        
132
        public ForeingKeyController(
133
                JCheckBox chkIsForeingKey,
153
        public ToOneController(
154
                JTextComponent txtMyFieldName,
155
                JComboBox cboRelationType,
134 156
                JCheckBox chkIsClosedList,
135 157
                JComboBox cboTable,
136 158
                JComboBox cboCode,
137
                JTextField txtFormula,
159
                JComboBox cboFormula,
138 160
                JButton btnFormula,
139 161
                JButton btnFormulaBokkmarks,
140 162
                JButton btnFormulaHistory
141 163
        ) {
142
            this.chkIsForeingKey = chkIsForeingKey;
164
            this.txtMyFieldName = txtMyFieldName;
165
            this.cboRelationType = cboRelationType;
143 166
            this.chkIsClosedList = chkIsClosedList;
144 167
            this.cboTable = cboTable;
145
            this.cboCode = cboCode;
146
            this.txtFormula = txtFormula;
168
            this.cboForeignField = cboCode;
169
            this.cboFormula = cboFormula;
147 170
            this.btnFormula = btnFormula;
148 171
            this.btnFormulaHistory = btnFormulaHistory;
149 172
            this.btnFormulaBokkmarks = btnFormulaBokkmarks;
......
152 175

  
153 176
        private void initComponents() {
154 177
            DataSwingManager dataSwingManager = DALSwingLocator.getSwingManager();
178
            I18nManager i18n = ToolsLocator.getI18nManager();
155 179
    
156 180
            this.editable = true;
157
            
181
            DefaultComboBoxModel<ListElement<Integer>> relationTypeModel = new DefaultComboBoxModel<>();
182
//            relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_None"),DynField.RELATION_TYPE_NONE));
183
            relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_Identity_1_1"),DynField.RELATION_TYPE_IDENTITY));
184
            relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_Collaboration_1_1"),DynField.RELATION_TYPE_COLLABORATION));
185
//            relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_Composition_1_N"),DynField.RELATION_TYPE_COMPOSITION));
186
//            relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_Aggregate_1_N"),DynField.RELATION_TYPE_AGGREGATE));
187
            this.cboRelationType.setModel(relationTypeModel);
188
        
158 189
            DefaultComboBoxModel<String> model = new DefaultComboBoxModel();
159 190
            StoresRepository repository = DALLocator.getDataManager().getStoresRepository();
160 191
            List<String> tableNames = new ArrayList<>();
......
165 196
            for (String tableName : tableNames) {
166 197
                model.addElement(tableName);
167 198
            }
199
            this.cboTable.setEditable(false);
168 200
            this.cboTable.setModel(model);
169 201
            this.cboTable.addItemListener((ItemEvent e) -> {
170 202
              if (e.getStateChange() != ItemEvent.SELECTED) {
171 203
                return;
172 204
              }
173 205
              Thread th = new Thread(() -> {
174
                doPopulateComboCode();
175
              }, "FeatureTypePanelForeingKeyPopulateComboCode");
206
                doTableChanged();
207
              }, "FeatureTypePanelToOneChangeTable");
176 208
              th.start();
177 209
            });
210
            this.pickerCode = dataSwingManager.createAttributeDescriptorPickerController(cboForeignField);
211
            
178 212
            this.btnFormula.setText("");
179 213
            this.btnFormulaBokkmarks.setText("");
180 214
            this.btnFormulaHistory.setText("");
181
            this.pickerFormula = ExpressionEvaluatorSwingLocator.getManager()
182
                    .createExpressionPickerController(txtFormula, btnFormula, btnFormulaBokkmarks, btnFormulaHistory);
215
            this.pickerFormula = dataSwingManager.createExpressionPickerController(
216
                    null, 
217
                    cboFormula, 
218
                    btnFormula, 
219
                    btnFormulaBokkmarks, 
220
                    btnFormulaHistory
221
            );
222
            this.pickerFormula.setAllowNull(true);
183 223
        }
184 224

  
185
        private void doPopulateComboCode() {
225
        private void doTableChanged() {
186 226
            String tableName = (String) this.cboTable.getSelectedItem();
187 227
            if( StringUtils.isBlank(tableName) ) {
188 228
                return;
......
198 238
            } catch (DataException ex) {
199 239
                return;
200 240
            }
201
            
202 241
            DataSwingManager dataSwingManager = DALSwingLocator.getSwingManager();
203
            dataSwingManager.resetExpressionBuilder(this.pickerFormula.getConfig());
204
            dataSwingManager.addToExpressionBuilder(this.pickerFormula.getConfig(), (FeatureStore) store, "foreigntable");
205 242
            
206
            Search search = (Search) ToolsLocator.getComplementsManager().get(
207
                    Search.COMPLEMENT_MANE, featureType
208
            );
209
            List<Search.OrderedAttribute> attributes = search.getOrderedAttributes(
210
                    Search.BASIC_TYPES_FILTER,
211
                    Search.LABEL_ORDER, 
212
                    -1
213
            );
214
            final DefaultComboBoxModel model = new DefaultComboBoxModel();
215
            for (Search.OrderedAttribute attribute : attributes) {
216
                model.addElement(attribute.getDescriptor().getName());
243
            this.pickerCode.setAllowNull(true);
244
            this.pickerCode.setFeatureType(featureType);
245
            if (featureType == null) {
246
                return;
217 247
            }
248
            dataSwingManager.configureExpressionBuilder(this.pickerFormula.getConfig(), ((FeatureStore)store));
218 249
            SwingUtilities.invokeLater(() -> {
219
              cboCode.setModel(model);
220
              cboCode.setSelectedItem(foreingKey.getCodeName());
250
              cboForeignField.setSelectedItem(foreingKey.getCodeName());
221 251
            });
222 252
        }
223 253

  
224 254
        public void setEditable(boolean editable) {
225
            this.chkIsForeingKey.setEnabled(editable);
255
            this.cboRelationType.setEnabled(editable);
226 256
            this.chkIsClosedList.setEnabled(editable);
227 257
            this.cboTable.setEnabled(editable);
228
            this.cboCode.setEnabled(editable);
258
            this.cboForeignField.setEnabled(editable);
229 259
            this.pickerFormula.setEditable(editable);
230 260
            this.editable = editable;
231 261
        }
......
234 264
            if( !editable ) {
235 265
                enabled =  false;
236 266
            }
237
            this.chkIsForeingKey.setEnabled(enabled);
267
            this.cboRelationType.setEnabled(enabled);
238 268
            this.chkIsClosedList.setEnabled(enabled);
239 269
            this.cboTable.setEnabled(enabled);
240
            this.cboCode.setEnabled(enabled);
241
            this.pickerFormula.setEditable(editable);
270
            this.cboForeignField.setEnabled(enabled);
271
            this.pickerFormula.setEditable(enabled);
242 272
        }
243 273
        
244 274
        public void clean() {
245
            this.chkIsForeingKey.setSelected(false);
275
            this.txtMyFieldName.setText("");
276
            this.cboRelationType.setSelectedIndex(-1);
246 277
            this.chkIsClosedList.setSelected(false);
247 278
            this.cboTable.setSelectedItem("");
248
            this.cboCode.setSelectedItem("");
279
            this.cboForeignField.setSelectedItem("");
249 280
            this.pickerFormula.set(null);
250 281
        }
251 282
        
252
        public void put(ForeingKey foreingKey) {
283
        public void put(FeatureAttributeDescriptor descriptor) {
284
            if( descriptor == null ) {
285
                this.clean();
286
                return;
287
            }
288
            ForeingKey foreingKey = descriptor.getForeingKey();
253 289
            if( foreingKey==null ) {
254 290
                this.clean();
255 291
                return;
256 292
            }
293
            StoresRepository repository = DALLocator.getDataManager().getStoresRepository();
294
            this.pickerFormula.setFeatureType(repository.getFeatureType(foreingKey.getTableName()));
257 295
            this.foreingKey = foreingKey;
258
            this.chkIsForeingKey.setSelected(foreingKey.isForeingKey());
296
            ListElement.setSelected(this.cboRelationType,descriptor.getRelationType());
259 297
            this.chkIsClosedList.setSelected(foreingKey.isClosedList());
260
            this.cboTable.setSelectedItem(foreingKey.getTableName());
261
            this.cboCode.setSelectedItem(foreingKey.getCodeName());
298
            this.cboTable.setSelectedItem(foreingKey.getTableName()); 
299
            doTableChanged();
300
            this.pickerCode.set(foreingKey.getCodeName());
262 301
            this.pickerFormula.set(foreingKey.getLabelExpression(null));
302
            this.txtMyFieldName.setText(descriptor.getName());
263 303
        }
264 304
        
265
        public void fetch(EditableForeingKey foreingKey) {
305
        public void fetch(EditableFeatureAttributeDescriptor descriptor) {
306
            if( descriptor == null ) {
307
                this.clean();
308
                return;
309
            }
310
            EditableForeingKey foreingKey = descriptor.getForeingKey();
266 311
            if( foreingKey==null ) {
267 312
                return;
268 313
            }
269
            foreingKey.setForeingKey(this.chkIsForeingKey.isSelected());
314
//            foreingKey.setForeingKey(this.chkIsForeingKey.isSelected());
270 315
            foreingKey.setClosedList(this.chkIsClosedList.isSelected());
271 316
            foreingKey.setTableName((String) this.cboTable.getSelectedItem());
272
            foreingKey.setCodeName((String) this.cboCode.getSelectedItem());
317
            foreingKey.setCodeName(this.pickerCode.getName());
273 318
            Expression exp = this.pickerFormula.get();
274 319
            if( ExpressionUtils.isPhraseEmpty(exp) ) {
275 320
                foreingKey.setLabelFormula("");
......
277 322
                foreingKey.setLabelFormula(exp.getPhrase());
278 323
            }
279 324
        }
325

  
326
        public int getRelationType() {
327
            Object n = this.cboRelationType.getSelectedItem();
328
            if( n == null ) {
329
                return DynField.RELATION_TYPE_NONE;
330
            }
331
            return ((LabeledValue<Integer>)n).getValue();
332
        }
280 333
    }
281 334
    
335
    private static class ToManyController {
282 336

  
337
        private final JComboBox cboRelationType;
338
        private final JComboBox cboMyField;
339
        private final JComboBox cboTable;
340
        private final JComboBox cboForeignField;
341
        private final JTextField txtExpression;
342
        private final JButton btnExpression;
343
        private final JButton btnExpressionHistory;
344
        private final JButton btnExpressionBokkmarks;
345
        private ExpressionPickerController pickerExpression;
346
        private AttributeDescriptorPickerController pickerForeignField;
347
        private AttributeDescriptorPickerController pickerMyField;
348
        private boolean editable;
349
        private boolean disableEvents;
350
        
351
        public ToManyController(
352
                JComboBox cboRelationType,
353
                JComboBox cboMyField,
354
                JComboBox cboTable,
355
                JComboBox cboForeignField,
356
                JTextField txtExpression,
357
                JButton btnExpression,
358
                JButton btnExpressionBokkmarks,
359
                JButton btnExpressionHistory
360
        ) {
361
            this.disableEvents = false;
362
            this.cboRelationType = cboRelationType;
363
            this.cboMyField = cboMyField;
364
            this.cboTable = cboTable;
365
            this.cboForeignField = cboForeignField;
366
            this.txtExpression = txtExpression;
367
            this.btnExpression = btnExpression;
368
            this.btnExpressionHistory = btnExpressionHistory;
369
            this.btnExpressionBokkmarks = btnExpressionBokkmarks;
370
            this.initComponents();
371
        }
372

  
373
        private void initComponents() {
374
            DataSwingManager dataSwingManager = DALSwingLocator.getSwingManager();
375
            I18nManager i18n = ToolsLocator.getI18nManager();
376
    
377
            this.editable = true;
378
            DefaultComboBoxModel<LabeledValueImpl<Integer>> relationTypeModel = new DefaultComboBoxModel<>();
379
//            relationTypeModel.addElement(new LabeledValueImpl<>(i18n.getTranslation("_None"),DynField.RELATION_TYPE_NONE));
380
//            relationTypeModel.addElement(new LabeledValueImpl<>(i18n.getTranslation("_Identity_1_1"),DynField.RELATION_TYPE_IDENTITY));
381
//            relationTypeModel.addElement(new LabeledValueImpl<>(i18n.getTranslation("_Collaboration_1_1"),DynField.RELATION_TYPE_COLLABORATION));
382
            relationTypeModel.addElement(new LabeledValueImpl<>(i18n.getTranslation("_Composition_1_N"),DynField.RELATION_TYPE_COMPOSITION));
383
            relationTypeModel.addElement(new LabeledValueImpl<>(i18n.getTranslation("_Aggregate_1_N"),DynField.RELATION_TYPE_AGGREGATE));
384
            this.cboRelationType.setModel(relationTypeModel);
385
        
386
            this.pickerMyField = dataSwingManager.createAttributeDescriptorPickerController(cboMyField);
387
            this.pickerMyField.setAllowNull(true);
388
            this.pickerMyField.addChangeListener((ChangeEvent e) -> {
389
                if( disableEvents ) {
390
                    return;
391
                }
392
                doUpdateExpression();
393
            });
394
            DefaultComboBoxModel<String> model = new DefaultComboBoxModel();
395
            StoresRepository repository = DALLocator.getDataManager().getStoresRepository();
396
            List<String> tableNames = new ArrayList<>();
397
            for (String tableName : repository.keySet()) {
398
                tableNames.add(tableName);
399
            }
400
            Collections.sort(tableNames);
401
            for (String tableName : tableNames) {
402
                model.addElement(tableName);
403
            }
404
            this.cboTable.setEditable(false);
405
            this.cboTable.setModel(model);
406
            this.cboTable.addItemListener((ItemEvent e) -> {
407
              if( disableEvents ) {
408
                  return;
409
              }
410
              if (e.getStateChange() != ItemEvent.SELECTED) {
411
                return;
412
              }
413
              Thread th = new Thread(() ->
414
                  { doTableChanged(); },
415
                "FeatureTypePanelToManyTableChanged"
416
              );
417
              th.start();
418
            });
419
            this.pickerForeignField = dataSwingManager.createAttributeDescriptorPickerController(cboForeignField);
420
            this.pickerForeignField.setAllowNull(true);
421
            this.pickerForeignField.addChangeListener((ChangeEvent e) -> {
422
                if( disableEvents ) {
423
                    return;
424
                }
425
                doUpdateExpression();
426
            });
427
            
428
            this.pickerExpression = ExpressionEvaluatorSwingLocator.getManager().createExpressionPickerController(
429
                    txtExpression, 
430
                    btnExpression, 
431
                    btnExpressionBokkmarks, 
432
                    btnExpressionHistory
433
            );
434
        }
435

  
436
        private void doTableChanged() {
437
            String tableName = (String) this.cboTable.getSelectedItem();
438
            if( StringUtils.isBlank(tableName) ) {
439
                return;
440
            }
441
            StoresRepository repository = DALLocator.getDataManager().getStoresRepository();
442
            DataStore store = repository.getStore(tableName);
443
            if( !(store instanceof FeatureStore) ) {
444
                return;
445
            }
446
            FeatureStore featureStore = (FeatureStore) store;
447
            FeatureType featureType;
448
            try {
449
                featureType = featureStore.getDefaultFeatureType();
450
            } catch (DataException ex) {
451
                return;
452
            }
453
            DataSwingManager dataSwingManager = DALSwingLocator.getSwingManager();
454
            
455
            this.pickerForeignField.setFeatureType(featureType);
456
            if (featureType == null) {
457
                return;
458
            }
459
            dataSwingManager.configureExpressionBuilder(this.pickerExpression.getConfig(), featureStore);
460
        }
461
        
462
        private void doUpdateExpression() {
463
            String myField = this.pickerMyField.getName();
464
            if( StringUtils.isBlank(myField) ) {
465
                this.pickerExpression.set(null);
466
                return;
467
            }
468
            String foreignField = this.pickerForeignField.getName();
469
            if( StringUtils.isBlank(foreignField) ) {
470
                this.pickerExpression.set(null);
471
                return;
472
            }
473
            String tableName = this.getTableName();
474
            if( StringUtils.isBlank(tableName) ) {
475
                this.pickerExpression.set(null);
476
                return;
477
            }
478
            DataManager dataManager = DALLocator.getDataManager();
479
            DALExpressionBuilder builder = dataManager.createDALExpressionBuilder();
480
            SQLBuilder.SelectBuilder select = builder.select();
481
            select.from().table().name(tableName);
482
            select.column().all();
483
            select.where().set(builder.expression().eq(
484
                    builder.expression().column(myField),
485
                    builder.expression().getattr(tableName, foreignField)
486
                )
487
            );
488
            this.pickerExpression.set(ExpressionUtils.createExpression(select.toString()));
489
        }
490
        
491
        private String[] getFieldsAndTable(Expression expression) {
492
            if (ExpressionUtils.isEmpty(expression)) {
493
                return null;
494
            }
495
            try {
496
                Code code = expression.getCode();
497
                if( !StringUtils.equalsIgnoreCase(Callable.name(code),FUNCTION_SELECT) ) {
498
                    return null;
499
                }
500
                Code.Callable callable = (Code.Callable) code;
501
                String tableName;
502
                Codes args = callable.parameters();
503
                Code storeName_code = (Code) args.get(1);
504
                if (storeName_code instanceof Code.Identifier) {
505
                    tableName = ((Code.Identifier) storeName_code).name();
506
                } else if (storeName_code instanceof Code.Constant) {
507
                    Code.Constant storeName_const = (Code.Constant) storeName_code;
508
                    if (storeName_const.value() instanceof CharSequence) {
509
                        tableName = storeName_const.value().toString();
510
                    } else {
511
                        return null;
512
                    }
513
                } else {
514
                    return null;
515
                }
516
                if (StringUtils.isBlank(tableName)) {
517
                    return null;
518
                }
519
                String foreignColumnName = null;
520
                String myColumnName = null;
521
                Code where = callable.parameters().get(2); // WHERE
522
                Code myFieldCode = getCode(
523
                        where,
524
                        new ImmutablePair<>(OPERATOR_EQ, 0)
525
                );
526
                if( myFieldCode != null ) {
527
                    myColumnName = Objects.toString(Identifier.name(myFieldCode), null);
528
                }
529
                Code foreingFieldCode = getCode(
530
                        where,
531
                        new ImmutablePair<>(OPERATOR_EQ, 1),
532
                        new ImmutablePair<>(FUNCTION_GETATTR, 1)
533
                );
534
                if( foreingFieldCode != null ) {
535
                    foreignColumnName = Objects.toString(Constant.value(foreingFieldCode), null);
536
                }
537
                return new String[] { myColumnName, tableName,foreignColumnName };
538
            } catch(Throwable t) {
539
                LOGGER.warn("Can't get table and code from expression '"+expression.getPhrase()+"' in toMany controller",t);
540
                return null;
541
            }
542
        }
543
        
544
        private Code getCode(Code code, Pair<String,Integer>... args) {
545
            for (Pair<String, Integer> arg : args) {
546
                if( !StringUtils.equalsIgnoreCase(Callable.name(code),arg.getLeft()) ) {
547
                    return null;
548
                }
549
                code = Callable.parameters(code).get(arg.getRight());
550
            }
551
            return code;
552
        }
553

  
554
        private String getTableName() {
555
            String s = (String) this.cboTable.getSelectedItem();
556
            if( StringUtils.isBlank(s) ) {
557
                return null;
558
            }
559
            return s;
560
        }
561
        
562
        public void setEditable(boolean editable) {
563
            this.cboRelationType.setEnabled(editable);
564
            this.pickerMyField.setEditable(editable);
565
            this.cboTable.setEnabled(editable);
566
            this.pickerForeignField.setEditable(editable);
567
            this.pickerExpression.setEditable(editable);
568
            this.editable = editable;
569
        }
570
        
571
        public void setEnabled(boolean enabled) {
572
            if( !editable ) {
573
                enabled =  false;
574
            }
575
            this.cboRelationType.setEnabled(enabled);
576
            this.pickerMyField.setEnabled(enabled);
577
            this.cboTable.setEnabled(enabled);
578
            this.pickerForeignField.setEnabled(enabled);
579
            this.pickerExpression.setEditable(enabled);
580
        }
581
        
582
        public void clean() {
583
            this.cboRelationType.setSelectedIndex(-1);
584
            this.pickerMyField.clean();
585
            this.cboTable.setSelectedIndex(-1);
586
            this.pickerForeignField.clean();
587
            this.pickerExpression.set(null);
588
        }
589
        
590
        public void put(FeatureAttributeDescriptor descriptor) {
591
            if (descriptor == null) {
592
                this.clean();
593
                return;
594
            }
595
            boolean prevDisableEvents = this.disableEvents;
596
            try {
597
                this.disableEvents = true;
598
                this.pickerMyField.setFeatureType(descriptor.getFeatureType());
599
                ListElement.setSelected(this.cboRelationType, descriptor.getRelationType());
600
                FeatureAttributeEmulator attrEmulator = descriptor.getFeatureAttributeEmulator();
601
                if (attrEmulator instanceof FeatureAttributeEmulatorExpression) {
602
                    Expression expression = ((FeatureAttributeEmulatorExpression) attrEmulator).getExpression();
603
                    String[] fieldsAndTable = this.getFieldsAndTable(expression);
604
                    if (fieldsAndTable == null) {
605
                        this.cboTable.setSelectedIndex(-1);
606
                        this.pickerForeignField.clean();
607
                        return;
608
                    }
609
                    this.pickerMyField.set(fieldsAndTable[0]);
610
                    this.cboTable.setSelectedItem(fieldsAndTable[1]);
611
                    doTableChanged();
612
                    this.pickerForeignField.set(fieldsAndTable[2]);
613
                    this.pickerExpression.set(expression);
614
                }
615
            } catch (Throwable t) {
616
                LOGGER.warn("Can't set attribute descriptor in toMany controller",t);
617
            } finally {
618
                this.disableEvents = prevDisableEvents;
619
            }
620
        }
621

  
622
        public void fetch(EditableFeatureAttributeDescriptor descriptor) {
623
            if( descriptor == null ) {
624
                this.clean();
625
                return;
626
            }
627
            Expression exp = this.pickerExpression.get();
628
            if( ExpressionUtils.isPhraseEmpty(exp) ) {
629
                descriptor.setFeatureAttributeEmulator((Expression)null);
630
            } else {
631
                descriptor.setFeatureAttributeEmulator(exp);
632
            }
633
        }
634
        
635
        public int getRelationType() {
636
            Object n = this.cboRelationType.getSelectedItem();
637
            if( n == null ) {
638
                return DynField.RELATION_TYPE_NONE;
639
            }
640
            return ((LabeledValue<Integer>)n).getValue();
641
        }
642
    }
643
    
644

  
283 645
    private static class AvailableValuesController {
284 646

  
285 647
        private final JList lstValues;
......
439 801
    private CalculatorController<Integer> pickerOrder;
440 802
    private AvailableValuesController availableValuesController;
441 803
    private AggregateController<Tag> tagsController;
442
    private ForeingKeyController foreingKeyController;
804
    private ToOneController toOneController;
443 805
    private ExpressionPickerController pickerValuesFilter;
444 806

  
445 807
    private int mode;
......
494 856
        final I18nManager i18n = ToolsLocator.getI18nManager();
495 857
        final DataTypesManager dataTypeManager = ToolsLocator.getDataTypesManager();
496 858

  
859
//        ToolsSwingUtils.ensureMaxRows(this.tblAttrTagsItems,19);
860
        ToolsSwingUtils.ensureMaxRows(this.gridAttrTagsTable, 10);
861
        this.splAttrTags = ToolsSwingUtils.createVerticalSplit(
862
                this.grdAttrTags,
863
                this.gridAttrTagsTable, false,
864
                this.gridAttrTagsItem, true
865
        );
866
        
497 867
        DefaultComboBoxModel<ListElement<Integer>> modelTypes = new DefaultComboBoxModel<>();
498 868
        for (ListElement<Integer> element : fieldTypes) {
499 869
            modelTypes.addElement(element);
......
568 938
        swingManager.translate(this.lblAvailableValues);
569 939
        swingManager.translate(this.lblAvailableValuesLabel);
570 940
        swingManager.translate(this.lblAvailableValuesValue);
571
        swingManager.translate(this.lblRelationType);
572 941
        swingManager.translate(this.btnAvailableValuesAdd);
573 942
        swingManager.translate(this.btnAvailableValuesUpdate);
574 943
        swingManager.translate(this.btnAvailableValuesRemove);
......
578 947
        swingManager.translate(this.lblAttrTagsItemNotes);
579 948
        swingManager.translate(this.lblValuesFilter);
580 949

  
581
        swingManager.translate(this.lblForeingKeyCodeName);
582
        swingManager.translate(this.lblForeingKeyLabelFormula);
583
        swingManager.translate(this.lblForeingKeyTableName);
584
        swingManager.translate(this.lblIsClosedList);
585
        swingManager.translate(this.chkIsForeingKey);
950
        swingManager.translate(this.lblRelationRepository);
586 951

  
952
        swingManager.translate(this.lblRelationNone);
953
        swingManager.translate(this.lblRelationToOne);
954
        swingManager.translate(this.lblRelationToMany);
955
        
956
        swingManager.translate(this.lblRelationToOneType);
957
        swingManager.translate(this.lblRelationToOneCondition);
958
        swingManager.translate(this.lblRelationToOneLabelFormula);
959
        swingManager.translate(this.lblRelationToOneIsClosedList);
960

  
961
        swingManager.translate(this.lblRelationToManyType);
962
        swingManager.translate(this.lblRelationToManyExpression);
963
        swingManager.translate(this.lblRelationToManyCondition);
964

  
965
//        swingManager.translate(this.chkIsForeingKey);
966

  
587 967
        swingManager.translate(this.txtDisplaySize);
588 968
        swingManager.translate(this.txtPrecision);
589 969
        swingManager.translate(this.txtScale);
......
619 999
        swingManager.setDefaultPopupMenu(this.cboGeometryType);
620 1000
        swingManager.setDefaultPopupMenu(this.cboDataProfile);
621 1001

  
622
        swingManager.setDefaultPopupMenu(this.cboForeingKeyCodeName);
623
        swingManager.setDefaultPopupMenu(this.cboForeingKeyTableName);
1002
//        swingManager.setDefaultPopupMenu(this.cboRelationToOneCodeName);
1003
//        swingManager.setDefaultPopupMenu(this.cboRelationToOneTableName);
624 1004

  
1005
//        swingManager.setDefaultPopupMenu(this.cboRelationToManyForeignFieldName);
1006
//        swingManager.setDefaultPopupMenu(this.cboRelationToManyTableName);
1007

  
625 1008
        swingManager.setDefaultPopupMenu(this.cboGroup);
626 1009
        swingManager.setDefaultPopupMenu(this.txtOrder);
627 1010
        swingManager.setDefaultPopupMenu(this.txtLabel);
......
631 1014
        swingManager.setDefaultPopupMenu(this.txtAvailableValuesLabel);
632 1015
        swingManager.setDefaultPopupMenu(this.txtAvailableValuesValue);
633 1016

  
634
        this.foreingKeyController = new ForeingKeyController(
635
                chkIsForeingKey, 
636
                chkIsClosedList, 
637
                cboForeingKeyTableName, 
638
                cboForeingKeyCodeName, 
639
                txtForeingKeyFormula, 
640
                btnForeingKeyFormula,
641
                btnForeingKeyFormulaBookmarks,
642
                btnForeingKeyFormulaHistory
1017
        this.toOneController = new ToOneController(
1018
                txtRelationToOneMyFieldName,
1019
                cboRelationToOneType, 
1020
                chkRelationToOneIsClosedList, 
1021
                cboRelationToOneTableName, 
1022
                cboRelationToOneCodeName, 
1023
                cboRelationToOneFormula, 
1024
                btnRelationToOneFormula,
1025
                btnRelationToOneFormulaBookmarks,
1026
                btnRelationToOneFormulaHistory
643 1027
        );
1028
        this.toManyController = new ToManyController(
1029
                cboRelationToManyType, 
1030
                cboRelationToManyMyFieldName, 
1031
                cboRelationToManyTableName, 
1032
                cboRelationToManyForeignFieldName, 
1033
                
1034
                txtRelationToManyExpression, 
1035
                
1036
                btnRelationToManyExpression,
1037
                btnRelationToManyExpressionHistory,
1038
                btnRelationToManyExpressionBookmarks
1039
        );
644 1040
        this.pickerIntervalEnd = swingManager.createDatePickerController(
645 1041
                this.txtIntervalEnd,
646 1042
                this.btnIntervalEnd
......
740 1136
          doDataTypeSelection();
741 1137
        });
742 1138
        
743
        DefaultComboBoxModel<ListElement<Integer>> relationTypeModel = new DefaultComboBoxModel<>();
744
        relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_None"),DynField.RELATION_TYPE_NONE));
745
        relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_Identity_1_1"),DynField.RELATION_TYPE_IDENTITY));
746
        relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_Collaboration_1_1"),DynField.RELATION_TYPE_COLLABORATION));
747
        relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_Composition_1_N"),DynField.RELATION_TYPE_COMPOSITION));
748
        relationTypeModel.addElement(new ListElement<>(i18n.getTranslation("_Aggregate_1_N"),DynField.RELATION_TYPE_AGGREGATE));
749
        this.cboRelationType.setModel(relationTypeModel);
750

  
751

  
752 1139
        this.pickerValuesFilter = evaluatorSwingManager.createExpressionPickerController(
753 1140
                txtValuesFilter, btnValuesFilter, btnValuesFilterBookmarks, btnValuesFilterHistory
754 1141
        );
......
758 1145
            doIsAutomaticChanged();
759 1146
        });
760 1147

  
1148
        this.rdbRelationNone.addItemListener((ItemEvent e) -> { doChangeRelationType(); });
1149
        this.rdbRelationToOne.addItemListener((ItemEvent e) -> { doChangeRelationType(); });
1150
        this.rdbRelationToMany.addItemListener((ItemEvent e) -> { doChangeRelationType(); });
1151

  
1152
        SwingUtilities.invokeLater( () -> {
1153
                splAttrTags.setDividerLocation(0.4);
1154
            }
1155
        );
1156
        
761 1157
    }
1158
    
1159
    private int getRelationType() {
1160
        if( this.rdbRelationNone.isSelected() ) {
1161
            return DynField.RELATION_TYPE_NONE;
1162
        } 
1163
        if( this.rdbRelationToOne.isSelected() ) {
1164
            return this.toOneController.getRelationType();
1165
        } 
1166
        if( this.rdbRelationToMany.isSelected() ) {
1167
            return this.toManyController.getRelationType();
1168
        }
1169
        return DynField.RELATION_TYPE_NONE;
1170
    }
762 1171

  
1172
    private void doChangeRelationType() {
1173
        boolean enabled;
1174
        switch(this.getMode() ) {
1175
            case MODE_EDIT_ONLY_METADATA:
1176
            case MODE_EDIT_ALL:
1177
                enabled = true;
1178
                break;
1179
            case MODE_SHOW_ONLY:
1180
            default:
1181
                enabled = false;
1182
                break;
1183
        }
1184

  
1185
        if( this.rdbRelationNone.isSelected() ) {
1186
            this.pickerVirtualFieldGetter.setEnabled(enabled);
1187
            this.toOneController.setEnabled(false);
1188
            this.toManyController.setEnabled(false);
1189
            this.toManyController.setEnabled(false);
1190
        } else if( this.rdbRelationToOne.isSelected() ) {
1191
            this.pickerVirtualFieldGetter.setEnabled(enabled);
1192
            this.toManyController.setEnabled(false);
1193
            if( this.isVirtualField() ) {
1194
                this.rdbRelationNone.setSelected(true);
1195
            } else {
1196
                this.toOneController.setEnabled(enabled);
1197
            }
1198
        } else if( this.rdbRelationToMany.isSelected() ) {
1199
            if( !this.isVirtualField() || this.getDataType().getType()!=DataTypes.LIST ) {
1200
                this.rdbRelationNone.setSelected(true);
1201
            } else {
1202
                this.pickerVirtualFieldGetter.setEnabled(false);
1203
                this.toOneController.setEnabled(false);
1204
                this.toManyController.setEnabled(enabled);
1205
            }
1206
        }
1207
    }
1208
    
763 1209
    @Override
764 1210
    public JComponent asJComponent() {
765 1211
        return this;
......
924 1370
            
925 1371
            descriptor.setDefaultFormat(this.txtDefaultFormat.getText());
926 1372
            descriptor.setDataProfileName((String) ListElement.getSelected(this.cboDataProfile));
927
            descriptor.setRelationType((int) ListElement.getSelected(this.cboRelationType));
928 1373
            switch (descriptor.getType()) {
929 1374
                case DataTypes.GEOMETRY:
930 1375
                    GeometryManager geomManager = GeometryLocator.getGeometryManager();
......
1048 1493
        descriptor.setAvailableValues(this.availableValuesController.get());
1049 1494

  
1050 1495
        this.tagsController.getModel().fetch(descriptor.getTags());
1051
        this.foreingKeyController.fetch(descriptor.getForeingKey());
1496

  
1497
        this.toOneController.fetch(descriptor);
1498
        this.toManyController.fetch(descriptor);
1499
        if( rdbRelationToOne.isSelected() ) {
1500
            descriptor.setRelationType(this.toOneController.getRelationType());
1501
            descriptor.getForeingKey().setForeingKey(true);
1502
        } else if( rdbRelationToMany.isSelected() ) {
1503
            descriptor.setRelationType(this.toManyController.getRelationType());
1504
            descriptor.getForeingKey().setForeingKey(false);
1505
        } else if( rdbRelationNone.isSelected() ) {
1506
            descriptor.setRelationType(DynField.RELATION_TYPE_NONE);
1507
            descriptor.getForeingKey().setForeingKey(false);
1508
        }
1509

  
1510

  
1052 1511
        return descriptor;
1053 1512
    }
1054 1513

  
......
1091 1550
        this.txtMaxValue.setText("");
1092 1551
        this.availableValuesController.clean();
1093 1552
        this.tagsController.clean();
1094
        this.foreingKeyController.clean();
1553
        this.toOneController.clean();
1095 1554
    }
1096 1555

  
1097 1556
    @Override
......
1195 1654
          ListElement.setSelected(cboFieldType, dataType.getType());
1196 1655
        }
1197 1656
 
1198
        ListElement.setSelected(cboRelationType, descriptor.getRelationType());
1199

  
1200 1657
        String profile = descriptor.getDataProfileName();
1201 1658
        if (StringUtils.isBlank(profile)) {
1202 1659
            this.cboDataProfile.setSelectedIndex(-1);
......
1227 1684
        }
1228 1685
        this.tagsController.setModel(new TagsModel(descriptor.getTags()));
1229 1686

  
1230
        this.foreingKeyController.put(descriptor.getForeingKey());
1687
        this.toOneController.put(descriptor);
1688
        this.toManyController.put(descriptor);
1689
        switch(descriptor.getRelationType()) {
1690
            case DynField.RELATION_TYPE_NONE:
1691
                this.rdbRelationNone.setSelected(true);
1692
                this.rdbRelationToOne.setSelected(false);
1693
                this.rdbRelationToMany.setSelected(false);
1694
                this.toOneController.clean();
1695
                this.toManyController.clean();
1696
                break;
1697
            case DynField.RELATION_TYPE_IDENTITY:
1698
            case DynField.RELATION_TYPE_COLLABORATION:
1699
                this.rdbRelationNone.setSelected(false);
1700
                this.rdbRelationToOne.setSelected(true);
1701
                this.rdbRelationToMany.setSelected(false);
1702
                this.toManyController.clean();
1703
                break;
1704
            case DynField.RELATION_TYPE_COMPOSITION:
1705
            case DynField.RELATION_TYPE_AGGREGATE:
1706
                this.rdbRelationNone.setSelected(false);
1707
                this.rdbRelationToOne.setSelected(false);
1708
                this.rdbRelationToMany.setSelected(true);
1709
                this.pickerVirtualFieldGetter.setEnabled(false);
1710
//                this.pickerVirtualFieldGetter.set(null);
1711
                this.toOneController.clean();
1712
                break;
1713
              
1714
        }
1231 1715
        
1232 1716
        if (!(descriptor instanceof EditableFeatureAttributeDescriptor)) {
1233 1717
            this.setMode(FeatureTypePanel.MODE_SHOW_ONLY);
......
1325 1809
            this.tabAditionalFields.setEnabledAt(1, false);
1326 1810
            this.tabAditionalFields.setEnabledAt(2, false);
1327 1811
        }
1812
//        updateRelationState();
1813
        doChangeRelationType();
1328 1814
      } catch (Exception ex) {
1329 1815
        LOGGER.warn("Problems changing field type.", ex);
1330 1816
      }
......
1350 1836
        DataType dataType = this.getDataType();
1351 1837
        switch(this.mode) {
1352 1838
            case MODE_EDIT_ALL:
1353
                this.cboRelationType.setEnabled(true);
1354 1839
                this.txtDefaultValue.setEditable(!this.chkIsAutomatic.isSelected());
1355 1840
                this.txtDefaultFormat.setEditable(true);
1356 1841
                this.txtFieldName.setEditable(true);
......
1397 1882
                this.pickerValuesFilter.setEditable(true);
1398 1883
                this.availableValuesController.setEditable(true);
1399 1884
                this.tagsController.setEnabled(true);
1400
                this.foreingKeyController.setEditable(true);
1401 1885
                break;
1402 1886
            case MODE_EDIT_ONLY_METADATA:
1403 1887
                if( this.chkVirtualField.isSelected() ) {
......
1423 1907
                    this.pickerCRS.setEditable(false);
1424 1908
                }
1425 1909

  
1426
                this.cboRelationType.setEnabled(true);
1427 1910
                this.txtDefaultValue.setEditable(true);
1428 1911
                this.txtDefaultFormat.setEditable(true);
1429 1912
                this.pickerIntervalEnd.setEditable(true);
......
1456 1939
                this.pickerValuesFilter.setEditable(true);
1457 1940
                this.availableValuesController.setEditable(true);
1458 1941
                this.tagsController.setEnabled(true);
1459
                this.foreingKeyController.setEditable(true);
1460 1942
                break;
1461 1943
            case MODE_SHOW_ONLY:
1462
                this.cboRelationType.setEnabled(false);
1463 1944
                this.txtDefaultValue.setEditable(false);
1464 1945
                this.txtDefaultFormat.setEditable(false);
1465 1946
                this.txtFieldName.setEditable(false);
......
1497 1978
                this.pickerValuesFilter.setEditable(false);
1498 1979
                this.availableValuesController.setEditable(false);
1499 1980
                this.tagsController.setEnabled(false);
1500
                this.foreingKeyController.setEditable(false);
1501 1981
                break;
1502 1982
        }
1983
        updateRelationState();
1503 1984
    }
1985
    
1986
    private void updateRelationState() {
1987
        switch(this.mode) {
1988
            case MODE_EDIT_ALL:
1989
            case MODE_EDIT_ONLY_METADATA:
1990
                if( this.isVirtualField() ) {
1991
                    this.toOneController.setEditable(false);
1992
                    this.rdbRelationToOne.setEnabled(false);
1993
                    this.toManyController.setEditable(this.getDataType().getType() == DataTypes.LIST);
1994
                    this.rdbRelationToMany.setEnabled(this.getDataType().getType() == DataTypes.LIST);
1995
                } else {
1996
                    this.toOneController.setEditable(true);
1997
                    this.rdbRelationToOne.setEnabled(true);
1998
                    this.toManyController.setEditable(false);
1999
                    this.rdbRelationToMany.setEnabled(false);
2000
                }
2001
                this.rdbRelationNone.setEnabled(true);
2002
                if( this.rdbRelationToMany.isSelected() ) {
2003
                    this.pickerVirtualFieldGetter.setEnabled(false);
2004
//                    this.pickerVirtualFieldGetter.set(null);
2005
                }
2006
                break;
2007
            case MODE_SHOW_ONLY:
2008
            default:
2009
                this.toOneController.setEditable(false);
2010
                this.toManyController.setEditable(false);
2011
                this.rdbRelationToOne.setEnabled(false);
2012
                this.rdbRelationToMany.setEnabled(false);
2013
                this.rdbRelationNone.setEnabled(false);
2014
                if( this.rdbRelationToMany.isSelected() ) {
2015
                    this.pickerVirtualFieldGetter.setEnabled(false);
2016
//                    this.pickerVirtualFieldGetter.set(null);
2017
                }
2018
                break;
2019
        }
2020
    }
1504 2021

  
1505 2022
    private void doCheckPrecisionAndScale() {
1506 2023
      DataType dataType = this.getDataType();
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
28 28
public class DefaultFeatureTypePanelView extends JPanel
29 29
{
30 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 31
   JLabel lblLabel = new JLabel();
43 32
   JLabel lblDescription = new JLabel();
44 33
   JTextField txtLabel = new JTextField();
45 34
   JTextArea txtDescription = new JTextArea();
46 35
   JLabel lblTags = new JLabel();
47 36
   JPanel gridTags = new JPanel();
48
   HorizontalLineComponent horizontallinecomponent2 = new HorizontalLineComponent();
37
   HorizontalLineComponent horizontallinecomponent1 = new HorizontalLineComponent();
49 38
   JPanel gridTagsItems = new JPanel();
50 39
   JTable tblTagsItems = new JTable();
51 40
   JButton btnTagsNew = new JButton();
......
61 50
   JComboBox cboTagsItemValue = new JComboBox();
62 51
   JLabel lblTagsItemNotes = new JLabel();
63 52
   JLabel lblTagsItemNotesValue = new JLabel();
53
   JPanel gridAttributes = new JPanel();
54
   HorizontalLineComponent horizontallinecomponent2 = new HorizontalLineComponent();
55
   JPanel gridAttributesTable = new JPanel();
56
   JTable tblFields = new JTable();
57
   JButton btnNew = new JButton();
58
   JButton btnDelete = new JButton();
59
   JPanel gridAttributesDetail = new JPanel();
60
   JPanel pnlField = new JPanel();
61
   JButton btnFormFieldAccept = new JButton();
62
   JButton btnFormFieldDiscard = new JButton();
63
   JButton btnFormFieldModify = new JButton();
64 64
   JCheckBox chkRulesValidateFeatureBeforeInsert = new JCheckBox();
65 65
   JCheckBox chkRulesValidateFeaturesAtFinishEditing = new JCheckBox();
66 66
   TitledSeparator lblRulesDefaultRules = new TitledSeparator();
......
184 184
      jpanel1.setLayout(formlayout1);
185 185

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

  
......
197 197
   public JPanel createPanel1()
198 198
   {
199 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");
200
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(0.1),CENTER:2DLU:NONE,FILL:DEFAULT:GROW(0.8),CENTER:2DLU:NONE");
201 201
      CellConstraints cc = new CellConstraints();
202 202
      jpanel1.setLayout(formlayout1);
203 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 204
      lblLabel.setName("lblLabel");
313 205
      lblLabel.setText("_Label");
314 206
      jpanel1.add(lblLabel,cc.xy(2,2));
......
345 237
      CellConstraints cc = new CellConstraints();
346 238
      gridTags.setLayout(formlayout1);
347 239

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

  
350 242
      gridTags.add(creategridTagsItems(),cc.xy(1,1));
351 243
      gridTags.add(creategridTagsItem(),cc.xy(1,3));
......
356 248
   public JPanel creategridTagsItems()
357 249
   {
358 250
      gridTagsItems.setName("gridTagsItems");
359
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
251
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
360 252
      CellConstraints cc = new CellConstraints();
361 253
      gridTagsItems.setLayout(formlayout1);
362 254

  
......
367 259
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
368 260
      gridTagsItems.add(jscrollpane1,cc.xy(1,1));
369 261

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

  
375
   public JPanel createPanel5()
267
   public JPanel createPanel2()
376 268
   {
377 269
      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)");
270
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE");
379 271
      CellConstraints cc = new CellConstraints();
380 272
      jpanel1.setLayout(formlayout1);
381 273

  
......
400 292
      CellConstraints cc = new CellConstraints();
401 293
      gridTagsItem.setLayout(formlayout1);
402 294

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

  
409
   public JPanel createPanel6()
301
   public JPanel createPanel3()
410 302
   {
411 303
      JPanel jpanel1 = new JPanel();
412 304
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
......
435 327
   public JPanel creategrdTagsItemView()
436 328
   {
437 329
      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");
330
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
439 331
      CellConstraints cc = new CellConstraints();
440 332
      grdTagsItemView.setLayout(formlayout1);
441 333

  
......
466 358
      return grdTagsItemView;
467 359
   }
468 360

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  
469 469
   public JPanel createPanel7()
470 470
   {
471 471
      JPanel jpanel1 = new JPanel();
......
512 512
   public JPanel creategridRulesTable()
513 513
   {
514 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)");
515
      FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
516 516
      CellConstraints cc = new CellConstraints();
517 517
      gridRulesTable.setLayout(formlayout1);
518 518

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

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

  
......
634 634

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

  
642 643
      btnRuleValidationHistory.setActionCommand("...");
643 644
      btnRuleValidationHistory.setName("btnRuleValidationHistory");
645
      btnRuleValidationHistory.setOpaque(false);
644 646
      btnRuleValidationHistory.setText("...");
645 647
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
646 648
      btnRuleValidationHistory.setBorder(emptyborder2);
......
648 650

  
649 651
      btnRuleValidationBookmarks.setActionCommand("...");
650 652
      btnRuleValidationBookmarks.setName("btnRuleValidationBookmarks");
653
      btnRuleValidationBookmarks.setOpaque(false);
651 654
      btnRuleValidationBookmarks.setText("...");
652 655
      EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
653 656
      btnRuleValidationBookmarks.setBorder(emptyborder3);
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureAttributePanelView.xml
25 25
    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
26 26
   </super>
27 27
   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureAttributePanelView.xml</at>
28
   <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE</at>
29
   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
28
   <at name="rowspecs">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),CENTER:2DLU:NONE</at>
29
   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE</at>
30 30
   <at name="components">
31 31
    <object classname="java.util.LinkedList">
32 32
     <item >
......
134 134
             </object>
135 135
            </at>
136 136
            <at name="name">txtFieldName</at>
137
            <at name="width">674</at>
137
            <at name="width">1322</at>
138 138
            <at name="height">22</at>
139 139
           </object>
140 140
          </at>
......
283 283
                      </at>
284 284
                      <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
285 285
                     </super>
286
                     <at name="id">embedded.34931999</at>
287
                     <at name="rowspecs">CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3PX:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE</at>
288
                     <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
286
                     <at name="id">embedded.33363039</at>
287
                     <at name="rowspecs">CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3PX: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</at>
288
                     <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE</at>
289 289
                     <at name="components">
290 290
                      <object classname="java.util.LinkedList">
291 291
                       <item >
......
393 393
                               </object>
394 394
                              </at>
395 395
                              <at name="name">txtSize</at>
396
                              <at name="width">577</at>
396
                              <at name="width">1225</at>
397 397
                              <at name="height">22</at>
398 398
                             </object>
399 399
                            </at>
......
568 568
                               </object>
569 569
                              </at>
570 570
                              <at name="name">txtPrecision</at>
571
                              <at name="width">577</at>
571
                              <at name="width">1225</at>
572 572
                              <at name="toolTipText">_Number_of_digits_used_to_represent_the_number_Includes_the_digits_of_the_integer_part_and_the_digits_of_the_decimal_part</at>
573 573
                              <at name="height">22</at>
574 574
                             </object>
......
623 623
                               </object>
624 624
                              </at>
625 625
                              <at name="name">txtDefaultValue</at>
626
                              <at name="width">577</at>
626
                              <at name="width">1225</at>
627 627
                              <at name="height">22</at>
628 628
                             </object>
629 629
                            </at>
......
737 737
                               </object>
738 738
                              </at>
739 739
                              <at name="name">cboDataProfile</at>
740
                              <at name="width">577</at>
740
                              <at name="width">1225</at>
741 741
                              <at name="items">
742 742
                               <object classname="com.jeta.forms.store.properties.ItemsProperty">
743 743
                                <at name="name">items</at>
......
857 857
                               </object>
858 858
                              </at>
859 859
                              <at name="name">txtScale</at>
860
                              <at name="width">577</at>
860
                              <at name="width">1225</at>
861 861
                              <at name="toolTipText">_Number_of_decimal_digits_used_to_represent_the_number</at>
862 862
                              <at name="height">22</at>
863 863
                             </object>
......
874 874
                           <at name="cellconstraints">
875 875
                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff