Package net.sourceforge.jnlp.runtime
Class AppletEnvironment
java.lang.Object
net.sourceforge.jnlp.runtime.AppletEnvironment
- All Implemented Interfaces:
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.
-
Constructor Summary
ConstructorsConstructorDescriptionAppletEnvironment
(JNLPFile file, AppletInstance appletInstance) Create a new applet environment for the applet specified by the JNLP file, in a new frame.AppletEnvironment
(JNLPFile file, AppletInstance appletInstance, Container cont) Create a new applet environment for the applet specified by the JNLP file. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Returns the applet if the applet's name is specified, otherwise return null.Returns an enumeration that contains only the applet from the JNLP file.getAudioClip
(URL location) getParameter
(String name) net.sourceforge.jnlp.splashscreen.SplashController
container must be SplashContoler.Required for JRE1.4, but not implemented yet.Required for JRE1.4, but not implemented yet.boolean
isActive()
void
Set the applet of this environment; can only be called once.void
setStream
(String key, InputStream stream) Required for JRE1.4, but not implemented yet.void
showDocument
(URL uRL) void
showDocument
(URL uRL, String str) Not implemented yet.void
showStatus
(String str) Not implemented yet.void
Initialize, start, and show the applet.
-
Constructor Details
-
AppletEnvironment
Create a new applet environment for the applet specified by the JNLP file.- Parameters:
file
- jnlp file base to construct environmentappletInstance
- applet for this environmentcont
- container to place this applet to
-
AppletEnvironment
Create a new applet environment for the applet specified by the JNLP file, in a new frame.- Parameters:
file
- jnlp file base to construct environmentappletInstance
- applet for this environment
-
-
Method Details
-
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
- Returns:
- the frame that contains the applet. Disposing this frame will destroy the applet.
-
getSplashController
public net.sourceforge.jnlp.splashscreen.SplashController getSplashController()container must be SplashContoler.- Returns:
- container
-
startApplet
public void startApplet()Initialize, start, and show the applet. -
getApplet
Returns the applet if the applet's name is specified, otherwise return null.- Specified by:
getApplet
in interfaceAppletContext
-
setApplet
Set the applet of this environment; can only be called once.- Parameters:
applet
- source of this environment
-
getApplets
Returns an enumeration that contains only the applet from the JNLP file.- Specified by:
getApplets
in interfaceAppletContext
-
getAudioClip
- Specified by:
getAudioClip
in interfaceAppletContext
- Parameters:
location
- source of clip- Returns:
- an audio clip.
-
getImage
- Specified by:
getImage
in interfaceAppletContext
- Parameters:
location
- location of image- Returns:
- an image loaded from the specified location.
-
showDocument
- Specified by:
showDocument
in interfaceAppletContext
- Parameters:
uRL
- url of document
-
showDocument
Not implemented yet.- Specified by:
showDocument
in interfaceAppletContext
- Parameters:
uRL
- source of documentstr
- _self, _parent, _top, _blank or "name". Have sense only for applets. Not implemented for our javaws world
-
showStatus
Not implemented yet.- Specified by:
showStatus
in interfaceAppletContext
- Parameters:
str
- id of applet
-
setStream
Required for JRE1.4, but not implemented yet.- Specified by:
setStream
in interfaceAppletContext
-
getStream
Required for JRE1.4, but not implemented yet.- Specified by:
getStream
in interfaceAppletContext
-
getStreamKeys
Required for JRE1.4, but not implemented yet.- Specified by:
getStreamKeys
in interfaceAppletContext
-
appletResize
public void appletResize(int width, int height) - Specified by:
appletResize
in interfaceAppletStub
-
getAppletContext
- Specified by:
getAppletContext
in interfaceAppletStub
-
getCodeBase
- Specified by:
getCodeBase
in interfaceAppletStub
-
getDocumentBase
- Specified by:
getDocumentBase
in interfaceAppletStub
-
getParameter
- Specified by:
getParameter
in interfaceAppletStub
-
isActive
public boolean isActive()- Specified by:
isActive
in interfaceAppletStub
-