Browse Source

Merge pull request #250 in BA/design from ~ZPC/basic_design:dev to dev

* commit 'baa85099e643daaff8695c1fa058f208887fff6c':
  代码质量
  设计器bug, 条件属性那边选普通形态, 无法保存公式, 日期等格式.
  设计器bug, 条件属性那边选普通形态, 无法保存公式, 日期等格式
master
superman 8 years ago
parent
commit
1002dcc349
  1. 18
      designer/src/com/fr/design/condition/PresentHighlightPane.java

18
designer/src/com/fr/design/condition/PresentHighlightPane.java

@ -97,21 +97,21 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
}
public void populate(HighlightAction ha) {
present = ((PresentHighlightAction)ha).getPresent();
if (!(present instanceof NormalPresent)) {
presentComboBox.setSelectedIndex(1);
} else {
presentComboBox.setSelectedIndex(0);
valueEditor.populate(((NormalPresent)present).getNormalPresent());
int valueIndex = ((PresentHighlightAction)ha).getValueIndex();
Object obj = ((PresentHighlightAction)ha).getValue();
presentComboBox.setSelectedIndex(valueIndex);
if(null != obj) {
this.valueEditor.populate(obj);
}
}
public HighlightAction update() {
if (presentComboBox.getSelectedIndex() == 0) {
if (this.valueEditor.update() instanceof String) {
Object value = this.valueEditor.update();
if (presentComboBox.getSelectedIndex() == 1) {
if (value instanceof String) {
present = new NormalPresent(this.valueEditor.update());
}
}
return new PresentHighlightAction(present);
return new PresentHighlightAction(this.valueEditor.update());
}
}
Loading…
Cancel
Save