public class BasicAppletContext extends Object implements AppletContext
AppletContext
.Constructor and Description |
---|
BasicAppletContext(StatusDisplay statusDisplay)
Creates a new
BasicAppletContext . |
Modifier and Type | Method and Description |
---|---|
Applet |
getApplet(String name)
If the
passed to this context is an instance of
, this method will return the Applet of such AppletViewer . |
Enumeration<Applet> |
getApplets()
Returns an enumeration containing the
Applet returned by . |
AudioClip |
getAudioClip(URL url)
Not implemented.
|
Image |
getImage(URL url)
Not implemented.
|
InputStream |
getStream(String key)
Returns the stream to which specified key is associated within this applet context.
|
Iterator<String> |
getStreamKeys()
Finds all the keys of the streams in this applet context.
|
void |
setStream(String key,
InputStream stream)
Associates the specified stream with the specified key in this applet context.
|
void |
showDocument(URL url)
Not implemented.
|
void |
showDocument(URL url,
String target)
Not implemented.
|
void |
showStatus(String status)
Requests that the given status be displayed in this context's
. |
public BasicAppletContext(StatusDisplay statusDisplay)
BasicAppletContext
.statusDisplay
- where the application can inform users of its current state.NullPointerException
- if statusDisplay
is null
.public Applet getApplet(String name)
StatusDisplay
passed to this context is an instance of
AppletViewer
, this method will return the Applet
of such AppletViewer
.
Otherwise this method returns null
.getApplet
in interface AppletContext
Applet
in this context's StatusDisplay
(if any.)AppletContext.getApplet(String)
public Enumeration<Applet> getApplets()
Applet
returned by getApplet(String)
. If
getApplet(String)
returns null
, this method will return an empty enumeration.getApplets
in interface AppletContext
Applet
in this context's StatusDisplay
(if any.)getApplet(String)
,
AppletContext.getApplets()
public AudioClip getAudioClip(URL url)
null
.getAudioClip
in interface AppletContext
AppletContext.getAudioClip(URL)
public Image getImage(URL url)
null
.getImage
in interface AppletContext
AppletContext.getImage(URL)
public InputStream getStream(String key)
null
if
the applet context contains no stream for this key.getStream
in interface AppletContext
key
- key whose associated stream is to be returned.public Iterator<String> getStreamKeys()
getStreamKeys
in interface AppletContext
public void setStream(String key, InputStream stream)
setStream
in interface AppletContext
key
- key with which the specified value is to be associated.stream
- stream to be associated with the specified key. If this parameter is null
, the specified
key is removed in this applet context.public void showDocument(URL url)
showDocument
in interface AppletContext
AppletContext.showDocument(URL)
public void showDocument(URL url, String target)
showDocument
in interface AppletContext
AppletContext.showDocument(URL, String)
public void showStatus(String status)
StatusDisplay
.showStatus
in interface AppletContext
status
- a message to display.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.