|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Method Summary | |
---|---|
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. |
Method Detail |
---|
AudioClip getAudioClip(URL url)
url
- the URL of the audio clip
NullPointerException
- if url is nullImage getImage(URL url)
url
- the absolute URL of the image
NullPointerException
- if url is nullApplet getApplet(String name)
name
- the applet name
null
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 remove
IOException
- if the stream is too largeInputStream getStream(String key)
key
- the key to look up
Iterator<String> getStreamKeys()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |