List of usage examples for com.google.gwt.event.logical.shared ValueChangeEvent ValueChangeEvent
protected ValueChangeEvent(T value)
From source file:com.google.code.p.gwtchismes.client.editor.GWTCColorPicker.java
License:Apache License
public void onClick(ClickEvent event) { ColorCell cell = (ColorCell) event.getSource(); this.color = cell.getColor(); if (changeHandler != null) changeHandler.onValueChange(new ValueChangeEvent<GWTCColorPicker>(this) { });/*from w w w . j a va 2 s . co m*/ }
From source file:com.google.code.p.gwtchismes.client.editor.GWTCFontPicker.java
License:Apache License
public void onClick(ClickEvent event) { FontCell cell = (FontCell) event.getSource(); this.font = cell.getFont(); if (changeHandler != null) changeHandler.onValueChange(new ValueChangeEvent<GWTCFontPicker>(this) { });/*from ww w . j a v a 2s . c o m*/ }
From source file:com.google.gerrit.client.ui.ListenableValue.java
License:Apache License
public void set(final T value) { this.value = value; fireEvent(new ValueChangeEvent<T>(value) { }); }
From source file:com.google.gwt.uibinder.test.client.WildcardValueChangeWidget.java
License:Apache License
public void setValue(T value) { myValue = value; fireEvent(new ValueChangeEvent<T>(value) { }); }
From source file:com.google.livingstories.client.util.HistoryManager.java
License:Apache License
public static void loadMainPage() { String currentUrl = Window.Location.getHref().split("#")[0]; final String token = HistoryPages.OVERVIEW.createToken(getDefaultFilterSpec().getFilterParams(), null) + ";"; Window.Location.replace(currentUrl + "#" + token); Command fireValueChange = new Command() { @Override//from www. ja v a2s. c o m public void execute() { historyChangeHandler.onValueChange(new ValueChangeEvent<String>(token) { }); } }; if (isIE()) { // In IE, we need to fire this immediately or we get into an infinite redirect loop. fireValueChange.execute(); } else { // In chrome, we need to delay this, otherwise getHash() doesn't return the right value. DeferredCommand.addCommand(fireValueChange); } }
From source file:com.google.mobile.trippy.web.client.base.DefaultUtils.java
License:Apache License
@Override public void startCheckOnlineTimer() { if (onlineCheckTimer == null) { onlineCheckTimer = new Timer() { @Override/*from ww w .j a va2s . com*/ public void run() { // Check online state if (online == null || online != isOnline()) { online = isOnline(); ValueChangeEvent<Boolean> e = new ValueChangeEvent<Boolean>(online) { }; for (ValueChangeHandler<Boolean> handler : handlers) { handler.onValueChange(e); } } } }; } onlineCheckTimer.run(); // Schedule the timer to run every 5 seconds. onlineCheckTimer.scheduleRepeating(5000); }
From source file:geogebra.web.gui.advanced.client.ui.widget.ComboBox.java
License:Apache License
/** Similar to {@link #setText(String)} and sends {@code ValueChangeEvent} if {@code fireEvents = true} */ @Override//ww w .java 2 s .com public void setValue(String value, boolean fireEvents) { getSelectedValue().setText(value); if (fireEvents) { fireEvent(new ValueChangeEvent<String>(value) { }); } }
From source file:org.apache.hupa.widgets.editor.ColorPicker.java
License:Apache License
public void onClick(ClickEvent event) { ColorCell cell = (ColorCell) event.getSource(); this.color = cell.getColor(); if (changeHandler != null) changeHandler.onValueChange(new ValueChangeEvent<ColorPicker>(this) { });/*w ww .ja v a 2s.co m*/ }
From source file:org.apache.hupa.widgets.editor.FontPicker.java
License:Apache License
public void onClick(ClickEvent event) { FontCell cell = (FontCell) event.getSource(); this.font = cell.getFont(); if (changeHandler != null) changeHandler.onValueChange(new ValueChangeEvent<FontPicker>(this) { });//from w w w.j av a 2 s.c o m }
From source file:org.freemedsoftware.gwt.client.widget.CustomRadioButtonGroup.java
License:Open Source License
public void setWidgetValue(String value, boolean fireEvent) { Iterator<CustomRadioButton> itr = customRadioButtonGroup.iterator(); CustomRadioButton customRadioButton; while (itr.hasNext()) { customRadioButton = itr.next();//from ww w. java 2 s . c o m if (customRadioButton.getWidgetValue().equals(value)) { customRadioButton.setValue(true); if (fireEvent && customRadioButton.fireAction != null) { customRadioButton.fireAction.execute(); } if (fireEvent && valueChangeHandler != null) { ValueChangeEvent<String> changeEvent = new ValueChangeEvent<String>(value) { @Override public String getValue() { // TODO Auto-generated method stub return super.getValue(); } }; valueChangeHandler.onValueChange(changeEvent); } break; } else customRadioButton.setValue(false); } }