@UiHandler("displayNameField")
 protected void handleDisplayNameChange(ValueChangeEvent<String> evt) {
   setDirty(true, EventStrategy.FIRE_EVENTS);
   if (isWellFormed()) {
     ValueChangeEvent.fire(this, getValue());
   }
 }
Example #2
0
 protected void movePrevious() {
   Slide to = getSlide(_current);
   Slide from = (Slide) _panel.getWidget(0);
   Transition transition = Transition.SLIDE;
   ValueChangeEvent.fire(this, false);
   transition.start(from, to, _panel, true);
 }
Example #3
0
 /** {@inheritDoc} */
 @Override
 public void setValue(Date value, boolean fireEvents) {
   box.setValue(dtf.format(value));
   if (fireEvents) {
     ValueChangeEvent.fire(this, value);
   }
 }
Example #4
0
 @Override
 public void setValue(final Date value, final boolean fireEvents) {
   this.value = value;
   if (fireEvents) {
     ValueChangeEvent.fire(this, value);
   }
 }
 @Override
 public void onValueChange(ValueChangeEvent<List<SelectionItem>> event) {
   if (!selectionItemsEditor.isSuppressEvent()) {
     ValueChangeEvent.fire(
         TreeSelectionEditor.this,
         Lists.<SelectionItem>newArrayList(selectionItemsEditor.getCurrentTree()));
   }
 }
Example #6
0
 public void setValue(int value, boolean fireEvent) {
   if (_value != value) {
     _value = value;
     updateSliderPosition();
     if (fireEvent) {
       ValueChangeEvent.fire(this, _value);
     }
   }
 }
  /** {@inheritDoc} */
  @Override
  public void setValue(final Date value, final boolean fireEvents) {
    errorHandlerMixin.clearErrors();
    textBox.setValue(value != null ? dateTimeFormat.format(value) : null);
    update(textBox.getElement());

    if (fireEvents) {
      ValueChangeEvent.fire(DatePickerBase.this, value);
    }
  }
 @Override
 public void setValue(final String value, final boolean fireEvents) {
   if (!isValidValue(value, false)) {
     final String validValue = makeValidValue(value);
     super.setValue(validValue, fireEvents);
     ValueChangeEvent.fire(AbstractRestrictedEntryTextBox.this, validValue);
   } else {
     super.setValue(value, fireEvents);
   }
 }
 @Override
 public void setText(final String text) {
   if (!isValidValue(text, false)) {
     final String validValue = makeValidValue(text);
     super.setText(validValue);
     ValueChangeEvent.fire(AbstractRestrictedEntryTextBox.this, validValue);
   } else {
     super.setText(text);
   }
 }
Example #10
0
 private void checkForChange() {
   String sval = getValue();
   boolean isDefault = StringUtils.areEqual(sval, getFieldDef().getDefaultValueAsString());
   // do not validate default
   if (isDefault || validate()) {
     if (!ComparisonUtil.equals(_lastInput, sval)) {
       ValueChangeEvent.fire(this, sval);
       _lastInput = sval;
     }
   }
 }
Example #11
0
 @Override
 public void setValue(Date value, boolean fireEvents) {
   this.value = value;
   if (value != null) {
     dateBox.setText(DF.format(value));
   } else {
     dateBox.setText(null);
   }
   if (fireEvents) {
     ValueChangeEvent.fire(this, value);
   }
 }
  @Override
  public void setValue(List<ArtifactCommentBean> value, boolean fireEvents) {
    this.value = value;

    for (ArtifactCommentBean commentBean : value) {
      createComment(commentBean);
    }

    if (fireEvents) {
      ValueChangeEvent.fire(this, value);
    }
  }
 @Override
 public void setValue(List<? extends Suggestion> value, boolean fireEvents) {
   clear();
   if (value != null) {
     for (Suggestion suggestion : value) {
       addItem(suggestion);
     }
   }
   if (fireEvents) {
     ValueChangeEvent.fire(this, getValue());
   }
 }
