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/swing/impl/featuretype/featurerule/FeatureRuleController.java
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 |
|
Also available in: Unified diff