netx.jnlp.runtime

Class AppletEnvironment

Implemented Interfaces:
AppletContext, AppletStub

public class AppletEnvironment
extends java.lang.Object
implements AppletContext, AppletStub

The applet environment including stub, context, and frame. The default environment puts the applet in a non-resiable frame; this can be changed by obtaining the frame and setting it resizable.
Version:
$Revision: 1.12 $
Author:
Jon A. Maxwell (JAM) - initial author

Constructor Summary

AppletEnvironment(JNLPFile file, AppletInstance appletInstance)
Create a new applet environment for the applet specified by the JNLP file.

Method Summary

void
appletResize(int width, int height)
void
destroy()
Disposes the applet's resources and disables the applet environment from further use; after calling this method the applet stub and context methods throw IllegalStateExceptions.
Applet
getApplet(String name)
Returns the applet if the applet's name is specified, otherwise return null.
AppletContext
getAppletContext()
Frame
getAppletFrame()
Returns the frame that contains the applet.
Enumeration
getApplets()
Returns an enumeration that contains only the applet from the JNLP file.
AudioClip
getAudioClip(URL location)
Returns an audio clip.
URL
getCodeBase()
URL
getDocumentBase()
Image
getImage(URL location)
Return an image loaded from the specified location.
String
getParameter(String name)
InputStream
getStream(String key)
Required for JRE1.4, but not implemented yet.
Iterator
getStreamKeys()
Required for JRE1.4, but not implemented yet.
boolean
isActive()
void
setStream(String key, InputStream stream)
Required for JRE1.4, but not implemented yet.
void
showDocument(java.net.URL uRL)
Not implemented yet.
void
showDocument(java.net.URL uRL, java.lang.String str)
Not implemented yet.
void
showStatus(java.lang.String str)
Not implemented yet.
void
startApplet()
Initialize, start, and show the applet.

Constructor Details

AppletEnvironment

public AppletEnvironment(JNLPFile file,
                         AppletInstance appletInstance)
Create a new applet environment for the applet specified by the JNLP file.

Method Details

appletResize

public void appletResize(int width,
                         int height)

destroy

public void destroy()
Disposes the applet's resources and disables the applet environment from further use; after calling this method the applet stub and context methods throw IllegalStateExceptions.

getApplet

public Applet getApplet(String name)
Returns the applet if the applet's name is specified, otherwise return null.

getAppletContext

public AppletContext getAppletContext()

getAppletFrame

public Frame getAppletFrame()
Returns the frame that contains the applet. Disposing this frame will destroy the applet.

getApplets

public Enumeration getApplets()
Returns an enumeration that contains only the applet from the JNLP file.

getAudioClip

public AudioClip getAudioClip(URL location)
Returns an audio clip.

getCodeBase

public URL getCodeBase()

getDocumentBase

public URL getDocumentBase()

getImage

public Image getImage(URL location)
Return an image loaded from the specified location.

getParameter

public String getParameter(String name)

getStream

public InputStream getStream(String key)
Required for JRE1.4, but not implemented yet.

getStreamKeys

public Iterator getStreamKeys()
Required for JRE1.4, but not implemented yet.

isActive

public boolean isActive()

setStream

public void setStream(String key,
                      InputStream stream)
Required for JRE1.4, but not implemented yet.

showDocument

public void showDocument(java.net.URL uRL)
Not implemented yet.

showDocument

public void showDocument(java.net.URL uRL,
                         java.lang.String str)
Not implemented yet.

showStatus

public void showStatus(java.lang.String str)
Not implemented yet.

startApplet

public void startApplet()
Initialize, start, and show the applet.