コンボ ボックスには と の 2 つの値がAND
ありOR
ます。
現在選択されている値と以前の値が異なる場合にのみ、このイベントが発生するため、コンボのプロパティ変更リスナーを作成しました。しかし、値が同じであっても、このイベントを発生させる必要がありますか?
これは私のサンプルコードスニペットです:
public void setRuleOperation(String ruleOperation) {
String oldValue = this.ruleOperation;
if (oldValue != ruleOperation) {
this.ruleOperation = ruleOperation;
getPropertyChangeSupport().firePropertyChange(PROPERTY_OPERATION, oldValue, null);
}
this.ruleOperation = ruleOperation;
}