netx.jnlp.runtime
Class AppletEnvironment

java.lang.Object
  |
  +--netx.jnlp.runtime.AppletEnvironment
All Implemented Interfaces:
java.applet.AppletContext, java.applet.AppletStub

public class AppletEnvironment
extends java.lang.Object
implements java.applet.AppletContext, java.applet.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.9 $
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.
 java.applet.Applet getApplet(java.lang.String name)
          Returns the applet if the applet's name is specified, otherwise return null.
 java.applet.AppletContext getAppletContext()
           
 java.awt.Frame getAppletFrame()
          Returns the frame that contains the applet.
 java.util.Enumeration getApplets()
          Returns an enumeration that contains only the applet from the JNLP file.
 java.applet.AudioClip getAudioClip(java.net.URL location)
          Returns an audio clip.
 java.net.URL getCodeBase()
           
 java.net.URL getDocumentBase()
           
 java.awt.Image getImage(java.net.URL location)
          Return an image loaded from the specified location.
 java.lang.String getParameter(java.lang.String name)
           
 java.io.InputStream getStream(java.lang.String key)
          Required for JRE1.4, but not implemented yet.
 java.util.Iterator getStreamKeys()
          Required for JRE1.4, but not implemented yet.
 boolean isActive()
           
 void setStream(java.lang.String key, java.io.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppletEnvironment

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

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.

getAppletFrame

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

startApplet

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

getApplet

public java.applet.Applet getApplet(java.lang.String name)
Returns the applet if the applet's name is specified, otherwise return null.
Specified by:
getApplet in interface java.applet.AppletContext

getApplets

public java.util.Enumeration getApplets()
Returns an enumeration that contains only the applet from the JNLP file.
Specified by:
getApplets in interface java.applet.AppletContext

getAudioClip

public java.applet.AudioClip getAudioClip(java.net.URL location)
Returns an audio clip.
Specified by:
getAudioClip in interface java.applet.AppletContext

getImage

public java.awt.Image getImage(java.net.URL location)
Return an image loaded from the specified location.
Specified by:
getImage in interface java.applet.AppletContext

showDocument

public void showDocument(java.net.URL uRL)
Not implemented yet.
Specified by:
showDocument in interface java.applet.AppletContext

showDocument

public void showDocument(java.net.URL uRL,
                         java.lang.String str)
Not implemented yet.
Specified by:
showDocument in interface java.applet.AppletContext

showStatus

public void showStatus(java.lang.String str)
Not implemented yet.
Specified by:
showStatus in interface java.applet.AppletContext

setStream

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

getStream

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

getStreamKeys

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

appletResize

public void appletResize(int width,
                         int height)
Specified by:
appletResize in interface java.applet.AppletStub

getAppletContext

public java.applet.AppletContext getAppletContext()
Specified by:
getAppletContext in interface java.applet.AppletStub

getCodeBase

public java.net.URL getCodeBase()
Specified by:
getCodeBase in interface java.applet.AppletStub

getDocumentBase

public java.net.URL getDocumentBase()
Specified by:
getDocumentBase in interface java.applet.AppletStub

getParameter

public java.lang.String getParameter(java.lang.String name)
Specified by:
getParameter in interface java.applet.AppletStub

isActive

public boolean isActive()
Specified by:
isActive in interface java.applet.AppletStub