public class PlaceController
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PlaceController.DefaultDelegate
Default implementation of
PlaceController.Delegate, based on Window. |
static interface |
PlaceController.Delegate
Optional delegate in charge of Window-related events.
|
| Constructor and Description |
|---|
PlaceController(EventBus eventBus)
Deprecated.
|
PlaceController(EventBus eventBus)
Create a new PlaceController with a
PlaceController.DefaultDelegate. |
PlaceController(EventBus eventBus,
PlaceController.Delegate delegate)
Deprecated.
|
PlaceController(EventBus eventBus,
PlaceController.Delegate delegate)
Create a new PlaceController.
|
| Modifier and Type | Method and Description |
|---|---|
Place |
getWhere()
Returns the current place.
|
void |
goTo(Place newPlace)
Request a change to a new place.
|
(package private) java.util.logging.Logger |
log()
Visible for testing.
|
@Deprecated public PlaceController(EventBus eventBus)
PlaceController(EventBus)EventBus.@Deprecated public PlaceController(EventBus eventBus, PlaceController.Delegate delegate)
PlaceController(EventBus, Delegate)EventBus.public PlaceController(EventBus eventBus)
PlaceController.DefaultDelegate. The
DefaultDelegate is created via a call to GWT.create(), so an alternative
default implementation can be provided through <replace-with> rules
in a .gwt.xml file.eventBus - the EventBuspublic PlaceController(EventBus eventBus, PlaceController.Delegate delegate)
eventBus - the EventBusdelegate - the PlaceController.Delegate in charge of Window-related eventspublic void goTo(Place newPlace)
PlaceChangeRequestEvent will be posted to the event
bus. If any receivers post a warning message to that event, it will be
presented to the user via PlaceController.Delegate.confirm(String) (which is
typically a call to Window.confirm(String)). If she cancels, the
current location will not change. Otherwise, the location changes and a
PlaceChangeEvent is posted announcing the new place.newPlace - a Place instancejava.util.logging.Logger log()