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
StatusDisplay passed to this context is an instance of AppletViewer, this method will return
the Applet of such AppletViewer. |
Enumeration<Applet> |
getApplets()
Returns an enumeration containing the
Applet returned by getApplet(String). |
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
AppletContext. |
Iterator<String> |
getStreamKeys()
Finds all the keys of the streams in this
AppletContext. |
void |
setStream(String key,
InputStream stream)
Associates the specified stream with the specified key in this
AppletContext. |
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
StatusDisplay. |
public BasicAppletContext(@Nonnull StatusDisplay statusDisplay)
BasicAppletContext.statusDisplay - where the application can inform users of its current state.NullPointerException - if statusDisplay is null.@Nullable public Applet getApplet(@Nullable 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 AppletContextApplet in this context's StatusDisplay (if any.)AppletContext.getApplet(String)@Nonnull public Enumeration<Applet> getApplets()
Applet returned by getApplet(String). If
getApplet(String) returns null, this method will return an empty enumeration.getApplets in interface AppletContextApplet in this context's StatusDisplay (if any.)getApplet(String),
AppletContext.getApplets()@Nullable public AudioClip getAudioClip(@Nullable URL url)
null.getAudioClip in interface AppletContextAppletContext.getAudioClip(URL)@Nullable public Image getImage(@Nullable URL url)
null.getImage in interface AppletContextAppletContext.getImage(URL)@Nullable public InputStream getStream(@Nullable String key)
AppletContext. Returns null if
the AppletContext contains no stream for this key.getStream in interface AppletContextkey - key whose associated stream is to be returned.AppletContext maps the key.@Nonnull public Iterator<String> getStreamKeys()
AppletContext.getStreamKeys in interface AppletContextAppletContext.public void setStream(@Nullable String key, @Nullable InputStream stream)
AppletContext.setStream in interface AppletContextkey - 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 AppletContext.public void showDocument(@Nullable URL url)
showDocument in interface AppletContextAppletContext.showDocument(URL)public void showDocument(@Nullable URL url, @Nullable String target)
showDocument in interface AppletContextAppletContext.showDocument(URL, String)public void showStatus(String status)
StatusDisplay.showStatus in interface AppletContextstatus - a message to display.Copyright © 2014 AssertJ. All rights reserved.