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:- Aaron M. Renn (arenn@urbanophile.com)
getApplet
public Applet getApplet(java.lang.String name)
Returns the applet in the document for this object that has the
specified name.
Parameters:
Returns:
- the requested applet, or
null
if not found
getApplets
public Enumeration getApplets()
Returns a list of all the applets in the document for this object.
Returns:
- a list of all the applets
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:
- the associated stream, or null
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:
- an iterator over the association keys
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: