public interface AppletContext
| Modifier and Type | Method and Description |
|---|---|
Applet |
getApplet(java.lang.String name)
Returns the applet in the document for this object that has the
specified name.
|
java.util.Enumeration<Applet> |
getApplets()
Returns a list of all the applets in the document for this object.
|
AudioClip |
getAudioClip(java.net.URL url)
Returns an audio clip from the specified URL.
|
java.awt.Image |
getImage(java.net.URL url)
Returns an image from the specified URL.
|
java.io.InputStream |
getStream(java.lang.String key)
Return the stream associated with a given key in this applet context, or
null if nothing is associated.
|
java.util.Iterator<java.lang.String> |
getStreamKeys()
Iterate over all keys that have associated streams.
|
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.
|
void |
showDocument(java.net.URL url)
Displays the web page pointed to by the specified URL in the window
for this object.
|
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.
|
void |
showStatus(java.lang.String message)
Displays the specified message in the status window if that window
exists.
|
AudioClip getAudioClip(java.net.URL url)
url - the URL of the audio clipjava.lang.NullPointerException - if url is nulljava.awt.Image getImage(java.net.URL url)
url - the absolute URL of the imagejava.lang.NullPointerException - if url is nullApplet getApplet(java.lang.String name)
name - the applet namenull if not foundjava.util.Enumeration<Applet> getApplets()
void showDocument(java.net.URL url)
url - the URL of the web page to load; unspecified on an errorvoid showDocument(java.net.URL url, java.lang.String target)
url - the URL of the web page to loadtarget - the target windowvoid showStatus(java.lang.String message)
message - the status message, may be nullvoid setStream(java.lang.String key, java.io.InputStream stream) throws java.io.IOException
key - the key to associate withstream - the stream value to tie to the key, or null to removejava.io.IOException - if the stream is too largejava.io.InputStream getStream(java.lang.String key)
key - the key to look upjava.util.Iterator<java.lang.String> getStreamKeys()