Class ValueChangeEvent<T>
java.lang.Object
com.google.web.bindery.event.shared.Event<H>
com.google.gwt.event.shared.GwtEvent<ValueChangeHandler<T>>
com.google.gwt.event.logical.shared.ValueChangeEvent<T>
- Type Parameters:
T- the value about to be changed
- Direct Known Subclasses:
DateChangeEvent
Represents a value change event.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
GwtEvent.Type<H> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddispatch(ValueChangeHandler<T> handler) Should only be called byHandlerManager.static <T> voidfire(HasValueChangeHandlers<T> source, T value) Fires a value change event on all registered handlers in the handler manager.static <T> voidfireIfNotEqual(HasValueChangeHandlers<T> source, T oldValue, T newValue) Fires value change event if the old value is not equal to the new value.final GwtEvent.Type<ValueChangeHandler<T>>Returns theEvent.Typeused to register this event, allowing anEventBusto find handlers of the appropriate class.static GwtEvent.Type<ValueChangeHandler<?>>getType()Gets the type associated with this event.getValue()Gets the value.protected static <T> booleanshouldFire(HasValueChangeHandlers<T> source, T oldValue, T newValue) Convenience method to allow subtypes to know when they should fire a value change event in a null-safe manner.This is a method used primarily for debugging.
-
Constructor Details
-
ValueChangeEvent
Creates a value change event.- Parameters:
value- the value
-
-
Method Details
-
getType
Gets the type associated with this event.- Returns:
- returns the handler type
-
getAssociatedType
Description copied from class:EventReturns theEvent.Typeused to register this event, allowing anEventBusto find handlers of the appropriate class.- Specified by:
getAssociatedTypein classGwtEvent<ValueChangeHandler<T>>- Returns:
- the type
-
getValue
Gets the value.- Returns:
- the value
-
toDebugString
Description copied from class:EventThis is a method used primarily for debugging. It gives a string representation of the event details. This does not override the toString method because the compiler cannot always optimize toString out correctly. Event types should override as desired.- Overrides:
toDebugStringin classEvent<ValueChangeHandler<T>>- Returns:
- a string representing the event's specifics.