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

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

Introduction

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

Prototype

public T getValue() 

Source Link

Document

Gets the value.

Usage

From source file:de.knightsoftnet.validationexample.client.ui.page.settings.SettingsViewGwtImpl.java

License:Apache License

/**
 * language changes./*w  w w.j a va 2  s  . c  om*/
 *
 * @param pchangeEvent change event.
 */
@UiHandler("language")
final void onChange(final ValueChangeEvent<String> pchangeEvent) {
    this.presenter.changeLanguage(pchangeEvent.getValue());
}

From source file:de.spartusch.nasfvi.client.MainWidget.java

License:Apache License

@Override
public final void onValueChange(final ValueChangeEvent<String> event) {
    String[] state = event.getValue().split("&", -1);

    if (state.length != 2) {
        throw new AssertionError();
    }/*from   www. ja v a 2s. c o  m*/

    String q = URL.decodeQueryString(state[0]).replaceAll("\\s+", " ").trim();
    String offset = state[1];

    suggestBox.setText(q);

    if (q.isEmpty()) {
        setMessage("Bitte geben Sie eine Anfrage in das Textfeld ein.", "error");
    } else if (q.matches(PLACEHOLDERS)) {
        setMessage("Bitte ersetzen Sie smtliche Platzhalter durch" + " konkrete Werte!", "error");
    } else {
        clearMessage();
        try {
            String getUrl = parseUrl + URL.encodeQueryString(q) + "&offset=" + offset;
            RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, getUrl);
            builder.setCallback(this);
            builder.send();
        } catch (RequestException e) {
            Main.displayError(e.getLocalizedMessage(), e.toString());
        }
    }
}

From source file:de.swm.commons.mobile.client.widgets.CheckBox.java

License:Apache License

/**
 * Default constructor./*  ww w . ja  v  a 2  s  .  co  m*/
 */
public CheckBox() {
    super();
    if (SWMMobile.getOsDetection().isAndroid() && Utils.isWVGA()) {
        CheckBoxIndicator indicator = new CheckBoxIndicator();
        this.getElement().insertFirst(indicator.getElement());
    }
    addDomHandler(checkBoxClickHanlders, ClickEvent.getType());
    super.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
        @Override
        public void onValueChange(ValueChangeEvent<Boolean> event) {
            if (event != null && event.getValue() != null) {
                ensureValueWillNotChangeWhenDisabled(event.getValue());
                if (isEnabled) {
                    currentValue = event.getValue();
                }
            }
        }
    });
    addDomHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            ensureValueWillNotChangeWhenDisabled(getValue());
        }
    }, ClickEvent.getType());
}

From source file:de.swm.commons.mobile.client.widgets.CheckBoxGroup.java

License:Apache License

@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
    LOGGER.info("onValueChange " + event.getValue() + " " + event.getSource().getClass());
}

From source file:de.uni_koeln.spinfo.maalr.webapp.ui.admin.client.Admin.java

License:Apache License

private void initHistory() {
    History.addValueChangeHandler(new ValueChangeHandler<String>() {
        public void onValueChange(ValueChangeEvent<String> event) {
            String historyToken = event.getValue();
            if (historyToken.trim().length() == 0) {
                showModule(modules.get(Modules.ANCHOR_DB_MANAGER));
            } else {
                showModule(modules.get(historyToken));
            }// w  ww .  j  a v  a2s  .  c om
        }
    });
}

From source file:de.uni_koeln.spinfo.maalr.webapp.ui.editor.client.Editor.java

License:Apache License

private void initHistory() {
    History.addValueChangeHandler(new ValueChangeHandler<String>() {

        public void onValueChange(ValueChangeEvent<String> event) {
            final String historyToken = event.getValue();
            if (historyToken.lastIndexOf('?') > 0) {
                String module = historyToken.substring(0, historyToken.lastIndexOf('?'));
                String state = historyToken.substring(historyToken.lastIndexOf('?') + 1);
                Composite composite = modules.get(module);
                showModule(composite);/*from www  .j  ava 2s. com*/
                if (composite instanceof HasHistorySupport) {
                    ((HasHistorySupport) composite).setHistoryToken(state);
                }
            } else {
                showModule(modules.get(historyToken));
            }
        }

        private void showModule(Composite module) {
            panel.setWidget(module);
        }
    });
}

From source file:de.voot.encfsanywhere.client.controller.ListController.java

License:Open Source License

@Override
public void onValueChange(ValueChangeEvent<String> event) {
    String token = event.getValue();

    if (token != null) {
        if (token.startsWith(HistoryItems.LIST_PREFIX)) {
            if (files == null) {
                History.newItem(HistoryItems.STORAGE_AUTO_CONNECT);
            } else {
                String path = token.substring(HistoryItems.LIST_PREFIX.length());
                showFilesEvent(path);/*from w  w w.  j a v a  2s . co m*/
            }
        }
    }
}

From source file:de.voot.encfsanywhere.client.controller.StorageConnectController.java

License:Open Source License

@Override
public void onValueChange(ValueChangeEvent<String> event) {
    String token = event.getValue();

    if (token != null) {
        if (token.equals(HistoryItems.STORAGE_CONNECT)) {
            injector.getStorageConnectPresenter().go(container);
        } else if (token.startsWith(HistoryItems.STORAGE_AUTO_CONNECT) || token.startsWith("access_token")) {
            autoConnect();//from w  ww .  j a  va  2s .co  m
        } else if (token.startsWith(HistoryItems.STORAGE_CONNECT_NO_REMEMBER)) {
            authDropbox(false);
        } else if (token.startsWith(HistoryItems.STORAGE_CONNECT_REMEMBER)) {
            authDropbox(true);
        }
    }
}

From source file:edu.caltech.ipac.firefly.core.DefaultRequestHandler.java

public void onValueChange(ValueChangeEvent<String> str) {

    String token = str.getValue();
    processToken(token);
}

From source file:edu.caltech.ipac.firefly.ui.PopoutWidget.java

private void ensureCheckBoxCreated() {
    if (_titleCheckBox == null && _enableChecking) {
        _titleCheckBox = new CheckBox();
        _titleCheckBox.setValue(_widgetChecked);
        _titleCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
            public void onValueChange(ValueChangeEvent<Boolean> ev) {
                WebEvent<Boolean> wev = new WebEvent<Boolean>(PopoutWidget.this, Name.CHECKED_PLOT_CHANGE,
                        ev.getValue());
                AllPlots.getInstance().fireEvent(wev);
                if (PopoutWidget.this instanceof MiniPlotWidget) {
                    MiniPlotWidget mpw = (MiniPlotWidget) PopoutWidget.this;
                    if (mpw.getGroup().isAllChecked() && !ev.getValue()) {
                        mpw.getGroup().checkboxForcedOffAllChecked();
                    }/*from w  w w . ja  v  a 2 s.co m*/
                }
            }
        });
    }
}