Packages  This Package  Prev  Next  Index  

§3.3 Interface AppletStub

public  interface  java.applet.AppletStub
{
        // Methods
    public abstract void appletResize(int  width, int  height);	§3.3.1
    public abstract AppletContext getAppletContext();	§3.3.2
    public abstract URL getCodeBase();	§3.3.3
    public abstract URL getDocumentBase();	§3.3.4
    public abstract String getParameter(String  name);	§3.3.5
    public abstract boolean isActive();	§3.3.6
}
When an applet is first created, an applet stub is attached to it using the applet's setStub method (II-§3.1.19). This stub serves as the interface between the applet and the browser environment or applet viewer environment in which the application is running.


Methods

appletResize

public abstract void appletResize(int width, int height)
Called when the applet wants to be resized.
Parameters:
width - the new requested width for the applet
height - the new requested height for the applet

getAppletContext

public abstract AppletContext getAppletContext()
Returns:
the applet's context.

getCodeBase

public abstract URL getCodeBase()
Returns:
the URL of the applet.

getDocumentBase

public abstract URL getDocumentBase()
Returns:
the URL of the document containing the applet.

getParameter

public abstract String getParameter(String name)
Returns the value of the named parameter in the HTML tag. For example, if an applet is specified as
A call to getParameter("Color") returns the value "blue".
Parameters:
name - a parameter name
Returns:
the value of the named parameter.

isActive

public abstract boolean isActive()
Determines if the applet is active. An applet is active just before its start method (II-§3.1.21) is called. It becomes inactive immediately after its stop (II-§3.1.22) method is called.

Returns:
true if the applet is active; false otherwise.

Packages  This Package  Prev  Next  Index
Java API Document (HTML generated by dkramer on April 22, 1996)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com