|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.web.bindery.event.shared.Event<H>
H - interface implemented by handlers of this kind of eventpublic abstract class Event<H>
Base Event object.
| Nested Class Summary | |
|---|---|
static class |
Event.Type<H>
Type class used to register events with an EventBus. |
| Constructor Summary | |
|---|---|
protected |
Event()
Constructor. |
| Method Summary | |
|---|---|
protected abstract void |
dispatch(H handler)
Implemented by subclasses to to invoke their handlers in a type safe manner. |
abstract Event.Type<H> |
getAssociatedType()
Returns the Event.Type used to register this event, allowing an
EventBus to find handlers of the appropriate class. |
java.lang.Object |
getSource()
Returns the source for this event. |
protected void |
setSource(java.lang.Object source)
Set the source that triggered 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 compiled output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Event()
| Method Detail |
|---|
public abstract Event.Type<H> getAssociatedType()
Event.Type used to register this event, allowing an
EventBus to find handlers of the appropriate class.
public java.lang.Object getSource()
EventBus.addHandlerToSource(com.google.web.bindery.event.shared.Event.Type, java.lang.Object, H) , which allows a handler to
register for events of a particular type, tied to a particular source.)
Note that the source is actually set at dispatch time, e.g. via
EventBus.fireEventFromSource(Event, Object).
public java.lang.String toDebugString()
public java.lang.String toString()
Event
#toDebugString to get more information about the event.
toString in class java.lang.Objectprotected abstract void dispatch(H handler)
EventBus.fireEvent(Event) or
EventBus.fireEventFromSource(Event, Object).
handler - handlerEventBus.dispatchEvent(Event, Object)protected void setSource(java.lang.Object source)
EventBus during dispatch.
source - the source of this event.EventBus.fireEventFromSource(Event, Object),
EventBus.setSourceOfEvent(Event, Object)
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||