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:com.gwtmobile.ui.kitchensink.client.widget.FlipSwitchPage.java

License:Apache License

@UiHandler("wp7")
void onValueChangeWP7(ValueChangeEvent<Boolean> e) {
    Utils.Console("Flip switch wp7 " + e.getValue());
}

From source file:com.gwtmobile.ui.kitchensink.client.widget.SliderPage.java

License:Apache License

@UiHandler("slider1")
public void onValueChangeSlider1(ValueChangeEvent<Integer> e) {
    value1.setText(e.getValue() + "");
}

From source file:com.gwtplatform.mvp.client.proxy.PlaceManagerImpl.java

License:Apache License

/**
 * Handles change events from {@link History}.
 *///  ww  w  . j a  va2s  .co m
@Override
public void onValueChange(ValueChangeEvent<String> event) {
    handleTokenChange(event.getValue());
}

From source file:com.haulmont.cuba.web.toolkit.ui.client.historycontrol.HistoryGwtApi.java

License:Apache License

protected void initHandler() {
    handlerRegistration = History.addValueChangeHandler(new ValueChangeHandler<String>() {
        @Override/*from   w  ww .  j  a  v  a 2s .c om*/
        public void onValueChange(ValueChangeEvent<String> event) {
            String historyToken = event.getValue();
            if (isForward) {
                isForward = false;
                // here we assume that "forward" action was performed
                // and if current history token equals to TOP_HISTORY_TOKEN
                // then this is true, otherwise we ignore
                if (TOP_HISTORY_TOKEN.equals(historyToken)) {
                    handleHistoryStep();
                }
            } else {
                if (!TOP_HISTORY_TOKEN.equals(historyToken)) {
                    // if current history token equals to previous history token
                    // then we assume that "back" action was performed
                    if (previousHistoryToken.equals(historyToken)) {
                        isForward = true;
                    } else {
                        // otherwise we assume that some handmade token was processed
                        // and replace it with PREVIOUS_HISTORY_TOKEN
                        previousHistoryToken = historyToken;
                        History.newItem(PREVIOUS_HISTORY_TOKEN);
                    }
                }
                // we always must have TOP_HISTORY_TOKEN on top of history stack
                // if it is, then History will ignore the call of newItem method.
                History.newItem(TOP_HISTORY_TOKEN);
            }
        }
    });
    if (isFireHistoryState)
        History.fireCurrentHistoryState();
}

From source file:com.hazelcast.monitor.client.HazelcastMonitor.java

License:Open Source License

public void onValueChange(final ValueChangeEvent event) {
    ConfigLink config = (ConfigLink) event.getValue();
    onValueChangeHandler.handle(config);
}

From source file:com.imaginedreal.gwt.palantir.client.activities.settings.SettingsActivity.java

License:Apache License

@Override
public void start(AcceptsOneWidget panel, final EventBus eventBus) {
    view = clientFactory.getSettingsView();
    this.eventBus = eventBus;
    view.setPresenter(this);

    addHandlerRegistration(view.getSliderValue().addValueChangeHandler(new ValueChangeHandler<Integer>() {

        @Override//from w w w  .  j  av a 2 s .c  om
        public void onValueChange(ValueChangeEvent<Integer> event) {
            view.getTextField().setText("" + event.getValue());
        }
    }));

    view.getSliderValue().setValue(12); // Initial text size

    panel.setWidget(view);

}

From source file:com.isotrol.impe3.pms.gui.client.widget.externalservices.AServicesManagement.java

License:Open Source License

public AServicesManagement() {
    History.addValueChangeHandler(new ValueChangeHandler<String>() {
        public void onValueChange(ValueChangeEvent<String> event) {
            if (getHistoryToken() != null && getHistoryToken().equals(event.getValue()) && viewport != null) {
                navigationPanel.initNavigation();
                addNavigationServiceItems();
                viewport.init();/*  w ww .j a  v a  2s.  co  m*/
                pmsMainPanel.activateViewport(viewport);
            }
        }
    });
}

From source file:com.isotrol.impe3.pms.gui.client.widget.LoginPanel.java

License:Open Source License

/**
 * Shows the PMS viewport.<br/>/*from  w w w.  ja  v a 2s .  c  om*/
 * @param sessionDto the current session information
 */
public void showPmsViewport(SessionDTO sessionDto) {

    // leftMenu.setSessionDto(sessionDto);
    userInfoPanel.setSessionDto(sessionDto);

    final PmsViewport viewport = PmsFactory.getInstance().getPmsViewport();
    viewport.init();
    pmsMainPanel.add(viewport);

    RootPanel.get().add(pmsMainPanel);

    History.newItem(PmsConstants.INIT_TOKEN);

    // activate the current layout if the history token tells you
    History.addValueChangeHandler(new ValueChangeHandler<String>() {
        public void onValueChange(ValueChangeEvent<String> event) {
            if (PmsConstants.INIT_TOKEN.equals(event.getValue())) {
                // initializes the navigation
                navigationPanel.initNavigation();
                viewport.init();
                pmsMainPanel.activateViewport(viewport);
            }
        }
    });
}

From source file:com.isotrol.impe3.pms.gui.client.widget.portalmanagement.PortalsManagement.java

License:Open Source License

@Override
protected void beforeRender() {

    History.addValueChangeHandler(new ValueChangeHandler<String>() {
        public void onValueChange(ValueChangeEvent<String> event) {
            if (PORTAL_HISTORY_ITEM.equals(event.getValue()) && viewport != null) {
                navigationPanel.initNavigation();
                addNavigationItems();/*from   w  w w . ja  va 2s. c o m*/
                viewport.init();
                pmsMainPanel.activateViewport(viewport);
            }
        }
    });

    initComponent();
    initController();

    // asynchronous access:
    tryGetPortals();
}

From source file:com.java33.vizpres.client.AppController.java

License:Open Source License

/**
 * Delegate the application state handling to the appropriate target.
 *//*  w  w w  .jav a2s  .com*/
public void onValueChange(final ValueChangeEvent<String> event) {
    final String token = event.getValue();

    if (token != null) {
        Presenter presenter = null;

        if (token.equals(DEFAULT_TOKEN)) {
            presenter = injector.getMainPresenter();
        }

        if (presenter != null) {
            // Pass the container to the current target.
            presenter.go(container);
        }
    }
}