Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.applet

Interface AppletContext

java.lang.Object
|
+--java.applet.AppletContext


public interface AppletContext

This interface allows an applet access to the browser to retrieve additional data files and display documents. It also allows the applet to find out other applets in the same document.

Since:Author:

Method Summary

java.applet.AppletgetApplet(java.lang.String name)

Returns the applet in the document for this object that has the specified name.
java.util.EnumerationgetApplets()

Returns a list of all the applets in the document for this object.
java.applet.AudioClipgetAudioClip(java.net.URL url)

Returns an audio clip from the specified URL.
java.awt.ImagegetImage(java.net.URL url)

Returns an image from the specified URL.
java.io.InputStreamgetStream(java.lang.String key)

Return the stream associated with a given key in this applet context, or null if nothing is associated.
java.util.IteratorgetStreamKeys()

Iterate over all keys that have associated streams.
voidsetStream(java.lang.String key, java.io.InputStream stream)

Associate a stream to a key for this applet context, possibly replacing the old value.
voidshowDocument(java.net.URL url)

Displays the web page pointed to by the specified URL in the window for this object.
voidshowDocument(java.net.URL url, java.lang.String target)

Displays the web page pointed to be the sepcified URL in the window with the specified name.
voidshowStatus(java.lang.String message)

Displays the specified message in the status window if that window exists.

Method Details

getApplet

public Applet getApplet(java.lang.String name)

Returns the applet in the document for this object that has the specified name.

Parameters:

Returns:


getApplets

public Enumeration getApplets()

Returns a list of all the applets in the document for this object.

Returns:


getAudioClip

public AudioClip getAudioClip(java.net.URL url)

Returns an audio clip from the specified URL.

Parameters:

Returns:

Throws:


getImage

public Image getImage(java.net.URL url)

Returns an image from the specified URL. Note that the image is not actually retrieved until the applet attempts to display it, so this method returns immediately.

Parameters:

Returns:

Throws:


getStream

public InputStream getStream(java.lang.String key)

Return the stream associated with a given key in this applet context, or null if nothing is associated. Stream associations are local to the applet context, for security purposes.

Since:Parameters:

Returns:


getStreamKeys

public Iterator getStreamKeys()

Iterate over all keys that have associated streams. Stream associated are local to the applet context, for security purposes.

Since:Returns:


setStream

public void setStream(java.lang.String key, java.io.InputStream stream)

Associate a stream to a key for this applet context, possibly replacing the old value. Stream associations are local to the applet context, for security purposes.

Since:Parameters:

Throws:


showDocument

public void showDocument(java.net.URL url)

Displays the web page pointed to by the specified URL in the window for this object. This page replaces the document that is currently there.

Parameters:


showDocument

public void showDocument(java.net.URL url, java.lang.String target)

Displays the web page pointed to be the sepcified URL in the window with the specified name. The standard names "_top", "_blank", "_parent", and "_self" are allowed. An applet viewer may disregard this request.

Parameters:


showStatus

public void showStatus(java.lang.String message)

Displays the specified message in the status window if that window exists.

Parameters: