Revision 47378
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/impl/DefaultEditingNotificationManager.java | ||
---|---|---|
28 | 28 |
import java.util.HashMap; |
29 | 29 |
import java.util.List; |
30 | 30 |
import java.util.Map; |
31 |
import java.util.Objects; |
|
31 | 32 |
import javax.swing.JComponent; |
32 | 33 |
import javax.swing.SwingUtilities; |
33 | 34 |
import org.apache.commons.lang.StringUtils; |
... | ... | |
52 | 53 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
53 | 54 |
import org.gvsig.fmap.dal.feature.Feature; |
54 | 55 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
56 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
|
57 |
import org.gvsig.fmap.dal.feature.FeatureRule; |
|
55 | 58 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
56 | 59 |
import org.gvsig.fmap.dal.feature.FeatureType; |
60 |
import org.gvsig.fmap.dal.feature.exception.ValidateFeaturesException; |
|
57 | 61 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
58 | 62 |
import org.gvsig.tools.ToolsLocator; |
59 | 63 |
import org.gvsig.tools.dynobject.DynObjectManager; |
... | ... | |
290 | 294 |
Tags tags = featureType.getTags(); |
291 | 295 |
boolean forceShowForm = tags != null && tags.getBoolean(TAG_FORCE_SHOW_FORM_ON_INSERT, false); |
292 | 296 |
while( true ) { |
293 |
if( !forceShowForm ) { |
|
297 |
boolean validateOk = true; |
|
298 |
if( feature instanceof EditableFeature ) { |
|
299 |
// Esto deberia ser siempre cierto. |
|
300 |
try { |
|
301 |
for (FeatureRule rule : featureType.getRules()) { |
|
302 |
if( rule != null ) { |
|
303 |
if( rule.checkWhen(FeatureRule.CHECK_WHEN_USER_EDIT_FEATURE) ) { |
|
304 |
try { |
|
305 |
rule.validate((EditableFeature) feature, feature.getStore()); |
|
306 |
} catch (ValidateFeaturesException ex) { |
|
307 |
validateOk = false; |
|
308 |
} catch (Exception ex) { |
|
309 |
FeatureReference ref = feature.getReference(); |
|
310 |
LOGGER.warn("Can't run validate rule '"+rule.getName()+"' on feature '"+Objects.toString(ref)+"'.", ex); |
|
311 |
} |
|
312 |
} |
|
313 |
} |
|
314 |
} |
|
315 |
} catch (Exception ex) { |
|
316 |
FeatureReference ref = feature.getReference(); |
|
317 |
LOGGER.warn("Can't run validate feature '"+Objects.toString(ref)+"'."); |
|
318 |
} |
|
319 |
} |
|
320 |
if( validateOk && !forceShowForm ) { |
|
294 | 321 |
if( canWriteFeature(feature) ) { |
295 | 322 |
// La feature se puede validar y no precisa de intervencion del |
296 | 323 |
// usuario. Retornamos true. |
... | ... | |
312 | 339 |
} |
313 | 340 |
} |
314 | 341 |
|
342 |
@Override |
|
315 | 343 |
public boolean canWriteFeature(Feature feature) { |
316 | 344 |
FeatureType featureType = feature.getType(); |
317 | 345 |
if( !featureType.isCheckFeaturesAtInsert() ) { |
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/featurerule/FeatureRuleController.java | ||
---|---|---|
28 | 28 |
private final JTextComponent txtRuleDescription; |
29 | 29 |
private final JCheckBox chkRuleCheckAtFinishEditing; |
30 | 30 |
private final JCheckBox chkRuleCheckAtUpdate; |
31 |
private final JCheckBox chkRuleCheckAtEditFeature; |
|
31 | 32 |
private final JTextComponent txtRuleValidation; |
32 | 33 |
private final JButton btnRuleValidation; |
33 | 34 |
private final JButton btnRuleValidationBookmarks; |
... | ... | |
43 | 44 |
JTextComponent txtRuleDescription, |
44 | 45 |
JCheckBox chkRuleCheckAtFinishEditing, |
45 | 46 |
JCheckBox chkRuleCheckAtUpdate, |
47 |
JCheckBox chkRuleCheckAtEditFeature, |
|
46 | 48 |
JTextComponent txtRuleValidation, |
47 | 49 |
JButton btnRuleValidation, |
48 | 50 |
JButton btnRuleValidationBookmarks, |
... | ... | |
52 | 54 |
this.txtRuleDescription = txtRuleDescription; |
53 | 55 |
this.chkRuleCheckAtFinishEditing = chkRuleCheckAtFinishEditing; |
54 | 56 |
this.chkRuleCheckAtUpdate = chkRuleCheckAtUpdate; |
57 |
this.chkRuleCheckAtEditFeature = chkRuleCheckAtEditFeature; |
|
55 | 58 |
this.txtRuleValidation = txtRuleValidation; |
56 | 59 |
this.btnRuleValidation = btnRuleValidation; |
57 | 60 |
this.btnRuleValidationBookmarks = btnRuleValidationBookmarks; |
... | ... | |
101 | 104 |
this.txtRuleDescription.setEnabled(enabled); |
102 | 105 |
this.chkRuleCheckAtFinishEditing.setEnabled(enabled); |
103 | 106 |
this.chkRuleCheckAtUpdate.setEnabled(enabled); |
107 |
this.chkRuleCheckAtEditFeature.setEnabled(enabled); |
|
104 | 108 |
} |
105 | 109 |
|
106 | 110 |
@Override |
... | ... | |
110 | 114 |
this.txtRuleDescription.setText(rule.getDescription()); |
111 | 115 |
this.chkRuleCheckAtFinishEditing.setSelected(rule.checkAtFinishEditing()); |
112 | 116 |
this.chkRuleCheckAtUpdate.setSelected(rule.checkAtUpdate()); |
117 |
this.chkRuleCheckAtEditFeature.setSelected(rule.checkWhen(FeatureRule.CHECK_WHEN_USER_EDIT_FEATURE)); |
|
113 | 118 |
if( this.ruleIsAExpression ) { |
114 | 119 |
this.pickervalidation.set(((FeatureRuleExpression)rule).getExpression()); |
115 | 120 |
} |
... | ... | |
130 | 135 |
theRule.setDescription(this.txtRuleDescription.getText()); |
131 | 136 |
theRule.setCheckAtFinishEditing(this.chkRuleCheckAtFinishEditing.isSelected()); |
132 | 137 |
theRule.setCheckAtUpdate(this.chkRuleCheckAtUpdate.isSelected()); |
138 |
theRule.setCheckWhen(this.chkRuleCheckAtEditFeature.isSelected()?FeatureRule.CHECK_WHEN_USER_EDIT_FEATURE:0); |
|
133 | 139 |
theRule.setExpression(this.pickervalidation.get()); |
134 | 140 |
return true; |
135 | 141 |
} |
... | ... | |
141 | 147 |
this.txtRuleDescription.setText(""); |
142 | 148 |
this.chkRuleCheckAtFinishEditing.setSelected(false); |
143 | 149 |
this.chkRuleCheckAtUpdate.setSelected(false); |
150 |
this.chkRuleCheckAtEditFeature.setSelected(false); |
|
144 | 151 |
this.pickervalidation.set(null); |
145 | 152 |
} |
146 | 153 |
|
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 | ||
---|---|---|
74 | 74 |
JLabel lblRuleName = new JLabel(); |
75 | 75 |
JLabel lblRuleDescription = new JLabel(); |
76 | 76 |
JLabel lblRuleCheckAtFinishEditing = new JLabel(); |
77 |
JLabel lblRuleCheckAtUpdate = new JLabel(); |
|
78 | 77 |
JLabel lblRuleValidation = new JLabel(); |
79 | 78 |
JTextField txtRuleName = new JTextField(); |
80 | 79 |
JCheckBox chkRuleCheckAtFinishEditing = new JCheckBox(); |
81 |
JCheckBox chkRuleCheckAtUpdate = new JCheckBox(); |
|
82 |
JTextField txtRuleDescription = new JTextField(); |
|
83 | 80 |
JTextArea txtRuleValidation = new JTextArea(); |
84 | 81 |
JButton btnRuleValidation = new JButton(); |
85 | 82 |
JButton btnRuleValidationHistory = new JButton(); |
86 | 83 |
JButton btnRuleValidationBookmarks = new JButton(); |
84 |
JTextArea txtRuleDescription = new JTextArea(); |
|
85 |
JLabel lblRuleCheckAtUpdate = new JLabel(); |
|
86 |
JCheckBox chkRuleCheckAtUpdate = new JCheckBox(); |
|
87 |
JLabel lblRuleCheckAtEditFeature = new JLabel(); |
|
88 |
JCheckBox chkRuleCheckAtEditFeature = new JCheckBox(); |
|
87 | 89 |
JButton btnRuleFormFieldAccept = new JButton(); |
88 | 90 |
JButton btnRuleFormFieldDiscard = new JButton(); |
89 | 91 |
JButton btnRuleFormFieldModify = new JButton(); |
... | ... | |
567 | 569 |
public JPanel createPanel9() |
568 | 570 |
{ |
569 | 571 |
JPanel jpanel1 = new JPanel(); |
570 |
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)"); |
|
572 |
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)");
|
|
571 | 573 |
CellConstraints cc = new CellConstraints(); |
572 | 574 |
jpanel1.setLayout(formlayout1); |
573 | 575 |
|
... | ... | |
577 | 579 |
|
578 | 580 |
lblRuleDescription.setName("lblRuleDescription"); |
579 | 581 |
lblRuleDescription.setText("_Description"); |
580 |
jpanel1.add(lblRuleDescription,cc.xy(1,3));
|
|
582 |
jpanel1.add(lblRuleDescription,new CellConstraints(1,3,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
|
|
581 | 583 |
|
582 | 584 |
lblRuleCheckAtFinishEditing.setName("lblRuleCheckAtFinishEditing"); |
583 | 585 |
lblRuleCheckAtFinishEditing.setText("_Check_at_finish_editing"); |
584 | 586 |
jpanel1.add(lblRuleCheckAtFinishEditing,cc.xy(1,5)); |
585 | 587 |
|
586 |
lblRuleCheckAtUpdate.setName("lblRuleCheckAtUpdate"); |
|
587 |
lblRuleCheckAtUpdate.setText("_Check_at_insert"); |
|
588 |
jpanel1.add(lblRuleCheckAtUpdate,cc.xy(1,7)); |
|
589 |
|
|
590 | 588 |
lblRuleValidation.setName("lblRuleValidation"); |
591 | 589 |
lblRuleValidation.setText("_Validation"); |
592 |
jpanel1.add(lblRuleValidation,new CellConstraints(1,9,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
|
|
590 |
jpanel1.add(lblRuleValidation,new CellConstraints(1,11,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
|
|
593 | 591 |
|
594 | 592 |
txtRuleName.setName("txtRuleName"); |
595 | 593 |
jpanel1.add(txtRuleName,cc.xy(3,1)); |
... | ... | |
597 | 595 |
chkRuleCheckAtFinishEditing.setName("chkRuleCheckAtFinishEditing"); |
598 | 596 |
jpanel1.add(chkRuleCheckAtFinishEditing,cc.xy(3,5)); |
599 | 597 |
|
598 |
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 |
|
|
600 | 610 |
chkRuleCheckAtUpdate.setName("chkRuleCheckAtUpdate"); |
601 | 611 |
jpanel1.add(chkRuleCheckAtUpdate,cc.xy(3,7)); |
602 | 612 |
|
603 |
txtRuleDescription.setName("txtRuleDescription"); |
|
604 |
jpanel1.add(txtRuleDescription,cc.xy(3,3)); |
|
613 |
lblRuleCheckAtEditFeature.setName("lblRuleCheckAtEditFeature"); |
|
614 |
lblRuleCheckAtEditFeature.setText("_Check_at_edit_feature"); |
|
615 |
jpanel1.add(lblRuleCheckAtEditFeature,cc.xy(1,9)); |
|
605 | 616 |
|
606 |
jpanel1.add(createPanel10(),cc.xy(3,9)); |
|
607 |
addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2,4,6,8 }); |
|
617 |
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 }); |
|
608 | 621 |
return jpanel1; |
609 | 622 |
} |
610 | 623 |
|
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/DefaultFeatureTypePanel.java | ||
---|---|---|
367 | 367 |
swingManager.translate(this.lblRuleDescription); |
368 | 368 |
swingManager.translate(this.lblRuleCheckAtFinishEditing); |
369 | 369 |
swingManager.translate(this.lblRuleCheckAtUpdate); |
370 |
swingManager.translate(this.lblRuleCheckAtEditFeature); |
|
370 | 371 |
swingManager.translate(this.lblRuleValidation); |
371 | 372 |
swingManager.translate(this.btnRulesNew); |
372 | 373 |
swingManager.translate(this.btnRulesDelete); |
... | ... | |
446 | 447 |
txtRuleDescription, |
447 | 448 |
chkRuleCheckAtFinishEditing, |
448 | 449 |
chkRuleCheckAtUpdate, |
450 |
chkRuleCheckAtEditFeature, |
|
449 | 451 |
txtRuleValidation, |
450 | 452 |
btnRuleValidation, |
451 | 453 |
btnRuleValidationBookmarks, |
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.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/DefaultFeatureTypePanelView.xml</at> |
28 |
<at name="path">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/DefaultFeatureTypePanelView.xml</at> |
|
28 | 29 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE</at> |
29 | 30 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
30 | 31 |
<at name="components"> |
... | ... | |
108 | 109 |
</at> |
109 | 110 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
110 | 111 |
</super> |
111 |
<at name="id">embedded.1247906093</at>
|
|
112 |
<at name="id">embedded.1161392568</at>
|
|
112 | 113 |
<at name="rowspecs">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</at> |
113 | 114 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE</at> |
114 | 115 |
<at name="components"> |
... | ... | |
449 | 450 |
</at> |
450 | 451 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
451 | 452 |
</super> |
452 |
<at name="id">embedded.876169053</at>
|
|
453 |
<at name="id">embedded.967863058</at>
|
|
453 | 454 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at> |
454 | 455 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0)</at> |
455 | 456 |
<at name="components"> |
... | ... | |
548 | 549 |
</at> |
549 | 550 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
550 | 551 |
</super> |
551 |
<at name="id">embedded.743164628</at>
|
|
552 |
<at name="id">embedded.645662940</at>
|
|
552 | 553 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0)</at> |
553 | 554 |
<at name="colspecs">FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
554 | 555 |
<at name="components"> |
... | ... | |
651 | 652 |
</at> |
652 | 653 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
653 | 654 |
</super> |
654 |
<at name="id">embedded.892263845</at>
|
|
655 |
<at name="id">embedded.1204836926</at>
|
|
655 | 656 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE</at> |
656 | 657 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
657 | 658 |
<at name="components"> |
... | ... | |
961 | 962 |
</at> |
962 | 963 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
963 | 964 |
</super> |
964 |
<at name="id">embedded.1200136901</at>
|
|
965 |
<at name="id">embedded.1299170627</at>
|
|
965 | 966 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0)</at> |
966 | 967 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
967 | 968 |
<at name="components"> |
... | ... | |
983 | 984 |
</at> |
984 | 985 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
985 | 986 |
</super> |
986 |
<at name="id">embedded.962237184</at>
|
|
987 |
<at name="id">embedded.1120124932</at>
|
|
987 | 988 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE</at> |
988 | 989 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
989 | 990 |
<at name="components"> |
... | ... | |
1267 | 1268 |
</at> |
1268 | 1269 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
1269 | 1270 |
</super> |
1270 |
<at name="id">embedded.1641109431</at>
|
|
1271 |
<at name="id">embedded.968113579</at>
|
|
1271 | 1272 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE</at> |
1272 | 1273 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:GROW(1.0)</at> |
1273 | 1274 |
<at name="components"> |
... | ... | |
2029 | 2030 |
</at> |
2030 | 2031 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
2031 | 2032 |
</super> |
2032 |
<at name="id">embedded.1485664025</at>
|
|
2033 |
<at name="id">embedded.782812846</at>
|
|
2033 | 2034 |
<at name="rowspecs">CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE</at> |
2034 | 2035 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
2035 | 2036 |
<at name="components"> |
... | ... | |
2051 | 2052 |
</at> |
2052 | 2053 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
2053 | 2054 |
</super> |
2054 |
<at name="id">embedded.606226124</at>
|
|
2055 |
<at name="id">embedded.512902721</at>
|
|
2055 | 2056 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)</at> |
2056 | 2057 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0)</at> |
2057 | 2058 |
<at name="components"> |
... | ... | |
2150 | 2151 |
</at> |
2151 | 2152 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
2152 | 2153 |
</super> |
2153 |
<at name="id">embedded.437372407</at>
|
|
2154 |
<at name="id">embedded.343498333</at>
|
|
2154 | 2155 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0)</at> |
2155 | 2156 |
<at name="colspecs">FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
2156 | 2157 |
<at name="components"> |
... | ... | |
2253 | 2254 |
</at> |
2254 | 2255 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
2255 | 2256 |
</super> |
2256 |
<at name="id">embedded.1669415050</at>
|
|
2257 |
<at name="id">embedded.1512012878</at>
|
|
2257 | 2258 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)</at> |
2258 | 2259 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
2259 | 2260 |
<at name="components"> |
... | ... | |
2563 | 2564 |
</at> |
2564 | 2565 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
2565 | 2566 |
</super> |
2566 |
<at name="id">embedded.1207654978</at>
|
|
2567 |
<at name="id">embedded.568684905</at>
|
|
2567 | 2568 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0)</at> |
2568 | 2569 |
<at name="colspecs">FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
2569 | 2570 |
<at name="components"> |
... | ... | |
2619 | 2620 |
</at> |
2620 | 2621 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
2621 | 2622 |
</super> |
2622 |
<at name="id">embedded.1042094998</at>
|
|
2623 |
<at name="id">embedded.1794136814</at>
|
|
2623 | 2624 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE</at> |
2624 | 2625 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
2625 | 2626 |
<at name="components"> |
... | ... | |
3174 | 3175 |
</at> |
3175 | 3176 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
3176 | 3177 |
</super> |
3177 |
<at name="id">embedded.1874422604</at>
|
|
3178 |
<at name="id">embedded.977091901</at>
|
|
3178 | 3179 |
<at name="rowspecs">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</at> |
3179 | 3180 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at> |
3180 | 3181 |
<at name="components"> |
... | ... | |
3418 | 3419 |
</at> |
3419 | 3420 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
3420 | 3421 |
</super> |
3421 |
<at name="id">embedded.394939728</at>
|
|
3422 |
<at name="id">embedded.743200147</at>
|
|
3422 | 3423 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:GROW(1.0)</at> |
3423 | 3424 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0)</at> |
3424 | 3425 |
<at name="components"> |
... | ... | |
3440 | 3441 |
</at> |
3441 | 3442 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
3442 | 3443 |
</super> |
3443 |
<at name="id">embedded.845345190</at>
|
|
3444 |
<at name="id">embedded.822973775</at>
|
|
3444 | 3445 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0)</at> |
3445 | 3446 |
<at name="colspecs">FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
3446 | 3447 |
<at name="components"> |
... | ... | |
3543 | 3544 |
</at> |
3544 | 3545 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
3545 | 3546 |
</super> |
3546 |
<at name="id">embedded.2090991861</at>
|
|
3547 |
<at name="id">embedded.571001852</at>
|
|
3547 | 3548 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)</at> |
3548 | 3549 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
3549 | 3550 |
<at name="components"> |
... | ... | |
3853 | 3854 |
</at> |
3854 | 3855 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
3855 | 3856 |
</super> |
3856 |
<at name="id">embedded.1757557273</at>
|
|
3857 |
<at name="id">embedded.1193094567</at>
|
|
3857 | 3858 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0)</at> |
3858 | 3859 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE</at> |
3859 | 3860 |
<at name="components"> |
... | ... | |
3875 | 3876 |
</at> |
3876 | 3877 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
3877 | 3878 |
</super> |
3878 |
<at name="id">embedded.1543869058</at>
|
|
3879 |
<at name="rowspecs">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)</at> |
|
3879 |
<at name="id">embedded.1645454391</at>
|
|
3880 |
<at name="rowspecs">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)</at>
|
|
3880 | 3881 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE</at> |
3881 | 3882 |
<at name="components"> |
3882 | 3883 |
<object classname="java.util.LinkedList"> |
... | ... | |
3925 | 3926 |
</object> |
3926 | 3927 |
</at> |
3927 | 3928 |
<at name="name">lblRuleName</at> |
3928 |
<at name="width">127</at>
|
|
3929 |
<at name="width">188</at>
|
|
3929 | 3930 |
<at name="text">_Name</at> |
3930 | 3931 |
<at name="fill"> |
3931 | 3932 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
... | ... | |
3951 | 3952 |
<at name="colspan">1</at> |
3952 | 3953 |
<at name="rowspan">1</at> |
3953 | 3954 |
<at name="halign">default</at> |
3954 |
<at name="valign">default</at>
|
|
3955 |
<at name="valign">top</at>
|
|
3955 | 3956 |
<at name="insets" object="insets">0,0,0,0</at> |
3956 | 3957 |
</object> |
3957 | 3958 |
</at> |
... | ... | |
3985 | 3986 |
</object> |
3986 | 3987 |
</at> |
3987 | 3988 |
<at name="name">lblRuleDescription</at> |
3988 |
<at name="width">127</at>
|
|
3989 |
<at name="width">188</at>
|
|
3989 | 3990 |
<at name="text">_Description</at> |
3990 | 3991 |
<at name="fill"> |
3991 | 3992 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
... | ... | |
4045 | 4046 |
</object> |
4046 | 4047 |
</at> |
4047 | 4048 |
<at name="name">lblRuleCheckAtFinishEditing</at> |
4048 |
<at name="width">127</at>
|
|
4049 |
<at name="width">188</at>
|
|
4049 | 4050 |
<at name="text">_Check_at_finish_editing</at> |
4050 | 4051 |
<at name="fill"> |
4051 | 4052 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
... | ... | |
4067 | 4068 |
<at name="cellconstraints"> |
4068 | 4069 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
4069 | 4070 |
<at name="column">1</at> |
4070 |
<at name="row">7</at>
|
|
4071 |
<at name="row">11</at>
|
|
4071 | 4072 |
<at name="colspan">1</at> |
4072 | 4073 |
<at name="rowspan">1</at> |
4073 | 4074 |
<at name="halign">default</at> |
4074 |
<at name="valign">default</at> |
|
4075 |
<at name="insets" object="insets">0,0,0,0</at> |
|
4076 |
</object> |
|
4077 |
</at> |
|
4078 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
4079 |
</super> |
|
4080 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
4081 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
4082 |
<at name="beanproperties"> |
|
4083 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
4084 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
4085 |
<at name="properties"> |
|
4086 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
4087 |
<at name="border"> |
|
4088 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
4089 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4090 |
<at name="name">border</at> |
|
4091 |
</super> |
|
4092 |
<at name="borders"> |
|
4093 |
<object classname="java.util.LinkedList"> |
|
4094 |
<item > |
|
4095 |
<at name="value"> |
|
4096 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
4097 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4098 |
<at name="name">border</at> |
|
4099 |
</super> |
|
4100 |
</object> |
|
4101 |
</at> |
|
4102 |
</item> |
|
4103 |
</object> |
|
4104 |
</at> |
|
4105 |
</object> |
|
4106 |
</at> |
|
4107 |
<at name="name">lblRuleCheckAtUpdate</at> |
|
4108 |
<at name="width">127</at> |
|
4109 |
<at name="text">_Check_at_insert</at> |
|
4110 |
<at name="fill"> |
|
4111 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
4112 |
<at name="name">fill</at> |
|
4113 |
</object> |
|
4114 |
</at> |
|
4115 |
<at name="height">16</at> |
|
4116 |
</object> |
|
4117 |
</at> |
|
4118 |
</object> |
|
4119 |
</at> |
|
4120 |
</object> |
|
4121 |
</at> |
|
4122 |
</item> |
|
4123 |
<item > |
|
4124 |
<at name="value"> |
|
4125 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
4126 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
4127 |
<at name="cellconstraints"> |
|
4128 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
4129 |
<at name="column">1</at> |
|
4130 |
<at name="row">9</at> |
|
4131 |
<at name="colspan">1</at> |
|
4132 |
<at name="rowspan">1</at> |
|
4133 |
<at name="halign">default</at> |
|
4134 | 4075 |
<at name="valign">top</at> |
4135 | 4076 |
<at name="insets" object="insets">0,0,0,0</at> |
4136 | 4077 |
</object> |
... | ... | |
4165 | 4106 |
</object> |
4166 | 4107 |
</at> |
4167 | 4108 |
<at name="name">lblRuleValidation</at> |
4168 |
<at name="width">127</at>
|
|
4109 |
<at name="width">188</at>
|
|
4169 | 4110 |
<at name="text">_Validation</at> |
4170 | 4111 |
<at name="fill"> |
4171 | 4112 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
... | ... | |
4225 | 4166 |
</object> |
4226 | 4167 |
</at> |
4227 | 4168 |
<at name="name">txtRuleName</at> |
4228 |
<at name="width">1277</at>
|
|
4169 |
<at name="width">1216</at>
|
|
4229 | 4170 |
<at name="height">22</at> |
4230 | 4171 |
</object> |
4231 | 4172 |
</at> |
... | ... | |
4279 | 4220 |
</object> |
4280 | 4221 |
</at> |
4281 | 4222 |
<at name="name">chkRuleCheckAtFinishEditing</at> |
4282 |
<at name="width">1277</at>
|
|
4223 |
<at name="width">1216</at>
|
|
4283 | 4224 |
<at name="height">15</at> |
4284 | 4225 |
</object> |
4285 | 4226 |
</at> |
... | ... | |
4290 | 4231 |
</item> |
4291 | 4232 |
<item > |
4292 | 4233 |
<at name="value"> |
4293 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
4294 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
4295 |
<at name="cellconstraints"> |
|
4296 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
4297 |
<at name="column">3</at> |
|
4298 |
<at name="row">7</at> |
|
4299 |
<at name="colspan">1</at> |
|
4300 |
<at name="rowspan">1</at> |
|
4301 |
<at name="halign">default</at> |
|
4302 |
<at name="valign">default</at> |
|
4303 |
<at name="insets" object="insets">0,0,0,0</at> |
|
4304 |
</object> |
|
4305 |
</at> |
|
4306 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
4307 |
</super> |
|
4308 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
4309 |
<at name="beanclass">javax.swing.JCheckBox</at> |
|
4310 |
<at name="beanproperties"> |
|
4311 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
4312 |
<at name="classname">javax.swing.JCheckBox</at> |
|
4313 |
<at name="properties"> |
|
4314 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
4315 |
<at name="border"> |
|
4316 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
4317 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4318 |
<at name="name">border</at> |
|
4319 |
</super> |
|
4320 |
<at name="borders"> |
|
4321 |
<object classname="java.util.LinkedList"> |
|
4322 |
<item > |
|
4323 |
<at name="value"> |
|
4324 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
4325 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4326 |
<at name="name">border</at> |
|
4327 |
</super> |
|
4328 |
</object> |
|
4329 |
</at> |
|
4330 |
</item> |
|
4331 |
</object> |
|
4332 |
</at> |
|
4333 |
</object> |
|
4334 |
</at> |
|
4335 |
<at name="name">chkRuleCheckAtUpdate</at> |
|
4336 |
<at name="width">1277</at> |
|
4337 |
<at name="height">15</at> |
|
4338 |
</object> |
|
4339 |
</at> |
|
4340 |
</object> |
|
4341 |
</at> |
|
4342 |
</object> |
|
4343 |
</at> |
|
4344 |
</item> |
|
4345 |
<item > |
|
4346 |
<at name="value"> |
|
4347 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
4348 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
4349 |
<at name="cellconstraints"> |
|
4350 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
4351 |
<at name="column">3</at> |
|
4352 |
<at name="row">3</at> |
|
4353 |
<at name="colspan">1</at> |
|
4354 |
<at name="rowspan">1</at> |
|
4355 |
<at name="halign">default</at> |
|
4356 |
<at name="valign">default</at> |
|
4357 |
<at name="insets" object="insets">0,0,0,0</at> |
|
4358 |
</object> |
|
4359 |
</at> |
|
4360 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
4361 |
</super> |
|
4362 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
4363 |
<at name="beanclass">javax.swing.JTextField</at> |
|
4364 |
<at name="beanproperties"> |
|
4365 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
4366 |
<at name="classname">javax.swing.JTextField</at> |
|
4367 |
<at name="properties"> |
|
4368 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
4369 |
<at name="border"> |
|
4370 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
4371 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4372 |
<at name="name">border</at> |
|
4373 |
</super> |
|
4374 |
<at name="borders"> |
|
4375 |
<object classname="java.util.LinkedList"> |
|
4376 |
<item > |
|
4377 |
<at name="value"> |
|
4378 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
4379 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4380 |
<at name="name">border</at> |
|
4381 |
</super> |
|
4382 |
</object> |
|
4383 |
</at> |
|
4384 |
</item> |
|
4385 |
</object> |
|
4386 |
</at> |
|
4387 |
</object> |
|
4388 |
</at> |
|
4389 |
<at name="name">txtRuleDescription</at> |
|
4390 |
<at name="width">1277</at> |
|
4391 |
<at name="height">22</at> |
|
4392 |
</object> |
|
4393 |
</at> |
|
4394 |
</object> |
|
4395 |
</at> |
|
4396 |
</object> |
|
4397 |
</at> |
|
4398 |
</item> |
|
4399 |
<item > |
|
4400 |
<at name="value"> |
|
4401 | 4234 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
4402 | 4235 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
4403 | 4236 |
<at name="cellconstraints"> |
4404 | 4237 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
4405 | 4238 |
<at name="column">3</at> |
4406 |
<at name="row">9</at>
|
|
4239 |
<at name="row">11</at>
|
|
4407 | 4240 |
<at name="colspan">1</at> |
4408 | 4241 |
<at name="rowspan">1</at> |
4409 | 4242 |
<at name="halign">default</at> |
... | ... | |
4413 | 4246 |
</at> |
4414 | 4247 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
4415 | 4248 |
</super> |
4416 |
<at name="id">embedded.600695241</at>
|
|
4249 |
<at name="id">embedded.270120545</at>
|
|
4417 | 4250 |
<at name="rowspecs">FILL:DEFAULT:GROW(1.0)</at> |
4418 | 4251 |
<at name="colspecs">FILL:200PX:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
4419 | 4252 |
<at name="components"> |
... | ... | |
4465 | 4298 |
<at name="scrollableTracksViewportHeight">true</at> |
4466 | 4299 |
<at name="scrollableTracksViewportWidth">true</at> |
4467 | 4300 |
<at name="name">txtRuleValidation</at> |
4468 |
<at name="width">1220</at>
|
|
4301 |
<at name="width">1159</at>
|
|
4469 | 4302 |
<at name="scollBars"> |
4470 | 4303 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
4471 | 4304 |
<at name="name">scollBars</at> |
... | ... | |
4493 | 4326 |
</at> |
4494 | 4327 |
</object> |
4495 | 4328 |
</at> |
4496 |
<at name="height">217</at>
|
|
4329 |
<at name="height">168</at>
|
|
4497 | 4330 |
</object> |
4498 | 4331 |
</at> |
4499 | 4332 |
</object> |
... | ... | |
4518 | 4351 |
</at> |
4519 | 4352 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
4520 | 4353 |
</super> |
4521 |
<at name="id">embedded.921940704</at>
|
|
4354 |
<at name="id">embedded.1083009760</at>
|
|
4522 | 4355 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at> |
4523 | 4356 |
<at name="colspecs">FILL:DEFAULT:NONE</at> |
4524 | 4357 |
<at name="components"> |
... | ... | |
4817 | 4650 |
</at> |
4818 | 4651 |
</object> |
4819 | 4652 |
</at> |
4820 |
<at name="name"/>
|
|
4653 |
<at name="name"></at>
|
|
4821 | 4654 |
<at name="fill"> |
4822 | 4655 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
4823 | 4656 |
<at name="name">fill</at> |
... | ... | |
4882 | 4715 |
</object> |
4883 | 4716 |
</at> |
4884 | 4717 |
</item> |
4718 |
<item > |
|
4719 |
<at name="value"> |
|
4720 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
4721 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
4722 |
<at name="cellconstraints"> |
|
4723 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
4724 |
<at name="column">3</at> |
|
4725 |
<at name="row">3</at> |
|
4726 |
<at name="colspan">1</at> |
|
4727 |
<at name="rowspan">1</at> |
|
4728 |
<at name="halign">fill</at> |
|
4729 |
<at name="valign">fill</at> |
|
4730 |
<at name="insets" object="insets">0,0,0,0</at> |
|
4731 |
</object> |
|
4732 |
</at> |
|
4733 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
4734 |
</super> |
|
4735 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
4736 |
<at name="beanclass">javax.swing.JTextArea</at> |
|
4737 |
<at name="beanproperties"> |
|
4738 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
4739 |
<at name="classname">javax.swing.JTextArea</at> |
|
4740 |
<at name="properties"> |
|
4741 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
4742 |
<at name="border"> |
|
4743 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
4744 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4745 |
<at name="name">border</at> |
|
4746 |
</super> |
|
4747 |
<at name="borders"> |
|
4748 |
<object classname="java.util.LinkedList"> |
|
4749 |
<item > |
|
4750 |
<at name="value"> |
|
4751 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
4752 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4753 |
<at name="name">border</at> |
|
4754 |
</super> |
|
4755 |
</object> |
|
4756 |
</at> |
|
4757 |
</item> |
|
4758 |
</object> |
|
4759 |
</at> |
|
4760 |
</object> |
|
4761 |
</at> |
|
4762 |
<at name="scrollableTracksViewportHeight">true</at> |
|
4763 |
<at name="scrollableTracksViewportWidth">true</at> |
|
4764 |
<at name="name">txtRuleDescription</at> |
|
4765 |
<at name="width">1214</at> |
|
4766 |
<at name="scollBars"> |
|
4767 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
4768 |
<at name="name">scollBars</at> |
|
4769 |
<at name="verticalpolicy">20</at> |
|
4770 |
<at name="horizontalpolicy">30</at> |
|
4771 |
</object> |
|
4772 |
</at> |
|
4773 |
<at name="height">87</at> |
|
4774 |
</object> |
|
4775 |
</at> |
|
4776 |
</object> |
|
4777 |
</at> |
|
4778 |
</object> |
|
4779 |
</at> |
|
4780 |
</item> |
|
4781 |
<item > |
|
4782 |
<at name="value"> |
|
4783 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
4784 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
4785 |
<at name="cellconstraints"> |
|
4786 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
4787 |
<at name="column">1</at> |
|
4788 |
<at name="row">7</at> |
|
4789 |
<at name="colspan">1</at> |
|
4790 |
<at name="rowspan">1</at> |
|
4791 |
<at name="halign">default</at> |
|
4792 |
<at name="valign">default</at> |
|
4793 |
<at name="insets" object="insets">0,0,0,0</at> |
|
4794 |
</object> |
|
4795 |
</at> |
|
4796 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
4797 |
</super> |
|
4798 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
4799 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
4800 |
<at name="beanproperties"> |
|
4801 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
4802 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
4803 |
<at name="properties"> |
|
4804 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
4805 |
<at name="border"> |
|
4806 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
4807 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4808 |
<at name="name">border</at> |
|
4809 |
</super> |
|
4810 |
<at name="borders"> |
|
4811 |
<object classname="java.util.LinkedList"> |
|
4812 |
<item > |
|
4813 |
<at name="value"> |
|
4814 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
4815 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4816 |
<at name="name">border</at> |
|
4817 |
</super> |
|
4818 |
</object> |
|
4819 |
</at> |
|
4820 |
</item> |
|
4821 |
</object> |
|
4822 |
</at> |
|
4823 |
</object> |
|
4824 |
</at> |
|
4825 |
<at name="name">lblRuleCheckAtUpdate</at> |
|
4826 |
<at name="width">188</at> |
|
4827 |
<at name="text">_Check_at_insert_or_update_feature</at> |
|
4828 |
<at name="fill"> |
|
4829 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
4830 |
<at name="name">fill</at> |
|
4831 |
</object> |
|
4832 |
</at> |
|
4833 |
<at name="height">16</at> |
|
4834 |
</object> |
|
4835 |
</at> |
|
4836 |
</object> |
|
4837 |
</at> |
|
4838 |
</object> |
|
4839 |
</at> |
|
4840 |
</item> |
|
4841 |
<item > |
|
4842 |
<at name="value"> |
|
4843 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
4844 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
4845 |
<at name="cellconstraints"> |
|
4846 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
4847 |
<at name="column">3</at> |
|
4848 |
<at name="row">7</at> |
|
4849 |
<at name="colspan">1</at> |
|
4850 |
<at name="rowspan">1</at> |
|
4851 |
<at name="halign">default</at> |
|
4852 |
<at name="valign">default</at> |
|
4853 |
<at name="insets" object="insets">0,0,0,0</at> |
|
4854 |
</object> |
|
4855 |
</at> |
|
4856 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
4857 |
</super> |
|
4858 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
4859 |
<at name="beanclass">javax.swing.JCheckBox</at> |
|
4860 |
<at name="beanproperties"> |
|
4861 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
4862 |
<at name="classname">javax.swing.JCheckBox</at> |
|
4863 |
<at name="properties"> |
|
4864 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
4865 |
<at name="border"> |
|
4866 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
4867 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4868 |
<at name="name">border</at> |
|
4869 |
</super> |
|
4870 |
<at name="borders"> |
|
4871 |
<object classname="java.util.LinkedList"> |
|
4872 |
<item > |
|
4873 |
<at name="value"> |
|
4874 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
4875 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4876 |
<at name="name">border</at> |
|
4877 |
</super> |
|
4878 |
</object> |
|
4879 |
</at> |
|
4880 |
</item> |
|
4881 |
</object> |
|
4882 |
</at> |
|
4883 |
</object> |
|
4884 |
</at> |
|
4885 |
<at name="name">chkRuleCheckAtUpdate</at> |
|
4886 |
<at name="width">1216</at> |
|
4887 |
<at name="height">15</at> |
|
4888 |
</object> |
|
4889 |
</at> |
|
4890 |
</object> |
|
4891 |
</at> |
|
4892 |
</object> |
|
4893 |
</at> |
|
4894 |
</item> |
|
4895 |
<item > |
|
4896 |
<at name="value"> |
|
4897 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
4898 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
4899 |
<at name="cellconstraints"> |
|
4900 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
4901 |
<at name="column">1</at> |
|
4902 |
<at name="row">9</at> |
|
4903 |
<at name="colspan">1</at> |
|
4904 |
<at name="rowspan">1</at> |
|
4905 |
<at name="halign">default</at> |
|
4906 |
<at name="valign">default</at> |
|
4907 |
<at name="insets" object="insets">0,0,0,0</at> |
|
4908 |
</object> |
|
4909 |
</at> |
|
4910 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
4911 |
</super> |
|
4912 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
4913 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
4914 |
<at name="beanproperties"> |
|
4915 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
4916 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
4917 |
<at name="properties"> |
|
4918 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
4919 |
<at name="border"> |
|
4920 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
4921 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4922 |
<at name="name">border</at> |
|
4923 |
</super> |
|
4924 |
<at name="borders"> |
|
4925 |
<object classname="java.util.LinkedList"> |
|
4926 |
<item > |
|
4927 |
<at name="value"> |
|
4928 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
4929 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4930 |
<at name="name">border</at> |
|
4931 |
</super> |
|
4932 |
</object> |
|
4933 |
</at> |
|
4934 |
</item> |
|
4935 |
</object> |
|
4936 |
</at> |
|
4937 |
</object> |
|
4938 |
</at> |
|
4939 |
<at name="name">lblRuleCheckAtEditFeature</at> |
|
4940 |
<at name="width">188</at> |
|
4941 |
<at name="text">_Check_at_edit_feature</at> |
|
4942 |
<at name="fill"> |
|
4943 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
4944 |
<at name="name">fill</at> |
|
4945 |
</object> |
|
4946 |
</at> |
|
4947 |
<at name="height">16</at> |
|
4948 |
</object> |
|
4949 |
</at> |
|
4950 |
</object> |
|
4951 |
</at> |
|
4952 |
</object> |
|
4953 |
</at> |
|
4954 |
</item> |
|
4955 |
<item > |
|
4956 |
<at name="value"> |
|
4957 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
4958 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
4959 |
<at name="cellconstraints"> |
|
4960 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
4961 |
<at name="column">3</at> |
|
4962 |
<at name="row">9</at> |
|
4963 |
<at name="colspan">1</at> |
|
4964 |
<at name="rowspan">1</at> |
|
4965 |
<at name="halign">default</at> |
|
4966 |
<at name="valign">default</at> |
|
4967 |
<at name="insets" object="insets">0,0,0,0</at> |
|
4968 |
</object> |
|
4969 |
</at> |
|
4970 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
4971 |
</super> |
|
4972 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
4973 |
<at name="beanclass">javax.swing.JCheckBox</at> |
|
4974 |
<at name="beanproperties"> |
|
4975 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
4976 |
<at name="classname">javax.swing.JCheckBox</at> |
|
4977 |
<at name="properties"> |
|
4978 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
4979 |
<at name="border"> |
|
4980 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
4981 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4982 |
<at name="name">border</at> |
|
4983 |
</super> |
|
4984 |
<at name="borders"> |
|
4985 |
<object classname="java.util.LinkedList"> |
|
4986 |
<item > |
|
4987 |
<at name="value"> |
|
4988 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
4989 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
4990 |
<at name="name">border</at> |
|
4991 |
</super> |
|
4992 |
</object> |
|
4993 |
</at> |
|
4994 |
</item> |
|
4995 |
</object> |
|
4996 |
</at> |
|
4997 |
</object> |
|
4998 |
</at> |
|
4999 |
<at name="name">chkRuleCheckAtEditFeature</at> |
|
5000 |
<at name="width">1216</at> |
|
5001 |
<at name="height">15</at> |
|
5002 |
</object> |
|
5003 |
</at> |
|
5004 |
</object> |
|
5005 |
</at> |
|
5006 |
</object> |
|
5007 |
</at> |
|
5008 |
</item> |
|
4885 | 5009 |
</object> |
4886 | 5010 |
</at> |
4887 | 5011 |
<at name="properties"> |
... | ... | |
4939 | 5063 |
<at name="cellpainters"> |
4940 | 5064 |
<object classname="com.jeta.forms.store.support.Matrix"> |
4941 | 5065 |
<at name="rows"> |
4942 |
<object classname="[Ljava.lang.Object;" size="9">
|
|
5066 |
<object classname="[Ljava.lang.Object;" size="11">
|
|
4943 | 5067 |
<at name="item" index="0"> |
4944 | 5068 |
<object classname="[Ljava.lang.Object;" size="4"/> |
4945 | 5069 |
</at> |
... | ... | |
4967 | 5091 |
<at name="item" index="8"> |
4968 | 5092 |
<object classname="[Ljava.lang.Object;" size="4"/> |
4969 | 5093 |
</at> |
5094 |
<at name="item" index="9"> |
|
5095 |
<object classname="[Ljava.lang.Object;" size="4"/> |
|
5096 |
</at> |
|
5097 |
<at name="item" index="10"> |
|
5098 |
<object classname="[Ljava.lang.Object;" size="4"/> |
|
5099 |
</at> |
|
4970 | 5100 |
</object> |
4971 | 5101 |
</at> |
4972 | 5102 |
</object> |
... | ... | |
5005 | 5135 |
</at> |
5006 | 5136 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
5007 | 5137 |
</super> |
5008 |
<at name="id">embedded.1425948479</at>
|
|
5138 |
<at name="id">embedded.1688357754</at>
|
|
5009 | 5139 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:2DLU:GROW(1.0)</at> |
5010 | 5140 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
5011 | 5141 |
<at name="components"> |
... | ... | |
5584 | 5714 |
</at> |
5585 | 5715 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
5586 | 5716 |
</super> |
5587 |
<at name="id">embedded.993481612</at>
|
|
5717 |
<at name="id">embedded.1859632178</at>
|
|
5588 | 5718 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
5589 | 5719 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE</at> |
5590 | 5720 |
<at name="components"> |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureRuleExpression.java | ||
---|---|---|
36 | 36 |
|
37 | 37 |
public void setCheckAtFinishEditing(boolean checkAtFinishEditing); |
38 | 38 |
|
39 |
public void setCheckWhen(int mask); |
|
40 |
|
|
39 | 41 |
public Expression getExpression(); |
40 | 42 |
|
41 | 43 |
public void setExpression(Expression expression); |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureRule.java | ||
---|---|---|
38 | 38 |
*/ |
39 | 39 |
public interface FeatureRule extends Persistent{ |
40 | 40 |
|
41 |
public static final int CHECK_WHEN_FINISH_EDITING = 1; |
|
42 |
public static final int CHECK_WHEN_INSERT_OR_UPDATE_FEATURE = 2; |
|
43 |
public static final int CHECK_WHEN_USER_EDIT_FEATURE = 4; |
|
44 |
|
|
41 | 45 |
/** |
42 | 46 |
* Returns the rule name |
43 | 47 |
* |
... | ... | |
85 | 89 |
* true if this rule should be applied when editing is being finished, otherwise false. |
86 | 90 |
*/ |
87 | 91 |
public boolean checkAtFinishEditing(); |
92 |
|
|
93 |
public boolean checkWhen(int mask); |
|
88 | 94 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/AbstractFeatureRule.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.fmap.dal.feature; |
25 | 25 |
|
26 |
import org.gvsig.tools.util.Bitmask; |
|
26 | 27 |
|
28 |
|
|
27 | 29 |
/** |
28 | 30 |
* Abstract feature rule intended for giving a partial default implementation |
29 | 31 |
* of the {@link FeatureRule} interface to other rule implementations. It is recommended |
... | ... | |
34 | 36 |
public abstract class AbstractFeatureRule implements FeatureRule { |
35 | 37 |
protected String name; |
36 | 38 |
protected String description; |
37 |
protected boolean checkAtUpdate; |
|
38 |
protected boolean checkAtFinishEdition; |
|
39 |
protected Bitmask checkwhen; |
|
39 | 40 |
|
40 | 41 |
protected AbstractFeatureRule(String name, String description) { |
41 |
this(name,description,true,true); |
|
42 |
this( |
|
43 |
name, |
|
44 |
description, |
|
45 |
FeatureRule.CHECK_WHEN_FINISH_EDITING | |
|
46 |
FeatureRule.CHECK_WHEN_INSERT_OR_UPDATE_FEATURE |
|
47 |
); |
|
42 | 48 |
} |
43 | 49 |
|
44 | 50 |
protected AbstractFeatureRule(String name, String description, |
45 | 51 |
boolean checkAtUpdate, boolean checkAtFinishEdition) { |
52 |
this( |
|
53 |
name, |
|
54 |
description, |
|
55 |
(checkAtUpdate? FeatureRule.CHECK_WHEN_FINISH_EDITING:0) | |
|
56 |
(checkAtFinishEdition? FeatureRule.CHECK_WHEN_INSERT_OR_UPDATE_FEATURE:0) |
|
57 |
); |
|
58 |
} |
|
59 |
|
|
60 |
protected AbstractFeatureRule(String name, String description, |
|
61 |
int checkwhenmask) { |
|
46 | 62 |
this.name=name; |
47 | 63 |
this.description=description; |
48 |
this.checkAtUpdate = checkAtUpdate; |
|
49 |
this.checkAtFinishEdition = checkAtFinishEdition; |
|
64 |
this.checkwhen = Bitmask.createBitmask(checkwhenmask); |
|
50 | 65 |
} |
51 | 66 |
|
52 | 67 |
@Override |
... | ... | |
61 | 76 |
|
62 | 77 |
@Override |
63 | 78 |
public boolean checkAtFinishEditing() { |
64 |
return this.checkAtFinishEdition;
|
|
79 |
return this.checkwhen.isSetBits(CHECK_WHEN_FINISH_EDITING);
|
|
65 | 80 |
} |
66 | 81 |
|
67 | 82 |
@Override |
68 | 83 |
public boolean checkAtUpdate() { |
69 |
return this.checkAtUpdate;
|
|
84 |
return this.checkwhen.isSetBits(CHECK_WHEN_INSERT_OR_UPDATE_FEATURE);
|
|
70 | 85 |
} |
71 | 86 |
|
87 |
@Override |
|
88 |
public boolean checkWhen(int mask) { |
|
89 |
return this.checkwhen.isSetBits(mask); |
|
90 |
} |
|
91 |
|
|
92 |
protected void setCheckWhen(int mask) { |
|
93 |
this.checkwhen.setBits(mask); |
|
94 |
} |
|
72 | 95 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultFeatureRuleExpression.java | ||
---|---|---|
31 | 31 |
private static final String FEATURERULEEXPRESSION_PERSISTENCE_DEFINITION_NAME = "FeatureRuleExpression"; |
32 | 32 |
|
33 | 33 |
private Expression expression; |
34 |
private FeatureSymbolTable symbolTable; |
|
34 |
private FeatureSymbolTable featureSymbolTable; |
|
35 |
private SymbolTable symbolTable; |
|
35 | 36 |
|
36 | 37 |
public DefaultFeatureRuleExpression() { |
37 | 38 |
super(null, null, false, false); |
... | ... | |
41 | 42 |
boolean checkAtFinishEdition, Expression expression) { |
42 | 43 |
super(name, description, checkAtUpdate, checkAtFinishEdition); |
43 | 44 |
this.expression = expression; |
44 |
this.symbolTable = new FeatureSymbolTableImpl(); |
|
45 |
this.featureSymbolTable = new FeatureSymbolTableImpl(); |
|
46 |
this.symbolTable = this.featureSymbolTable.createParent(); |
|
45 | 47 |
} |
46 | 48 |
|
47 | 49 |
@Override |
... | ... | |
56 | 58 |
|
57 | 59 |
@Override |
58 | 60 |
public void validate(EditableFeature feature, FeatureStore featureStore) throws DataException { |
59 |
this.symbolTable.setFeature(feature);
|
|
60 |
Object value = this.expression.execute(symbolTable); |
|
61 |
this.featureSymbolTable.setFeature(feature);
|
|
62 |
Object value = this.expression.execute(this.symbolTable);
|
|
61 | 63 |
boolean ok = false; |
62 | 64 |
if (value != null) { |
63 | 65 |
if (value instanceof Boolean) { |
... | ... | |
95 | 97 |
definition.addDynFieldBoolean("checkAtFinishEdition"); |
96 | 98 |
definition.addDynFieldBoolean("checkAtUpdate"); |
97 | 99 |
definition.addDynFieldObject("expression").setClassOfValue(Expression.class); |
100 |
definition.addDynFieldInt("checkWhen").setMandatory(false); |
|
98 | 101 |
} |
99 | 102 |
} |
100 | 103 |
|
... | ... | |
102 | 105 |
public void loadFromState(PersistentState state) throws PersistenceException { |
103 | 106 |
this.name = state.getString("name"); |
104 | 107 |
this.description = state.getString("description"); |
105 |
this.checkAtFinishEdition = state.getBoolean("checkAtFinishEdition"); |
|
106 |
this.checkAtUpdate = state.getBoolean("checkAtUpdate"); |
|
108 |
this.checkwhen.set(state.getInt("checkWhen",0)); |
|
109 |
if( state.getBoolean("checkAtFinishEdition") ) { |
|
110 |
this.checkwhen.setBits(CHECK_WHEN_FINISH_EDITING); |
|
111 |
} |
|
112 |
if( state.getBoolean("checkAtUpdate") ) { |
|
113 |
this.checkwhen.setBits(CHECK_WHEN_INSERT_OR_UPDATE_FEATURE); |
|
114 |
} |
|
107 | 115 |
this.expression = (Expression) state.get("expression"); |
108 |
this.symbolTable = new FeatureSymbolTableImpl(); |
|
116 |
this.featureSymbolTable = new FeatureSymbolTableImpl(); |
|
117 |
this.symbolTable = this.featureSymbolTable.createParent(); |
|
109 | 118 |
} |
110 | 119 |
|
111 | 120 |
@Override |
112 | 121 |
public void saveToState(PersistentState state) throws PersistenceException { |
113 | 122 |
state.set("name", this.name); |
114 | 123 |
state.set("description", this.description); |
115 |
state.set("checkAtFinishEdition", this.checkAtFinishEdition); |
|
116 |
state.set("checkAtUpdate", this.checkAtUpdate); |
|
124 |
state.set("checkWhen", this.checkwhen.get()); |
|
125 |
state.set("checkAtFinishEdition", this.checkwhen.isSetBits(CHECK_WHEN_FINISH_EDITING)); |
|
126 |
state.set("checkAtUpdate", this.checkwhen.isSetBits(CHECK_WHEN_INSERT_OR_UPDATE_FEATURE)); |
|
117 | 127 |
state.set("expression", this.expression); |
118 | 128 |
} |
119 | 129 |
|
120 | 130 |
@Override |
121 | 131 |
public void setCheckAtUpdate(boolean checkAtUpdate) { |
122 |
this.checkAtUpdate = checkAtUpdate; |
|
132 |
if( checkAtUpdate ) { |
|
133 |
this.checkwhen.setBits(CHECK_WHEN_INSERT_OR_UPDATE_FEATURE); |
|
134 |
} else { |
|
135 |
this.checkwhen.clearBits(CHECK_WHEN_INSERT_OR_UPDATE_FEATURE); |
|
136 |
} |
|
123 | 137 |
} |
124 | 138 |
|
125 | 139 |
@Override |
126 | 140 |
public void setCheckAtFinishEditing(boolean checkAtFinishEditing) { |
127 |
this.checkAtFinishEdition = checkAtFinishEditing; |
|
141 |
if( checkAtFinishEditing ) { |
|
142 |
this.checkwhen.setBits(CHECK_WHEN_FINISH_EDITING); |
|
143 |
} else { |
|
144 |
this.checkwhen.clearBits(CHECK_WHEN_FINISH_EDITING); |
|
145 |
} |
|
128 | 146 |
} |
129 | 147 |
|
130 | 148 |
@Override |
... | ... | |
149 | 167 |
builder.add_class(this); |
150 | 168 |
builder.add("name", this.name); |
151 | 169 |
builder.add("description", this.description); |
152 |
builder.add("checkAtFinishEdition", this.checkAtFinishEdition); |
|
153 |
builder.add("checkAtUpdate", this.checkAtUpdate); |
|
170 |
builder.add("checkWhen", this.checkwhen.get()); |
|
171 |
builder.add("checkAtFinishEdition", this.checkwhen.isSetBits(CHECK_WHEN_FINISH_EDITING)); |
|
172 |
builder.add("checkAtUpdate", this.checkwhen.isSetBits(CHECK_WHEN_USER_EDIT_FEATURE)); |
|
154 | 173 |
builder.add("expression", this.expression.getPhrase()); |
155 | 174 |
return builder; |
156 | 175 |
} |
... | ... | |
159 | 178 |
public void fromJson(JsonObject json) { |
160 | 179 |
this.name = json.getString("name"); |
161 | 180 |
this.description = json.getString("description"); |
162 |
this.checkAtFinishEdition = json.getBoolean("checkAtFinishEdition", false); |
|
163 |
this.checkAtUpdate = json.getBoolean("checkAtUpdate", false); |
|
181 |
this.checkwhen.set(json.getInt("checkwhen", 0)); |
|
182 |
if( json.getBoolean("checkAtFinishEdition", false) ) { |
|
183 |
this.checkwhen.setBits(CHECK_WHEN_FINISH_EDITING); |
|
184 |
} |
|
185 |
if( json.getBoolean("checkAtUpdate", false) ) { |
|
186 |
this.checkwhen.setBits(CHECK_WHEN_INSERT_OR_UPDATE_FEATURE); |
|
187 |
} |
|
164 | 188 |
this.expression = ExpressionUtils.createExpression(json.getString("expression", null)); |
165 |
this.symbolTable = new FeatureSymbolTableImpl(); |
|
189 |
this.featureSymbolTable = new FeatureSymbolTableImpl(); |
|
190 |
this.symbolTable = this.featureSymbolTable.createParent(); |
|
166 | 191 |
} |
167 | 192 |
|
193 |
@Override |
|
194 |
public void setCheckWhen(int mask) { |
|
195 |
super.setCheckWhen(mask); |
|
196 |
} |
|
197 |
|
|
168 | 198 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1560 | 1560 |
_At_finish_editing=Al terminar edici\u00f3n |
1561 | 1561 |
_At_insert=Al insertar |
1562 | 1562 |
_Check_at_finish_editing=Comprobar al terminar edici\u00f3n |
1563 |
_Check_at_insert=Comprobar al insertar |
|
1563 |
_Check_at_insert_or_update_feature=Comprobar al insertar o actualizar feature |
|
1564 |
_Check_at_edit_feature=Comprobar al editar feature |
|
1564 | 1565 |
_Validation=Validaci\u00f3n |
1565 | 1566 |
_Name=Nombre |
1566 | 1567 |
_Value=Valor |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1478 | 1478 |
_At_finish_editing=At finish editing |
1479 | 1479 |
_At_insert=At insert |
1480 | 1480 |
_Check_at_finish_editing=Check at finish editing |
1481 |
_Check_at_insert=Check at insert |
|
1481 |
_Check_at_insert_or_update_feature=Check at insert or update feature |
|
1482 |
_Check_at_edit_feature=Check at editing feature |
|
1482 | 1483 |
_Validation=Validation |
1483 | 1484 |
_Name=Name |
1484 | 1485 |
_Value=Value |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/InstanceUtils.java | ||
---|---|---|
17 | 17 |
if( instance==null ) { |
18 | 18 |
throw new NullPointerException("An object pointer was expected to invoke method "+methodName+" and a null was received"); |
19 | 19 |
} |
20 |
Class[] parameterTypes = new Class[args.length]; |
|
21 |
Object[] parameters = new Object[args.length]; |
|
20 |
Class<?> theClass = instance.getClass(); |
|
21 |
Method method = getMethod(theClass, methodName, createParameterTypesAccurate(args)); |
|
22 |
if( method == null ) { |
|
23 |
method = getMethod(theClass, methodName, createParameterTypesFuzzy(theClass, methodName, args)); |
|
24 |
} |
|
25 |
if( method == null ) { |
|
26 |
method = getMethod(theClass, methodName, createParameterTypesAllObjects(args)); |
|
27 |
} |
|
28 |
if( method == null ) { |
|
29 |
method = getMethod(theClass, methodName, createParameterTypesFromMethodNameAndParametersCount(theClass, methodName, args)); |
|
30 |
} |
|
31 |
Object value = method.invoke(instance, args); |
|
32 |
return value; |
|
33 |
} |
|
34 |
|
|
35 |
private static Method getMethod(Class theClass, String methodName, Class[] parameterTypes) { |
|
36 |
if( parameterTypes==null ) { |
|
37 |
return null; |
|
38 |
} |
|
39 |
try { |
|
40 |
return theClass.getMethod(methodName, parameterTypes); |
|
41 |
} catch(NoSuchMethodException ex) { |
|
42 |
} |
|
43 |
return null; |
|
44 |
} |
|
45 |
|
|
46 |
private static Class[] createParameterTypesAccurate(Object[] parameters) { |
|
47 |
Class[] parameterTypes = new Class[parameters.length]; |
|
22 | 48 |
for (int i = 0; i < parameters.length; i++) { |
23 |
Object parameter = args[i];
|
|
49 |
Object parameter = parameters[i];
|
|
24 | 50 |
parameters[i] = parameter; |
25 | 51 |
if( parameter==null ) { |
26 | 52 |
parameterTypes[i] = null; |
... | ... | |
28 | 54 |
parameterTypes[i] = parameter.getClass(); |
29 | 55 |
} |
30 | 56 |
} |
31 |
Class<?> theClass = instance.getClass(); |
|
32 |
Method method = null; |
|
33 |
try { |
|
34 |
method = theClass.getMethod(methodName, parameterTypes); |
|
35 |
} catch(NoSuchMethodException ex) { |
|
57 |
return parameterTypes; |
|
58 |
} |
|
59 |
|
|
60 |
private static Class[] createParameterTypesAllObjects(Object[] parameters) { |
|
61 |
Class[] parameterTypes = new Class[parameters.length]; |
|
62 |
for (int i = 0; i < parameters.length; i++) { |
|
63 |
Object parameter = parameters[i]; |
|
64 |
parameters[i] = parameter; |
|
65 |
if( parameter==null ) { |
|
66 |
parameterTypes[i] = null; |
|
67 |
} else { |
|
68 |
parameterTypes[i] = Object.class; |
|
69 |
} |
|
36 | 70 |
} |
37 |
if( method == null ) { |
|
38 |
// Uf esto arregla cosas de StringBuilder.append, pero no |
|
39 |
// crea que sea correcto. |
|
40 |
for (int i = 0; i < parameters.length; i++) { |
|
41 |
Object parameter = args[i]; |
|
42 |
parameters[i] = parameter; |
|
43 |
if( parameter==null ) { |
|
44 |
parameterTypes[i] = null; |
|
45 |
} else { |
|
46 |
parameterTypes[i] = Object.class; |
|
47 |
} |
|
71 |
return parameterTypes; |
|
72 |
} |
|
73 |
|
|
74 |
private static Class[] createParameterTypesFromMethodNameAndParametersCount(Class theClass, String methodName, Object[] parameters) { |
|
75 |
for (Method m : theClass.getMethods()) { |
|
76 |
if( StringUtils.equals(m.getName(), methodName) && parameters.length == m.getParameterTypes().length) { |
|
77 |
return m.getParameterTypes(); |
|
48 | 78 |
} |
49 | 79 |
} |
50 |
try { |
|
51 |
method = theClass.getMethod(methodName, parameterTypes); |
|
52 |
} catch(NoSuchMethodException ex) { |
|
53 |
} |
|
54 |
if( method == null ) { |
|
55 |
// Esto es para esquivar casos como tener un ArrayList de objects y |
|
56 |
// hacer algo como arr.add(10). Dice que no hay ningun metodo add |
|
57 |
// que reciba un Integer, por que realmente el add esta declarado como |
|
58 |
// que recibe un object. |
|
59 |
// Ver TestInterpreter metodo testListAppend. |
|
60 |
for (Method m : theClass.getMethods()) { |
|
61 |
if( StringUtils.equals(m.getName(), methodName) && parameterTypes.length == m.getParameterTypes().length) { |
|
62 |
parameterTypes = m.getParameterTypes(); |
|
80 |
return null; |
|
81 |
} |
|
82 |
|
|
83 |
private static Class[] createParameterTypesFuzzy(Class theClass, String methodName, Object[] parameters) { |
|
84 |
for (Method m : theClass.getMethods()) { |
|
85 |
if( StringUtils.equals(m.getName(), methodName) && parameters.length == m.getParameterTypes().length) { |
|
86 |
int n = 0; |
|
87 |
Class[] parameterTypes = new Class[parameters.length]; |
|
88 |
for (Class<?> expectedType : m.getParameterTypes()) { |
|
89 |
Class<? extends Object> paramType = parameters[n].getClass(); |
|
90 |
if( expectedType == paramType ) { |
|
91 |
parameterTypes[n++] = expectedType; |
|
92 |
continue; |
|
93 |
} |
|
94 |
if( expectedType == Object.class ) { |
|
95 |
parameterTypes[n++] = Object.class; |
|
96 |
continue; |
|
97 |
} |
|
98 |
|
|
99 |
// |
|
100 |
// Aqui probablemente habria que hacer algunas otras |
|
101 |
// comprobaciones, por ejemplo, si expected es double y |
|
102 |
// recibimos un entero, long o float... ? deberiamos |
|
103 |
// aceptar ? ? Habria que convertir el valor a double ? |
|
104 |
// |
|
105 |
parameterTypes = null; |
|
63 | 106 |
break; |
64 | 107 |
} |
108 |
if( parameterTypes!=null ) { |
|
109 |
return parameterTypes; |
|
110 |
} |
|
65 | 111 |
} |
66 |
method = theClass.getMethod(methodName, parameterTypes); |
|
67 | 112 |
} |
68 |
Object value = method.invoke(instance, parameters); |
|
69 |
return value; |
|
113 |
return null; |
|
70 | 114 |
} |
71 | 115 |
|
116 |
|
|
117 |
|
|
72 | 118 |
} |
Also available in: Unified diff