com.google.gwt.event.shared
Class GwtEvent<H extends EventHandler>

java.lang.Object
  extended by com.google.gwt.event.shared.GwtEvent<H>
Type Parameters:
H - handler type
Direct Known Subclasses:
BeforeSelectionEvent, CloseEvent, DomEvent, Event.NativePreviewEvent, FormPanel.SubmitCompleteEvent, FormPanel.SubmitEvent, HighlightEvent, InitializeEvent, OpenEvent, PlaceChangeEvent, PlaceChangeRequestedEvent, RecordChangedEvent, RequestEvent, ResizeEvent, SelectionEvent, SelectionModel.SelectionChangeEvent, ShowRangeEvent, ValueChangeEvent, Window.ClosingEvent, Window.ScrollEvent

public abstract class GwtEvent<H extends EventHandler>
extends java.lang.Object

Root of all GWT events. All GWT events are considered dead and should no longer be accessed once the HandlerManager which originally fired the event finishes with it. That is, don't hold on to event objects outside of your handler methods.


Nested Class Summary
static class GwtEvent.Type<H>
          Type class used to register events with the HandlerManager.
 
Method Summary
abstract  GwtEvent.Type<H> getAssociatedType()
          Returns the type used to register this event.
 java.lang.Object getSource()
          Returns the source that last fired this event.
 java.lang.String toDebugString()
          This is a method used primarily for debugging.
 java.lang.String toString()
          The toString() for abstract event is overridden to avoid accidently including class literals in the the compiled output.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getAssociatedType

public abstract GwtEvent.Type<H> getAssociatedType()
Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

Returns:
the type

getSource

public java.lang.Object getSource()
Returns the source that last fired this event.

Returns:
object representing the source of this event

toDebugString

public java.lang.String toDebugString()
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.

Returns:
a string representing the event's specifics.

toString

public java.lang.String toString()
The toString() for abstract event is overridden to avoid accidently including class literals in the the compiled output. Use GwtEvent #toDebugString to get more information about the event.

Overrides:
toString in class java.lang.Object