Spreadsheet Toolkit

corpus.doodle
Class Stub

java.lang.Object
  |
  +--corpus.doodle.Stub
All Implemented Interfaces:
java.applet.AppletStub

public class Stub
extends java.lang.Object
implements java.applet.AppletStub

The Stub class provides a mechanism for obtaining information from the run-time environment. Typically, this environment is maintained by a Web browser. For this program, a Web browser environment is being simulated. Great article on creating applet/application hybrid http://www.javaworld.com/javaworld/jw-11-2000/jw-1103-java101.html


Constructor Summary
Stub(java.lang.String[] args)
          Create a new Stub object.
 
Method Summary
 void appletResize(int width, int height)
          Resize the applet.
 java.applet.AppletContext getAppletContext()
          Return a reference to the applet's context.
 java.net.URL getCodeBase()
          Return the complete URL of the applet's .class file(s).
 java.net.URL getDocumentBase()
          Return the complete URL of the HTML document containing the applet.
 java.lang.String getParameter(java.lang.String name)
          Return the value of the applet parameter, identified by the name argument.
 boolean isActive()
          Return the current state of an applet.
 void setActive(boolean active)
          The following method is an extra method that is called to set the value of the private active variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stub

public Stub(java.lang.String[] args)
Create a new Stub object. The application's array of command arguments are passed to this constructor, where they are saved in a Hashtable object, for later retrieval by the getParameter method.

Method Detail

isActive

public boolean isActive()
Return the current state of an applet. During initialization, the applet is not active (and this method returns false). The applet's active state is set to true just before the start method is called.

Specified by:
isActive in interface java.applet.AppletStub

getDocumentBase

public java.net.URL getDocumentBase()
Return the complete URL of the HTML document containing the applet. This URL includes the name of the document's file.

Specified by:
getDocumentBase in interface java.applet.AppletStub

getCodeBase

public java.net.URL getCodeBase()
Return the complete URL of the applet's .class file(s). This method is often used with the getImage and getAudioClip methods to load image/audio files relative to the .class files.

Specified by:
getCodeBase in interface java.applet.AppletStub

getParameter

public java.lang.String getParameter(java.lang.String name)
Return the value of the applet parameter, identified by the name argument. If not present, null is returned. The Applet class contains a getParameter method that calls this method.

Specified by:
getParameter in interface java.applet.AppletStub

getAppletContext

public java.applet.AppletContext getAppletContext()
Return a reference to the applet's context. The Applet class contains a getAppletContext method that calls this method.

Specified by:
getAppletContext in interface java.applet.AppletStub

appletResize

public void appletResize(int width,
                         int height)
Resize the applet. The Applet class contains a pair of resize methods that call this method. Note: Web browsers don't permit applets from being resized.

Specified by:
appletResize in interface java.applet.AppletStub

setActive

public void setActive(boolean active)
The following method is an extra method that is called to set the value of the private active variable.


Spreadsheet Toolkit

Project Home Page