/** * Fires a value change event on all registered handlers in the handler * manager. If no such handlers exist, this method will do nothing. * * @param <T> the old value type * @param source the source of the handlers * @param value the value */ public static <T> void fire(HasValueChangeHandlers<T> source, T value) { if (TYPE != null) { ValueChangeEvent<T> event = new ValueChangeEvent<T>(value); source.fireEvent(event); } }
/** * Fires value change event if the old value is not equal to the new value. * Use this call rather than making the decision to short circuit yourself for * safe handling of null. * * @param <T> the old value type * @param source the source of the handlers * @param oldValue the oldValue, may be null * @param newValue the newValue, may be null */ public static <T> void fireIfNotEqual(HasValueChangeHandlers<T> source, T oldValue, T newValue) { if (shouldFire(source, oldValue, newValue)) { ValueChangeEvent<T> event = new ValueChangeEvent<T>(newValue); source.fireEvent(event); } }
/** * Fires value change event if the old value is not equal to the new value. * Use this call rather than making the decision to short circuit yourself for * safe handling of null. * * @param <S> The event source * @param source the source of the handlers * @param oldValue the oldValue, may be null * @param newValue the newValue, may be null */ public static <S extends HasValueChangeHandlers<Date> & HasHandlers> void fireIfNotEqualDates( S source, Date oldValue, Date newValue) { if (ValueChangeEvent.shouldFire(source, oldValue, newValue)) { source.fireEvent(new DateChangeEvent(newValue)); } }
@Override public void fireEvent(GwtEvent<?> event) { peerWithValueChangeHandlers.fireEvent(event); }
/** * Fires a value change event on all registered handlers in the handler * manager. If no such handlers exist, this method will do nothing. * * @param <T> the old value type * @param source the source of the handlers * @param value the value */ public static <T> void fire(HasValueChangeHandlers<T> source, T value) { if (TYPE != null) { ValueChangeEvent<T> event = new ValueChangeEvent<T>(value); source.fireEvent(event); } }
/** * Fires a value change event on all registered handlers in the handler * manager. If no such handlers exist, this method will do nothing. * * @param <T> the old value type * @param source the source of the handlers * @param value the value */ public static <T> void fire(HasValueChangeHandlers<T> source, T value) { if (TYPE != null) { ValueChangeEvent<T> event = new ValueChangeEvent<T>(value); source.fireEvent(event); } }
/** * Fires value change event if the old value is not equal to the new value. * Use this call rather than making the decision to short circuit yourself for * safe handling of null. * * @param <S> The event source * @param source the source of the handlers * @param oldValue the oldValue, may be null * @param newValue the newValue, may be null */ public static <S extends HasValueChangeHandlers<Date> & HasHandlers> void fireIfNotEqualDates( S source, Date oldValue, Date newValue) { if (ValueChangeEvent.shouldFire(source, oldValue, newValue)) { source.fireEvent(new DateChangeEvent(newValue)); } }
/** * Fires value change event if the old value is not equal to the new value. * Use this call rather than making the decision to short circuit yourself for * safe handling of null. * * @param <T> the old value type * @param source the source of the handlers * @param oldValue the oldValue, may be null * @param newValue the newValue, may be null */ public static <T> void fireIfNotEqual(HasValueChangeHandlers<T> source, T oldValue, T newValue) { if (shouldFire(source, oldValue, newValue)) { ValueChangeEvent<T> event = new ValueChangeEvent<T>(newValue); source.fireEvent(event); } }
/** * Fires value change event if the old value is not equal to the new value. * Use this call rather than making the decision to short circuit yourself for * safe handling of null. * * @param <T> the old value type * @param source the source of the handlers * @param oldValue the oldValue, may be null * @param newValue the newValue, may be null */ public static <T> void fireIfNotEqual(HasValueChangeHandlers<T> source, T oldValue, T newValue) { if (shouldFire(source, oldValue, newValue)) { ValueChangeEvent<T> event = new ValueChangeEvent<T>(newValue); source.fireEvent(event); } }