public abstract class PlaceController extends Controller
| Modifier and Type | Class and Description |
|---|---|
static class |
PlaceController.DelegateOp
Used to call methods in delegates.
|
DISPATCHER| Constructor and Description |
|---|
PlaceController() |
| Modifier and Type | Method and Description |
|---|---|
void |
didLeavePlace(PlaceObject plobj)
This is called by the location director when we are leaving this place and need to clean up
after ourselves and shutdown.
|
PlaceConfig |
getPlaceConfig()
Returns the
PlaceConfig associated with this place. |
PlaceView |
getPlaceView()
Returns a reference to the place view associated with this controller.
|
boolean |
handleAction(ActionEvent action)
Handles basic place controller action events.
|
void |
init(CrowdContext ctx,
PlaceConfig config)
Initializes this place controller with a reference to the context that they can use to
access client services and to the configuration record for this place.
|
void |
mayLeavePlace(PlaceObject plobj)
Called before a request is submitted to the server to leave the current place.
|
void |
willEnterPlace(PlaceObject plobj)
This is called by the location director once the place object has been fetched.
|
actionPerformed, configureAction, createActionButton, handleAction, handleAction, handleAction, postAction, postAction, postAction, setControlledPanel, wasAdded, wasRemovedpublic void init(CrowdContext ctx, PlaceConfig config)
ctx - the client context.config - the place configuration for this place.public PlaceView getPlaceView()
init(com.threerings.crowd.util.CrowdContext, com.threerings.crowd.data.PlaceConfig).public PlaceConfig getPlaceConfig()
PlaceConfig associated with this place.public void willEnterPlace(PlaceObject plobj)
PlaceViewUtil.dispatchWillEnterPlace(java.lang.Object, com.threerings.crowd.data.PlaceObject). Derived classes can override this and perform
any other starting up that they need to dopublic void mayLeavePlace(PlaceObject plobj)
didLeavePlace(com.threerings.crowd.data.PlaceObject) is finally called.
The request to leave may be rejected, but if a place controller needs to flush any
information to the place manager before it leaves, it should so do here. This is the only
place in which the controller is guaranteed to be able to communicate to the place manager,
as by the time didLeavePlace(com.threerings.crowd.data.PlaceObject) is called, the place manager may have already been
destroyed.public void didLeavePlace(PlaceObject plobj)
super.didLeavePlace) and perform any necessary cleanup.public boolean handleAction(ActionEvent action)
super.handleAction for events they don't specifically handle.handleAction in class ControllerCopyright © 2015. All rights reserved.