Пример #1
0
 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));
 }
Пример #2
0
  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);
  }
Пример #3
0
 @Override
 public void setValue(String value) {
   setValue(value, false);
 }
Пример #4
0
 public void setValue(int value) {
   setValue(String.valueOf(value), false);
 }
Пример #5
0
 @Override
 public void setNbReplicas(int nb) {
   nbReplicas.setValue(String.valueOf(nb));
 }
Пример #6
0
 @Override
 public void setNbShards(int nb) {
   nbShards.setValue(String.valueOf(nb));
 }