List of usage examples for com.google.gwt.event.logical.shared ValueChangeEvent getValue
public T getValue()
From source file:com.extjs.gxt.ui.client.mvc.Dispatcher.java
License:sencha.com license
private Dispatcher() { controllers = new ArrayList<Controller>(); history = new FastMap<AppEvent>(); if (supportsHistory()) { History.addValueChangeHandler(new ValueChangeHandler<String>() { public void onValueChange(ValueChangeEvent<String> event) { String historyToken = event.getValue(); if (history.containsKey(historyToken)) { dispatch(history.get(historyToken), false); }//from www. j av a2s . c om } }); } }
From source file:com.facebook.tsdb.tsdash.client.ApplicationController.java
License:Apache License
@Override public void onValueChange(ValueChangeEvent<String> event) { String historyToken = event.getValue(); if (!historyToken.isEmpty()) { try {/* ww w . j av a 2s . co m*/ appState = new ApplicationState(historyToken); } catch (Exception e) { Window.alert("Error: " + e); // reset the application state to default appState = new ApplicationState(); History.newItem(appState.toJSON(), false); } } // display topPresenter.go(topContainer, appState); errorPresenter.go(errorContainer, appState); displayView(); }
From source file:com.fullmetalgalaxy.client.creation.WgtEditInitialHolds.java
License:Open Source License
private WgtTokenQty createWgt(final TokenType p_tokenType) { WgtTokenQty wgt = new WgtTokenQty(p_tokenType, GameEngine.model().getGame().getInitialHolds().get(p_tokenType)); wgt.setEnabled(true);/*from w w w . j a v a2 s. co m*/ wgt.addValueChangeHandler(new ValueChangeHandler<Integer>() { @Override public void onValueChange(ValueChangeEvent<Integer> p_event) { GameEngine.model().getGame().setInitialHoldsQty(p_tokenType, p_event.getValue()); } }); return wgt; }
From source file:com.fullmetalgalaxy.client.creation.WgtEditReserve.java
License:Open Source License
private Widget createWgt(final TokenType p_tokenType) { WgtTokenQty wgt = new WgtTokenQty(p_tokenType, GameEngine.model().getGame().getConstructReserve().get(p_tokenType)); wgt.setEnabled(true);/*from ww w . ja va 2 s .c o m*/ wgt.addValueChangeHandler(new ValueChangeHandler<Integer>() { @Override public void onValueChange(ValueChangeEvent<Integer> p_event) { GameEngine.model().getGame().setConstructQty(p_tokenType, p_event.getValue()); } }); return wgt; }
From source file:com.fullmetalgalaxy.client.game.tabmenu.MAppTabMenu.java
License:Open Source License
@Override public void onValueChange(ValueChangeEvent<Boolean> p_event) { // remove current widget closeAllTab();//from www.j a v a 2 s.co m if (p_event.getValue() == false) { // unselect a tab return; } openTab(p_event.getSource()); }
From source file:com.gafactory.core.client.ui.grids.BaseListGrid.java
License:Open Source License
protected CellTable<T> createDataGrid() { if (resources != null) { dataGrid = new CellTable<T>(pageSize(), resources, this, null); } else {//from www . j av a 2 s. co m dataGrid = new CellTable<T>(this); } dataGrid.setAutoHeaderRefreshDisabled(true); dataGrid.setAutoFooterRefreshDisabled(true); dataGrid.setStriped(false); dataGrid.setBordered(true); dataGrid.setCondensed(true); dataGrid.setEmptyTableWidget(createEmptyWidget()); dataGrid.setLoadingIndicator(createLoadingWidget()); // if (pageSize() != PAGE_SIZE_UNLIMIT) { pager = new BasePager(); pager.addStyleName(Styles.PULL_LEFT); pager.setDisplay(dataGrid); itemsPerPage = new ValueListBox<Integer>(new AbstractRenderer<Integer>() { @Override public String render(Integer object) { if (object != null) { if (!Objects.equals(object, PSIZE_ALL)) { return String.valueOf(object.toString()); } else { return "?"; } } return "null"; } }); itemsPerPage.setValue(defaultPageSize); itemsPerPage.setAcceptableValues( Lists.newArrayList(PSIZE_15, PSIZE_25, PSIZE_50, PSIZE_100, PSIZE_200, PSIZE_ALL)); itemsPerPage.addValueChangeHandler(new ValueChangeHandler<Integer>() { @Override public void onValueChange(ValueChangeEvent<Integer> event) { Integer value = event.getValue(); if (value != null) { dataGrid.setVisibleRange(new Range(0, value)); } storageService.putValue(PAGE_SIZE, value, getViewName()); } }); selectionModel = new SingleSelectionModel<T>(this); dataGrid.setSelectionModel(selectionModel); dataGrid.addColumnSortHandler(this); dataProvider.addDataDisplay(dataGrid); loader.addLoadHandler(dataProvider); return dataGrid; }
From source file:com.github.gwtbootstrap.showcase.client.Alerts.java
License:Apache License
@UiHandler("animation") public void onChangeAnimation(ValueChangeEvent<Boolean> e) { setupAlert.setAnimation(e.getValue()); setupAlertBlock.setAnimation(e.getValue()); }
From source file:com.github.gwtbootstrap.showcase.client.Alerts.java
License:Apache License
@UiHandler("heading") public void onChangeHeading(ValueChangeEvent<String> e) { setupAlert.setHeading(e.getValue()); setupAlertBlock.setHeading(e.getValue()); }
From source file:com.github.gwtbootstrap.showcase.client.Alerts.java
License:Apache License
@UiHandler("close") public void onChangeClose(ValueChangeEvent<Boolean> e) { setupAlert.setClose(e.getValue()); setupAlertBlock.setClose(e.getValue()); }
From source file:com.github.gwtbootstrap.showcase.client.Alerts.java
License:Apache License
@UiHandler("type") public void onChangeType(ValueChangeEvent<AlertType> e) { setupAlert.setType(e.getValue()); setupAlertBlock.setType(e.getValue()); }