objectdraw
Class ControllerStub

java.lang.Object
  extended by objectdraw.ControllerStub
All Implemented Interfaces:
AppletStub

 class ControllerStub
extends Object
implements AppletStub

A class the implements the AppletStub interface designed to function as the applet stub for Controller's run as applications or under control of IDEs like BlueJ and DrJava.

Version:
1.1.1 released February 2005

Constructor Summary
ControllerStub(Applet controller, Frame window)
          Create a new controller stub given a controller and the frame in which it will be displayed
 
Method Summary
 void activate()
          Initiate execution of the controller served by this stub by invoking its init and start methods.
 void appletResize(int width, int height)
          Resize the frame used to display this controller
 void deactivate()
          Deactivate the associated controller
 AppletContext getAppletContext()
          Access the applet context for this stub's controller
 URL getCodeBase()
          Determine the URL for the source of code and other resources for the associated controller
 URL getDocumentBase()
          Determine the URL for the source of code and other resources for the associated controller
 String getParameter(String name)
          Return emtpy string in response to any request for parameter values since this stub does not handle parameters.
 boolean isActive()
          Determine whether the associated controller is still active
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerStub

public ControllerStub(Applet controller,
                      Frame window)
Create a new controller stub given a controller and the frame in which it will be displayed

Parameters:
controller - the controller this stub will serve
window - the frame in which the controller is displayed
Method Detail

activate

public void activate()
Initiate execution of the controller served by this stub by invoking its init and start methods.


appletResize

public void appletResize(int width,
                         int height)
Resize the frame used to display this controller

Specified by:
appletResize in interface AppletStub
Parameters:
width - new frame width in pixels
height - new frame height in pixels

deactivate

public void deactivate()
Deactivate the associated controller


getAppletContext

public AppletContext getAppletContext()
Access the applet context for this stub's controller

Specified by:
getAppletContext in interface AppletStub
Returns:
the applet context for this stub

getCodeBase

public URL getCodeBase()
Determine the URL for the source of code and other resources for the associated controller

Specified by:
getCodeBase in interface AppletStub
Returns:
URL for document base

getDocumentBase

public URL getDocumentBase()
Determine the URL for the source of code and other resources for the associated controller

Specified by:
getDocumentBase in interface AppletStub
Returns:
URL for document base

getParameter

public String getParameter(String name)
Return emtpy string in response to any request for parameter values since this stub does not handle parameters.

Specified by:
getParameter in interface AppletStub
Returns:
the empty string

isActive

public boolean isActive()
Determine whether the associated controller is still active

Specified by:
isActive in interface AppletStub
Returns:
true if the controller is active