AppletStub (Java 2 Platform SE 5.0) (original) (raw)
java.applet
Interface AppletStub
public interface AppletStub
When an applet is first created, an applet stub is attached to it using the applet's setStub
method. This stub serves as the interface between the applet and the browser environment or applet viewer environment in which the application is running.
Since:
JDK1.0
See Also:
Applet.setStub(java.applet.AppletStub)
Method Summary | |
---|---|
void | [appletResize](../../java/applet/AppletStub.html#appletResize%28int, int%29)(int width, int height) Called when the applet wants to be resized. |
AppletContext | getAppletContext() Gets a handler to the applet's context. |
URL | getCodeBase() Gets the base URL. |
URL | getDocumentBase() Gets the URL of the document in which the applet is embedded. |
String | getParameter(String name) Returns the value of the named parameter in the HTML tag. |
boolean | isActive() Determines if the applet is active. |
Method Detail |
---|
isActive
boolean isActive()
Determines if the applet is active. An applet is active just before its start
method is called. It becomes inactive just before its stop
method is called.
Returns:
true
if the applet is active;false
otherwise.
getDocumentBase
URL getDocumentBase()
Gets the URL of the document in which the applet is embedded. For example, suppose an applet is contained within the document:
The document base is:
Returns:
the URL of the document that contains the applet.
See Also:
getCodeBase
URL getCodeBase()
Gets the base URL. This is the URL of the directory which contains the applet.
Returns:
the base URL of the directory which contains the applet.
See Also:
getParameter
String getParameter(String name)
Returns the value of the named parameter in the HTML tag. For example, if an applet is specified as
then a call to getParameter("Color")
returns the value "blue"
.
Parameters:
name
- a parameter name.
Returns:
the value of the named parameter, or null if not set.
getAppletContext
AppletContext getAppletContext()
Gets a handler to the applet's context.
Returns:
the applet's context.
appletResize
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.
Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.