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.kie.workbench.common.widgets.client.ruleselector.RuleSelectorDropdown.java

License:Apache License

public void setRuleNames(final Collection<String> ruleNames) {
    for (final String ruleName : ruleNames) {
        AnchorListItem label = new AnchorListItem(ruleName);
        label.addClickHandler(new ClickHandler() {
            @Override//from  w  w w  .  j a  va 2s . c o m
            public void onClick(ClickEvent event) {
                ValueChangeEvent.fire(RuleSelectorDropdown.this, ruleName);
            }
        });

        dropdownMenu.add(label);
    }
}

From source file:org.kie.workbench.common.widgets.client.ruleselector.RuleSelectorDropdown.java

License:Apache License

private AnchorListItem makeNoneLabel() {
    final AnchorListItem label = GWT.create(AnchorListItem.class);
    label.setText(CommonConstants.INSTANCE.LineNoneLine());
    label.addClickHandler(new ClickHandler() {
        @Override//from  w  w  w .  j  av a  2s.  c  o m
        public void onClick(ClickEvent event) {
            ValueChangeEvent.fire(RuleSelectorDropdown.this, "");
        }
    });

    return label;
}

From source file:org.kie.workbench.common.widgets.client.widget.PercentageBar.java

License:Apache License

public void setValue(Integer value, boolean fireEvents) {

    percent = value;/*from  w  w w  . j a v  a 2  s  .  c  om*/

    setColor();

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

    if (fireEvents) {
        ValueChangeEvent.fire(this, value);
    }

}

From source file:org.kino.client.Html5Historian.java

@Override
public void newItem(String token, boolean issueEvent) {
    if (getToken().equals(token)) { // not sure if this is needed, but just in case
        return;/*from w w  w . j ava 2s .c  om*/
    }
    // your own logic here to construct the new URI

    String path = Window.Location.createUrlBuilder().setParameter(token).buildString();

    pushState(path);
    if (issueEvent) {
        ValueChangeEvent.fire(this, getToken());
    }
}

From source file:org.kino.client.Html5Historian.java

public void goToBase(boolean issueEvent) {
    if (Window.Location.getParameter("page") == null)
        return;//from   ww w  .ja  v  a  2  s  . c o  m

    String path = Window.Location.createUrlBuilder().removeParameter("page").buildString();

    pushState(path);
    if (issueEvent) {
        ValueChangeEvent.fire(this, getToken());
    }
}

From source file:org.kino.client.Html5Historian.java

public void newParamentr(String param, String value, boolean issueEvent) {
    String oldPath = Window.Location.createUrlBuilder().buildString();

    String path = Window.Location.createUrlBuilder().setParameter(param, value).buildString();
    if (oldPath.equals(path)) {
        return;/* www. j av a2 s .  c om*/
    }
    pushState(path);
    if (issueEvent) {
        ValueChangeEvent.fire(this, getToken());
    }
}

From source file:org.kino.client.Html5Historian.java

private void onPopState() {
    ValueChangeEvent.fire(this, getToken());
}

From source file:org.kuali.student.common.ui.client.widgets.impl.KSDatePickerImpl.java

License:Educational Community License

private void fireValueChangeEvent() {
    ValueChangeEvent.fire(this, selectedDate);
}

From source file:org.modeshape.web.client.HtmlHistory.java

License:Apache License

private void onPopState(String url) {
    StringBuilder b = new StringBuilder();
    b.append(url);/*w w  w  .j  a va 2  s . com*/
    ValueChangeEvent.fire(this, b.toString());
}

From source file:org.nuxeo.opensocial.container.client.ui.CustomListBox.java

License:Open Source License

public void setValue(String value, boolean fireEvents) {
    setValue(value);/*from  w w  w  .j  a v a2  s  .c o  m*/
    if (fireEvents)
        ValueChangeEvent.fire(this, value);
}