Widened
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5964 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -34,10 +34,9 @@ import com.threerings.crowd.data.PlaceObject;
|
|||||||
import com.threerings.crowd.util.CrowdContext;
|
import com.threerings.crowd.util.CrowdContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls the user interface that is used to display a place. When the
|
* Controls the user interface that is used to display a place. When the client moves to a new
|
||||||
* client moves to a new place, the appropriate place controller is
|
* place, the appropriate place controller is constructed and requested to create and display the
|
||||||
* constructed and requested to create and display the appopriate user
|
* user interface for that place.
|
||||||
* interface for that place.
|
|
||||||
*/
|
*/
|
||||||
public abstract class PlaceController extends Controller
|
public abstract class PlaceController extends Controller
|
||||||
{
|
{
|
||||||
@@ -61,14 +60,12 @@ public abstract class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes this place controller with a reference to the context
|
* Initializes this place controller with a reference to the context that they can use to
|
||||||
* that they can use to access client services and to the
|
* access client services and to the configuration record for this place. The controller
|
||||||
* configuration record for this place. The controller should create
|
* should create as much of its user interface that it can without having access to the place
|
||||||
* as much of its user interface that it can without having access to
|
* object because this will be invoked in parallel with the fetching of the place object. When
|
||||||
* the place object because this will be invoked in parallel with the
|
* the place object is obtained, the controller will be notified and it can then finish the
|
||||||
* fetching of the place object. When the place object is obtained,
|
* user interface configuration and put the user interface into operation.
|
||||||
* the controller will be notified and it can then finish the user
|
|
||||||
* interface configuration and put the user interface into operation.
|
|
||||||
*
|
*
|
||||||
* @param ctx the client context.
|
* @param ctx the client context.
|
||||||
* @param config the place configuration for this place.
|
* @param config the place configuration for this place.
|
||||||
@@ -95,18 +92,16 @@ public abstract class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Derived classes can override this and perform any
|
* Derived classes can override this and perform any post-initialization processing they might
|
||||||
* post-initialization processing they might need. They should of
|
* need. They should of course be sure to call <code>super.didInit()</code>.
|
||||||
* course be sure to call <code>super.didInit()</code>.
|
|
||||||
*/
|
*/
|
||||||
protected void didInit ()
|
protected void didInit ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a reference to the place view associated with this
|
* Returns a reference to the place view associated with this controller. This is only valid
|
||||||
* controller. This is only valid after a call has been made to {@link
|
* after a call has been made to {@link #init}.
|
||||||
* #init}.
|
|
||||||
*/
|
*/
|
||||||
public PlaceView getPlaceView ()
|
public PlaceView getPlaceView ()
|
||||||
{
|
{
|
||||||
@@ -122,12 +117,10 @@ public abstract class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the user interface that will be used to display this place.
|
* Creates the user interface that will be used to display this place. The view instance
|
||||||
* The view instance returned will later be configured with the place
|
* returned will later be configured with the place object, once it becomes available.
|
||||||
* object, once it becomes available.
|
|
||||||
*
|
*
|
||||||
* @param ctx a reference to the {@link CrowdContext} associated with
|
* @param ctx a reference to the {@link CrowdContext} associated with this controller.
|
||||||
* this controller.
|
|
||||||
*/
|
*/
|
||||||
protected PlaceView createPlaceView (CrowdContext ctx)
|
protected PlaceView createPlaceView (CrowdContext ctx)
|
||||||
{
|
{
|
||||||
@@ -135,8 +128,7 @@ public abstract class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obsolete but retained for runtime compatibility with the old and
|
* Obsolete but retained for runtime compatibility with the old and busted.
|
||||||
* busted.
|
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link #createPlaceView(CrowdContext)}.
|
* @deprecated Use {@link #createPlaceView(CrowdContext)}.
|
||||||
*/
|
*/
|
||||||
@@ -147,11 +139,10 @@ public abstract class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is called by the location director once the place object has
|
* This is called by the location director once the place object has been fetched. The place
|
||||||
* been fetched. The place controller will dispatch the place object
|
* controller will dispatch the place object to the user interface hierarchy via
|
||||||
* to the user interface hierarchy via {@link
|
* {@link PlaceViewUtil#dispatchWillEnterPlace}. Derived classes can override this and perform
|
||||||
* PlaceViewUtil#dispatchWillEnterPlace}. Derived classes can override
|
* any other starting up that they need to do
|
||||||
* this and perform any other starting up that they need to do
|
|
||||||
*/
|
*/
|
||||||
public void willEnterPlace (final PlaceObject plobj)
|
public void willEnterPlace (final PlaceObject plobj)
|
||||||
{
|
{
|
||||||
@@ -175,15 +166,13 @@ public abstract class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called before a request is submitted to the server to leave the
|
* Called before a request is submitted to the server to leave the current place. As such,
|
||||||
* current place. As such, this method may be called multiple times
|
* this method may be called multiple times before {@link #didLeavePlace} is finally called.
|
||||||
* before {@link #didLeavePlace} is finally called. The request to
|
* The request to leave may be rejected, but if a place controller needs to flush any
|
||||||
* 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
|
||||||
* information to the place manager before it leaves, it should so do
|
* place in which the controller is guaranteed to be able to communicate to the place manager,
|
||||||
* here. This is the only place in which the controller is guaranteed
|
* as by the time {@link #didLeavePlace} is called, the place manager may have already been
|
||||||
* to be able to communicate to the place manager, as by the time
|
* destroyed.
|
||||||
* {@link #didLeavePlace} is called, the place manager may have
|
|
||||||
* already been destroyed.
|
|
||||||
*/
|
*/
|
||||||
public void mayLeavePlace (final PlaceObject plobj)
|
public void mayLeavePlace (final PlaceObject plobj)
|
||||||
{
|
{
|
||||||
@@ -197,11 +186,9 @@ public abstract class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is called by the location director when we are leaving this
|
* This is called by the location director when we are leaving this place and need to clean up
|
||||||
* place and need to clean up after ourselves and shutdown. Derived
|
* after ourselves and shutdown. Derived classes should override this method (being sure to
|
||||||
* classes should override this method (being sure to call
|
* call <code>super.didLeavePlace</code>) and perform any necessary cleanup.
|
||||||
* <code>super.didLeavePlace</code>) and perform any necessary
|
|
||||||
* cleanup.
|
|
||||||
*/
|
*/
|
||||||
public void didLeavePlace (final PlaceObject plobj)
|
public void didLeavePlace (final PlaceObject plobj)
|
||||||
{
|
{
|
||||||
@@ -224,9 +211,8 @@ public abstract class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles basic place controller action events. Derived classes
|
* Handles basic place controller action events. Derived classes should be sure to call
|
||||||
* should be sure to call <code>super.handleAction</code> for events
|
* <code>super.handleAction</code> for events they don't specifically handle.
|
||||||
* they don't specifically handle.
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean handleAction (final ActionEvent action)
|
public boolean handleAction (final ActionEvent action)
|
||||||
|
|||||||
Reference in New Issue
Block a user