public class

AttachEvent

extends GwtEvent<H extends EventHandler>
java.lang.Object
   ↳ com.google.gwt.event.shared.GwtEvent<H extends com.google.gwt.event.shared.EventHandler>
     ↳ com.google.gwt.event.logical.shared.AttachEvent

Class Overview

Fired when the event source is attached to the browser's document or detached from it.

Summary

Nested Classes
interface AttachEvent.Handler Implemented by objects that handle AttachEvent
Protected Constructors
AttachEvent(boolean attached)
Construct a new AttachEvent.
Public Methods
static <S extends HasAttachHandlers> void fire(S source, boolean attached)
Fires an AttachEvent on all registered handlers in the handler source.
final Type<AttachEvent.Handler> getAssociatedType()
Returns the type used to register this event.
static Type<AttachEvent.Handler> getType()
Ensures the existence of the handler hook and then returns it.
boolean isAttached()
Returns true if this event announces that the source has been attached, false if it has been detached.
String toDebugString()
This is a method used primarily for debugging.
Protected Methods
void dispatch(AttachEvent.Handler handler)
Should only be called by HandlerManager.
[Expand]
Inherited Methods
From class com.google.gwt.event.shared.GwtEvent
From class java.lang.Object

Protected Constructors

protected AttachEvent (boolean attached)

Construct a new AttachEvent.

Parameters
attached true if the source has been attached

Public Methods

public static void fire (S source, boolean attached)

Fires an AttachEvent on all registered handlers in the handler source.

Parameters
source the source of the handlers
attached whether to announce an attach or detach

public final Type<AttachEvent.Handler> getAssociatedType ()

Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

Returns
  • the type

public static Type<AttachEvent.Handler> getType ()

Ensures the existence of the handler hook and then returns it.

Returns
  • returns a handler hook

public boolean isAttached ()

Returns true if this event announces that the source has been attached, false if it has been detached.

public 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.

Protected Methods

protected void dispatch (AttachEvent.Handler handler)

Should only be called by HandlerManager. In other words, do not use or call.

Parameters
handler handler