Example #14
0
  public void setValue(Integer value, boolean fireEvents) {

    percent = value;

    setColor();

    percentage.setText(Integer.toString(value) + " %");
    bar.getStyle().setWidth(value, Unit.PCT);

    if (fireEvents) {
      ValueChangeEvent.fire(this, value);
    }
  }
  protected void setValue(Long value, boolean updateTextBox, boolean fireEvents) {
    if (updateTextBox) {
      syncTextToValue(value);
    }

    // keep track of the last known value so that we only fire
    // when it's different.
    Long oldValue = lastKnownValue;
    lastKnownValue = value;

    if (fireEvents && !isSameValue(oldValue, value)) {
      ValueChangeEvent.fire(this, getValue());
    }
  }
 @Override
 public void setValue(Boolean value, boolean fireEvents) {
   selected = value;
   if (selected) {
     left.setEnabled(false);
     left.setDown(true);
     right.setEnabled(true);
     right.setDown(false);
   } else {
     right.setEnabled(false);
     right.setDown(true);
     left.setEnabled(true);
     left.setDown(false);
   }
   if (fireEvents) {
     ValueChangeEvent.fire(this, selected);
   }
 }
  @UiHandler("textBox")
  public void onBlur(BlurEvent e) {

    errorLabel.setText("test test");
    try {
      String text = textBox.getText();
      value = NumberFormat.getDecimalFormat().parse(text);
      errorLabel.setText(null);
      valid = true;

      String formattedValue = NumberFormat.getCurrencyFormat().format(value);
      textBox.setText(formattedValue);
      ValueChangeEvent.fire(ValueBoxWidgetImpl.this, new Double(value));

    } catch (NumberFormatException e1) {
      errorLabel.setText("invalid invalid");
      valid = false;
    }
  }
  /**
   * Set the current value and optionally fire the onValueChange event.
   *
   * @param curValue the current value
   * @param fireEvent fire the onValue change event if true
   */
  public void setCurrentValue(double curValue, boolean fireEvent) {
    // Confine the value to the range
    this.curValue = Math.max(minValue, Math.min(maxValue, curValue));
    double remainder = (this.curValue - minValue) % stepSize;
    this.curValue -= remainder;

    // Go to next step if more than halfway there
    if ((remainder > (stepSize / 2)) && ((this.curValue + stepSize) <= maxValue)) {
      this.curValue += stepSize;
    }

    // Redraw the knob
    drawKnob();

    // Fire the ValueChangeEvent
    if (fireEvent) {
      ValueChangeEvent.fire(this, this.curValue.intValue());
    }
  }
Example #19
0
 /** dateChange event handler. */
 public void onChange() {
   ValueChangeEvent.fire(this, getValue());
 }
Example #20
0
 /*
  * (non-Javadoc)
  *
  * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object,
  * boolean)
  */
 public void setValue(String aValue, boolean aFireEvents) {
   setValue(aValue);
   ValueChangeEvent.fire(TextBoxEditor.this, getValue());
 }
 @UiHandler("sameAs")
 protected void handleSameAsChanged(ValueChangeEvent<Optional<OWLPrimitiveDataList>> event) {
   if (isWellFormed()) {
     ValueChangeEvent.fire(this, getValue());
   }
 }
 @UiHandler("assertions")
 protected void handleAssertionsChange(ValueChangeEvent<Optional<PropertyValueList>> event) {
   if (isWellFormed()) {
     ValueChangeEvent.fire(this, getValue());
   }
 }
Example #23
0
 private void fireValueChanged(int hue) {
   ValueChangeEvent.fire(this, hue);
 }
 @Override
 public void setValue(final String value, boolean fireEvents) {
   iFilter.setValue(value, fireEvents);
   if (fireEvents) ValueChangeEvent.fire(this, value);
 }
 /** {@inheritDoc} */
 @Override
 public void onChangeDate(final Event e) {
   fireEvent(new ChangeDateEvent(e));
   ValueChangeEvent.fire(DatePickerBase.this, getValue());
 }
Example #26
0
  /**
   * Helper method for firing a 'value changed' event.
   *
   * <p>
   */
  protected void fireValueChangedEvent() {

    ValueChangeEvent.fire(this, getFormValueAsString());
  }
 public void addComment(ArtifactCommentBean commentBean) {
   value.add(commentBean);
   createComment(commentBean);
   ValueChangeEvent.fire(this, value);
 }
Example #28
0
 private void fireValueChanged() {
   ValueChangeEvent.fire(VSlider.this, value);
 }
Example #29
0
 private void handleValueEditorValueChanged() {
   ValueChangeEvent.fire(this, getValue());
   ensureBlank();
 }
Example #30
0
 private void onSelection(String selectedValue) {
   ValueChangeEvent.fire(this, selectedValue);
 }