net.customware.gwt.presenter.client
Class PresenterRevealedEvent

java.lang.Object
  extended by com.google.gwt.event.shared.GwtEvent<PresenterRevealedHandler>
      extended by net.customware.gwt.presenter.client.PresenterRevealedEvent

public class PresenterRevealedEvent
extends com.google.gwt.event.shared.GwtEvent<PresenterRevealedHandler>

Presenters can send this event to the EventBus to notify other interested parties when the presenter has been 'revealed' on the screen. This is particularly useful for situations where a presenter contains other presenters and wants needs to reveal itself when a child presenter is revealed.

Author:
David Peterson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
com.google.gwt.event.shared.GwtEvent.Type<H>
 
Constructor Summary
PresenterRevealedEvent(Presenter presenter)
          Constructs a new revelation event, specifying that it is the originator.
PresenterRevealedEvent(Presenter presenter, boolean originator)
          Constructs a new revelation event, with the specified 'originator' status.
 
Method Summary
protected  void dispatch(PresenterRevealedHandler handler)
           
static void fire(EventBus eventBus, Presenter presenter)
          Fires a PresenterRevealedEvent into the EventBus, specifying that it was the originator.
static void fire(EventBus eventBus, Presenter presenter, boolean originator)
          Fires the event into the provided EventBus.
 com.google.gwt.event.shared.GwtEvent.Type<PresenterRevealedHandler> getAssociatedType()
           
 Presenter getPresenter()
           
static com.google.gwt.event.shared.GwtEvent.Type<PresenterRevealedHandler> getType()
           
 boolean isOriginator()
          Returns true if the presenter in this event originated the revelation, or false if it is a consequence of being revealed by a child presenter.
 
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, getSource, isLive, kill, revive, toDebugString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PresenterRevealedEvent

public PresenterRevealedEvent(Presenter presenter)
Constructs a new revelation event, specifying that it is the originator.

Parameters:
presenter - The presenter.

PresenterRevealedEvent

public PresenterRevealedEvent(Presenter presenter,
                              boolean originator)
Constructs a new revelation event, with the specified 'originator' status.

Parameters:
presenter - The presenter that has been revealed.
originator - If true, the presenter is the originator of the revelation chain.
Method Detail

getType

public static com.google.gwt.event.shared.GwtEvent.Type<PresenterRevealedHandler> getType()

fire

public static void fire(EventBus eventBus,
                        Presenter presenter)
Fires a PresenterRevealedEvent into the EventBus, specifying that it was the originator.

Parameters:
eventBus - The event bus.
presenter - The presenter.

fire

public static void fire(EventBus eventBus,
                        Presenter presenter,
                        boolean originator)
Fires the event into the provided EventBus.

Parameters:
eventBus - The event bus.
presenter - The presenter.
originator - If true, this presenter was the originator for the request.

getPresenter

public Presenter getPresenter()

isOriginator

public boolean isOriginator()
Returns true if the presenter in this event originated the revelation, or false if it is a consequence of being revealed by a child presenter.

Returns:
true if the event was the originator.

dispatch

protected void dispatch(PresenterRevealedHandler handler)
Specified by:
dispatch in class com.google.gwt.event.shared.GwtEvent<PresenterRevealedHandler>

getAssociatedType

public com.google.gwt.event.shared.GwtEvent.Type<PresenterRevealedHandler> getAssociatedType()
Specified by:
getAssociatedType in class com.google.gwt.event.shared.GwtEvent<PresenterRevealedHandler>


Copyright © 2010 customware.net. All Rights Reserved.