|
|
@ -98,20 +98,22 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl |
|
|
|
|
|
|
|
|
|
|
|
public void populate(HighlightAction ha) { |
|
|
|
public void populate(HighlightAction ha) { |
|
|
|
present = ((PresentHighlightAction)ha).getPresent(); |
|
|
|
present = ((PresentHighlightAction)ha).getPresent(); |
|
|
|
if (!(present instanceof NormalPresent)) { |
|
|
|
Object obj = ((PresentHighlightAction)ha).getValue(); |
|
|
|
|
|
|
|
if (!(present instanceof NormalPresent) && null == obj) { |
|
|
|
presentComboBox.setSelectedIndex(1); |
|
|
|
presentComboBox.setSelectedIndex(1); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
presentComboBox.setSelectedIndex(0); |
|
|
|
presentComboBox.setSelectedIndex(0); |
|
|
|
valueEditor.populate(((NormalPresent)present).getNormalPresent()); |
|
|
|
this.valueEditor.populate(obj); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public HighlightAction update() { |
|
|
|
public HighlightAction update() { |
|
|
|
if (presentComboBox.getSelectedIndex() == 0) { |
|
|
|
Object value = this.valueEditor.update(); |
|
|
|
if (this.valueEditor.update() instanceof String) { |
|
|
|
if (presentComboBox.getSelectedIndex() == 1) { |
|
|
|
|
|
|
|
if (value instanceof String) { |
|
|
|
present = new NormalPresent(this.valueEditor.update()); |
|
|
|
present = new NormalPresent(this.valueEditor.update()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return new PresentHighlightAction(present); |
|
|
|
return new PresentHighlightAction(this.valueEditor.update()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |