Exemplo n.º 1
0
 @Override
 public void setValue(Integer value) {
   if (!Util.equalsOrNull(this.value, value)) {
     this.value = value;
     being.fireValueChangedEvent(this);
   }
 }
Exemplo n.º 2
0
  public boolean checkValue(Integer newRefValue) {
    boolean changed = false;

    if (!Util.equalsOrNull(getReferenceValue(), newRefValue)) {
      setReferenceValue(newRefValue);
      changed = true;
    }
    Integer value = getValue();
    if (value != null) {
      int max = getMaximum();
      int min = getMinimum();
      if (value > max) {
        setValue(max);
        changed = true;
      } else if (value < min) {
        setValue(min);
        changed = true;
      }
    }
    return changed;
  }