public interface AppletContext
| Modifier and Type | Method and Description |
|---|---|
Applet |
getApplet(String name)
Returns the applet in the document for this object that has the
specified name.
|
Enumeration<Applet> |
getApplets()
Returns a list of all the applets in the document for this object.
|
AudioClip |
getAudioClip(URL url)
Returns an audio clip from the specified URL.
|
Image |
getImage(URL url)
Returns an image from the specified URL.
|
InputStream |
getStream(String key)
Return the stream associated with a given key in this applet context, or
null if nothing is associated.
|
Iterator<String> |
getStreamKeys()
Iterate over all keys that have associated streams.
|
void |
setStream(String key,
InputStream stream)
Associate a stream to a key for this applet context, possibly replacing
the old value.
|
void |
showDocument(URL url)
Displays the web page pointed to by the specified URL in the window
for this object.
|
void |
showDocument(URL url,
String target)
Displays the web page pointed to be the sepcified URL in the window
with the specified name.
|
void |
showStatus(String message)
Displays the specified message in the status window if that window
exists.
|
AudioClip getAudioClip(URL url)
url - the URL of the audio clipNullPointerException - if url is nullImage getImage(URL url)
url - the absolute URL of the imageNullPointerException - if url is nullApplet getApplet(String name)
name - the applet namenull if not foundEnumeration<Applet> getApplets()
void showDocument(URL url)
url - the URL of the web page to load; unspecified on an errorvoid showDocument(URL url, String target)
url - the URL of the web page to loadtarget - the target windowvoid showStatus(String message)
message - the status message, may be nullvoid setStream(String key, InputStream stream) throws IOException
key - the key to associate withstream - the stream value to tie to the key, or null to removeIOException - if the stream is too largeInputStream getStream(String key)
key - the key to look upIterator<String> getStreamKeys()