i've found a litte ¿bug?
When readOnly is true, spinner stills change the value of property in key events.
Mi solution:
1º setHideTrigger(true)
2º inspect readOnly in onSpinnerUpClick and onSpinnerDownClick
the result:
Code:
protected void onSpinnerUpClick(ComponentEvent ce) {
if (getValue() == null || isValid() == false) {
return;
}
Number newValue = getValue().doubleValue() + getStepValue().doubleValue();
if (newValue.doubleValue() <= getMaxValue().doubleValue() && !readOnly) {
setValue(newValue);
fireEvent(SpinnerUpClick, ce);
}
}
protected void onSpinnerDownClick(ComponentEvent ce) {
if (getValue() == null || isValid() == false) {
return;
}
Number newValue = getValue().doubleValue() - getStepValue().doubleValue();
if (newValue.doubleValue() >= getMinValue().doubleValue() && !readOnly) {
setValue(newValue);
fireEvent(SpinnerDownClick, ce);
}
}
Suggestions:
i think it would be more visual to a new arrow to indicate the readOnly state.
like atum, be nice if Spinner dismiss TimeField (with his combo behavior)
Thaks a lot for this field, i love it!!!