Class AttachEvent
java.lang.Object
com.google.web.bindery.event.shared.Event<AttachEvent.Handler>
com.google.gwt.event.shared.GwtEvent<AttachEvent.Handler>
com.google.gwt.event.logical.shared.AttachEvent
Fired when the event source is attached to the browser's document
or detached from it.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Implemented by objects that handleAttachEvent
.Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
GwtEvent.Type<H>
-
Field Summary
Modifier and TypeFieldDescription(package private) static GwtEvent.Type
<AttachEvent.Handler> The event type. -
Constructor Summary
ModifierConstructorDescriptionprotected
AttachEvent
(boolean attached) Construct a newAttachEvent
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
dispatch
(AttachEvent.Handler handler) Should only be called byHandlerManager
.static <S extends HasAttachHandlers>
voidfire
(S source, boolean attached) Fires anAttachEvent
on all registered handlers in the handler source.final GwtEvent.Type
<AttachEvent.Handler> Returns theEvent.Type
used to register this event, allowing anEventBus
to find handlers of the appropriate class.static GwtEvent.Type
<AttachEvent.Handler> getType()
Ensures the existence of the handler hook and then returns it.boolean
Returns true if this event announces that the source has been attached, false if it has been detached.This is a method used primarily for debugging.
-
Field Details
-
TYPE
The event type.
-
-
Constructor Details
-
AttachEvent
protected AttachEvent(boolean attached) Construct a newAttachEvent
.- Parameters:
attached
- true if the source has been attached
-
-
Method Details
-
fire
Fires anAttachEvent
on all registered handlers in the handler source.- Type Parameters:
S
- The handler source type- Parameters:
source
- the source of the handlersattached
- whether to announce an attach or detach
-
getType
Ensures the existence of the handler hook and then returns it.- Returns:
- returns a handler hook
-
getAssociatedType
Description copied from class:Event
Returns theEvent.Type
used to register this event, allowing anEventBus
to find handlers of the appropriate class.- Specified by:
getAssociatedType
in classGwtEvent<AttachEvent.Handler>
- Returns:
- the type
-
isAttached
public boolean isAttached()Returns true if this event announces that the source has been attached, false if it has been detached. -
toDebugString
Description copied from class:Event
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 classEvent<AttachEvent.Handler>
- Returns:
- a string representing the event's specifics.
-