net.customware.gwt.presenter.client.place
Class DefaultPlaceManager

java.lang.Object
  extended by net.customware.gwt.presenter.client.place.DefaultPlaceManager
All Implemented Interfaces:
PlaceManager

public abstract class DefaultPlaceManager
extends java.lang.Object
implements PlaceManager


Constructor Summary
DefaultPlaceManager(EventBus eventBus, TokenFormatter tokenFormatter)
           
DefaultPlaceManager(EventBus eventBus, TokenFormatter tokenFormatter, Place... places)
           
 
Method Summary
 boolean deregisterPlace(Place place)
          Deregisters the place from the manager.
 boolean fireCurrentPlace()
          Fires a PlaceRequestEvent with the current history token, if present.
 boolean registerPlace(Place place)
          Registers the place with the manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPlaceManager

public DefaultPlaceManager(EventBus eventBus,
                           TokenFormatter tokenFormatter)

DefaultPlaceManager

public DefaultPlaceManager(EventBus eventBus,
                           TokenFormatter tokenFormatter,
                           Place... places)
Method Detail

registerPlace

public boolean registerPlace(Place place)
Description copied from interface: PlaceManager
Registers the place with the manager. This allows the place to be updated when the browser's history token is updated. Only a single instance of a given concrete Place implementation is registered

Specified by:
registerPlace in interface PlaceManager
Parameters:
place - The place to register.
Returns:
true if an instance of the Place class had not already been registered.

deregisterPlace

public boolean deregisterPlace(Place place)
Description copied from interface: PlaceManager
Deregisters the place from the manager. Any instance of a given concrete Place will cause the deregistration - it doesn't have to be the original Place.

Specified by:
deregisterPlace in interface PlaceManager
Parameters:
place - The place to deregister.
Returns:
true if the place was registered and has been successfully deregistered.

fireCurrentPlace

public boolean fireCurrentPlace()
Fires a PlaceRequestEvent with the current history token, if present. If no history token is set, false is returned.

Specified by:
fireCurrentPlace in interface PlaceManager
Returns:
true


Copyright © 2010 customware.net. All Rights Reserved.