protected void increaseValue(int step) { if (step == 0) return; String value = getText(); Number newValue = numberType.increaseValue(value, step); if (newValue == null || maxConstrained && newValue.intValue() > max) { return; } setValue(numberType.formatValue(newValue)); }
public NumericTextBox( int value, int min, int max, boolean minConstrained, boolean maxConstrained) { addKeyPressHandler(new NumericKeyPressHandler()); addKeyUpHandler(new NumericKeyUpHandler()); this.min = min; this.max = max; this.minConstrained = minConstrained; this.maxConstrained = maxConstrained; setValue(String.valueOf(value), false); }
@Override public void setValue(String value) { setValue(value, false); }
public void setValue(int value) { setValue(String.valueOf(value), false); }
@Override public void setNbReplicas(int nb) { nbReplicas.setValue(String.valueOf(nb)); }
@Override public void setNbShards(int nb) { nbShards.setValue(String.valueOf(nb)); }