GWT Tk 0.2.3

asquare.gwt.debug.client
Class EventPreviewDispatcher

java.lang.Object
  extended by asquare.gwt.debug.client.EventPreviewDispatcher
All Implemented Interfaces:
EventPreview

public final class EventPreviewDispatcher
extends Object
implements EventPreview

The EventPreview facility adds listeners to a stack, and only the listener on top of the stack previews events. This class distributes events to 1 or more listeners if it is on top of the stack. It will be pushed down the stack if a PopupPanel or DialogBox is shown.


Method Summary
static void addListener(DebugEventListener listener)
          Adds the specified listener.
 boolean onEventPreview(Event event)
           
static void removeListener(DebugEventListener listener)
          Removes the specified listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addListener

public static void addListener(DebugEventListener listener)
Adds the specified listener. If listener is the first listener added, the dispatcher will be added to the top of the EventPreview stack.

Parameters:
listener -

removeListener

public static void removeListener(DebugEventListener listener)
Removes the specified listener. If listener is only remaining listener, the dispatcher will be removed from the EventPreview stack.

Parameters:
listener -

onEventPreview

public boolean onEventPreview(Event event)
Specified by:
onEventPreview in interface EventPreview

GWT Tk 0.2.3

© 2007 Mat Gessel