Example usage for com.google.gwt.event.logical.shared ValueChangeEvent fire

List of usage examples for com.google.gwt.event.logical.shared ValueChangeEvent fire

Introduction

In this page you can find the example usage for com.google.gwt.event.logical.shared ValueChangeEvent fire.

Prototype

public static <T> void fire(HasValueChangeHandlers<T> source, T value) 

Source Link

Document

Fires a value change event on all registered handlers in the handler manager.

Usage

From source file:org.bonitasoft.console.client.view.TextAreaEditor.java

License:Open Source License

public void setValue(String aValue, boolean aFireEvents) {
    setValue(aValue);
    ValueChangeEvent.fire(TextAreaEditor.this, getValue());
}

From source file:org.bonitasoft.console.client.view.TextBoxEditor.java

License:Open Source License

public void setValue(String aValue, boolean aFireEvents) {
    setValue(aValue);
    ValueChangeEvent.fire(TextBoxEditor.this, getValue());
}

From source file:org.bonitasoft.forms.client.view.widget.CheckboxGroupWidget.java

License:Open Source License

/**
 * Set the value of the widget// ww  w .ja  va2 s . c o  m
 * 
 * @param value
 */
public void setValue(final Collection<String> values, boolean fireEvents) {
    final List<String> oldValues = getValue();
    if (values != null && oldValues.containsAll(values) && values.containsAll(oldValues)) {
        fireEvents = false;
    }
    for (final CheckBox checkbox : checkboxes) {
        if (values != null && values.contains(checkbox.getFormValue())) {
            checkbox.setValue(true);
        } else {
            checkbox.setValue(false);
        }
    }
    if (fireEvents) {
        ValueChangeEvent.fire(this, true);
    }
}

From source file:org.bonitasoft.forms.client.view.widget.CheckboxGroupWidget.java

License:Open Source License

/**
 * Set the wigdet available values/* w ww.  ja v a 2  s. co  m*/
 * 
 * @param availableValues
 */
public void setAvailableValues(final List<ReducedFormFieldAvailableValue> availableValues,
        final boolean fireEvents) {
    clearCheckboxes();
    for (final ReducedFormFieldAvailableValue availableValue : availableValues) {
        final CheckBox checkBox = createCheckbox(allowHTML, availableValue);
        addItemsStyle(checkBox, itemsStyle);
        saveCheckbox(checkBox);
        groupWidgets.add(checkBox);
    }
    if (fireEvents) {
        ValueChangeEvent.fire(this, true);
    }
    inputDiv.add(groupWidgets);
}

From source file:org.bonitasoft.forms.client.view.widget.RadioButtonGroupWidget.java

License:Open Source License

/**
 * Set the value of the widget//from  w  w w . ja va  2s . co m
 * 
 * @param value
 */
public void setValue(final String value, boolean fireEvents) {
    if (getValue() != null && getValue().equals(value) || value != null && value.equals(getValue())) {
        fireEvents = false;
    }
    for (final RadioButton radioButton : radioButtons) {
        if (value != null && value.equals(radioButton.getFormValue())) {
            radioButton.setValue(true);
        } else {
            radioButton.setValue(false);
        }
        if (fireEvents) {
            ValueChangeEvent.fire(radioButton, true);
        }
    }
}

From source file:org.bonitasoft.forms.client.view.widget.RadioButtonGroupWidget.java

License:Open Source License

/**
 * Set the wigdet available values/*from w ww  . ja  va2 s  . c om*/
 * 
 * @param availableValues
 */
public void setAvailableValues(final List<ReducedFormFieldAvailableValue> availableValues,
        final boolean fireEvents) {
    clearRadioButtons();
    for (final ReducedFormFieldAvailableValue availableValue : availableValues) {
        final RadioButton radioButton = createRadioButton(radioButtonGroupName, availableValue, allowHTML);
        addItemsStyle(radioButton, itemsStyle);
        saveRadioButton(radioButton);
        groupWidgets.add(radioButton);
    }
    if (fireEvents) {
        ValueChangeEvent.fire(this, true);
    }
}

From source file:org.cloudcoder.app.client.view.DateTimePicker.java

License:Open Source License

public DateTimePicker() {
    FlowPanel panel = new FlowPanel();

    dateBox = new UTCDateBox();
    FlowPanel dateDiv = new FlowPanel();
    dateDiv.add(dateBox);/*from  w  w  w. j  a  v a  2  s. c  o  m*/
    panel.add(dateDiv);
    timeBox = new UTCTimeBox();
    FlowPanel timeDiv = new FlowPanel();
    timeDiv.add(timeBox);
    panel.add(timeDiv);
    initWidget(panel);

    // Listen for change events from the date box and time box
    dateBox.addValueChangeHandler(new ValueChangeHandler<Long>() {
        @Override
        public void onValueChange(ValueChangeEvent<Long> event) {
            ValueChangeEvent.fire(DateTimePicker.this, getValue());
        }
    });
    timeBox.addValueChangeHandler(new ValueChangeHandler<Long>() {
        @Override
        public void onValueChange(ValueChangeEvent<Long> event) {
            ValueChangeEvent.fire(DateTimePicker.this, getValue());
        }
    });
}

From source file:org.cloudcoder.app.client.view.DateTimePicker.java

License:Open Source License

@Override
public void setValue(Long value, boolean fireEvents) {
    setValue(value);/* w w w  .ja  v  a2 s. c  om*/
    if (fireEvents) {
        ValueChangeEvent.fire(this, value);
    }
}

From source file:org.cruxframework.crux.smartfaces.client.input.NumberBox.java

License:Apache License

@Override
public HandlerRegistration addValueChangeHandler(ValueChangeHandler<Number> handler) {
    // Initialization code
    if (!valueChangeHandlerInitialized) {
        valueChangeHandlerInitialized = true;
        addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                ValueChangeEvent.fire(NumberBox.this, getValue());
            }//from w w  w.  j a v a 2s.  c o  m
        });
    }
    return addHandler(handler, ValueChangeEvent.getType());
}

From source file:org.cruxframework.crux.widgets.client.colorpicker.HuePicker.java

License:Apache License

private void fireValueChanged(int hue) {
    ValueChangeEvent.fire(this, hue);
}