Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.event.logical.shared
Class ValueChangeEvent<I>

    java.lang.Object
      com.google.gwt.event.shared.GwtEvent<ValueChangeHandler<I>>
          com.google.gwt.event.logical.shared.ValueChangeEvent<I>

Type Parameters:
  `I` - the value about to be changed

    public class ValueChangeEvent<I>

extends GwtEvent<ValueChangeHandler<I>>

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
`protected` | `ValueChangeEvent(I value)` Creates a value change event.

Method Summary
`protected void` | `dispatch(ValueChangeHandler<I> handler)` Should only be called by `HandlerManager`.
`static
`<I> void`
` | `fire(HasValueChangeHandlers<I> source, I value)` Fires a value change event on all registered handlers in the handler manager.If no such handlers exist, this method will do nothing.
`static
`<I> void`
` | `fireIfNotEqual(HasValueChangeHandlers<I> source, I oldValue, I newValue)` Fires value change event if the old value is not equal to the new value.
`GwtEvent.Type<ValueChangeHandler<I>>` | `getAssociatedType()` Returns the type used to register this event.
`static GwtEvent.Type<ValueChangeHandler<?>>` | `getType()` Gets the type associated with this event.
`I` | `getValue()` Gets the value.
`protected static
`<I> boolean`
` | `shouldFire(HasValueChangeHandlers<I> source, I oldValue, I newValue)` Convenience method to allow subtypes to know when they should fire a value change event in a null-safe manner.
`java.lang.String` | `toDebugString()` This is a method used primarily for debugging.

Methods inherited from class com.google.gwt.event.shared.GwtEvent
`assertLive, getSource, isLive, kill, revive, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ValueChangeEvent

    protected ValueChangeEvent(I value)

  Creates a value change event.

  Parameters:
    `value` - the value

Method Detail

### fire

    public static <I> void fire(HasValueChangeHandlers<I> source,
                                I value)

  Fires a value change event on all registered handlers in the handler manager.If no such handlers exist, this method will do nothing.

  Type Parameters:
    `I` - the old value type
  Parameters:
    `source` - the source of the handlers
    `value` - the value

### fireIfNotEqual

    public static <I> void fireIfNotEqual(HasValueChangeHandlers<I> source,
                                          I oldValue,
                                          I 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.

  Type Parameters:
    `I` - the old value type
  Parameters:
    `source` - the source of the handlers
    `oldValue` - the oldValue, may be null
    `newValue` - the newValue, may be null

### getType

    public static GwtEvent.Type<ValueChangeHandler<?>> getType()

  Gets the type associated with this event.

  Returns:
    returns the handler type

### shouldFire

    protected static <I> boolean shouldFire(HasValueChangeHandlers<I> source,
                                            I oldValue,
                                            I newValue)

  Convenience method to allow subtypes to know when they should fire a value change event in a null-safe manner.

  Type Parameters:
    `I` - value type
  Parameters:
    `source` - the source
    `oldValue` - the old value
    `newValue` - the new value
  Returns:
    whether the event should be fired

### getAssociatedType

    public final GwtEvent.Type<ValueChangeHandler<I>> getAssociatedType()

  Description copied from class: `GwtEvent`
  Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

  Specified by:
    `getAssociatedType` in class `GwtEvent<ValueChangeHandler<I>>`
  Returns:
    the type

### getValue

    public I getValue()

  Gets the value.

  Returns:
    the value

### toDebugString

    public java.lang.String toDebugString()

  Description copied from class: `GwtEvent`
  This 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:
    `toDebugString` in class `GwtEvent<ValueChangeHandler<I>>`
  Returns:
    a string representing the event's specifics.

### dispatch

    protected void dispatch(ValueChangeHandler<I> handler)

  Description copied from class: `GwtEvent`
  Should only be called by `HandlerManager`. In other words, do not use or call.

  Specified by:
    `dispatch` in class `GwtEvent<ValueChangeHandler<I>>`
  Parameters:
    `handler` - handler

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD