flash.events
Class EventDispatcher

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by flash.events.EventDispatcher
Direct Known Subclasses:
DisplayObject, SharedObject

public class EventDispatcher
extends com.google.gwt.core.client.JavaScriptObject

Implementation of flash.events.EventDispatcher


Field Summary
static EventType ACTIVATE
          Dispatched when Flash Player or an AIR application gains operating system focus and becomes active.
static EventType DEACTIVATE
          Dispatched when Flash Player or an AIR application gains operating system focus and becomes active.
 
Constructor Summary
protected EventDispatcher()
           
 
Method Summary
<T extends Event>
void
addEventListener(EventType type, EventHandler<T> listener, boolean useCapture, int priority, boolean useWeakReference)
          Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
static EventDispatcher create()
           
 boolean dispatchEvent(Event event)
          Dispatches an event into the event flow.
 boolean hasEventListener(EventType type)
          Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
 void removeEventListener(EventType type, EventHandler<?> listener, boolean useCapture)
          Removes a listener from the EventDispatcher object.
 boolean willTrigger(EventType type)
          Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTIVATE

public static final EventType ACTIVATE
Dispatched when Flash Player or an AIR application gains operating system focus and becomes active.


DEACTIVATE

public static final EventType DEACTIVATE
Dispatched when Flash Player or an AIR application gains operating system focus and becomes active.

Constructor Detail

EventDispatcher

protected EventDispatcher()
Method Detail

create

public static EventDispatcher create()

addEventListener

public final <T extends Event> void addEventListener(EventType type,
                                                     EventHandler<T> listener,
                                                     boolean useCapture,
                                                     int priority,
                                                     boolean useWeakReference)
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.


dispatchEvent

public final boolean dispatchEvent(Event event)
Dispatches an event into the event flow.


hasEventListener

public final boolean hasEventListener(EventType type)
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.

Parameters:
type -
Returns:

removeEventListener

public final void removeEventListener(EventType type,
                                      EventHandler<?> listener,
                                      boolean useCapture)
Removes a listener from the EventDispatcher object.

Parameters:
type -

willTrigger

public final boolean willTrigger(EventType type)
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.

Returns:


Copyright © 2013. All Rights Reserved.