Package org.fest.swing.applet
Class BasicAppletContext
java.lang.Object
org.fest.swing.applet.BasicAppletContext
- All Implemented Interfaces:
AppletContext
Understands a basic (and limited) implementation of
AppletContext
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Enumeration<Applet>
private final StatusDisplay
private final Map<String,
InputStream> -
Constructor Summary
ConstructorsConstructorDescriptionBasicAppletContext
(StatusDisplay statusDisplay) Creates a newBasicAppletContext
. -
Method Summary
Modifier and TypeMethodDescriptionprivate static Applet
appletFrom
(StatusDisplay statusDisplay) If the
passed to this context is an instance ofStatusDisplay
, this method will return theAppletViewer
Applet
of suchAppletViewer
.Returns an enumeration containing theApplet
returned by
.getApplet(String)
getAudioClip
(URL url) Not implemented.Not implemented.Returns the stream to which specified key is associated within this applet context.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
.StatusDisplay
-
Field Details
-
NO_APPLETS
-
streamMap
-
statusDisplay
-
-
Constructor Details
-
BasicAppletContext
Creates a newBasicAppletContext
.- Parameters:
statusDisplay
- where the application can inform users of its current state.- Throws:
NullPointerException
- ifstatusDisplay
isnull
.
-
-
Method Details
-
getApplet
If the
passed to this context is an instance ofStatusDisplay
, this method will return theAppletViewer
Applet
of suchAppletViewer
. Otherwise this method returnsnull
.- Specified by:
getApplet
in interfaceAppletContext
- Returns:
- the
Applet
in this context'sStatusDisplay
(if any.) - See Also:
-
getApplets
Returns an enumeration containing theApplet
returned by
. IfgetApplet(String)
returnsgetApplet(String)
null
, this method will return an empty enumeration.- Specified by:
getApplets
in interfaceAppletContext
- Returns:
- an enumeration containing the
Applet
in this context'sStatusDisplay
(if any.) - See Also:
-
appletFrom
-
getAudioClip
Not implemented. Returnsnull
.- Specified by:
getAudioClip
in interfaceAppletContext
- See Also:
-
getImage
Not implemented. Returnsnull
.- Specified by:
getImage
in interfaceAppletContext
- See Also:
-
getStream
Returns the stream to which specified key is associated within this applet context. Returnsnull
if the applet context contains no stream for this key.- Specified by:
getStream
in interfaceAppletContext
- Parameters:
key
- key whose associated stream is to be returned.- Returns:
- the stream to which this applet context maps the key.
-
getStreamKeys
Finds all the keys of the streams in this applet context.- Specified by:
getStreamKeys
in interfaceAppletContext
- Returns:
- an iterator of all the names of the streams in this applet context.
-
setStream
Associates the specified stream with the specified key in this applet context.- Specified by:
setStream
in interfaceAppletContext
- Parameters:
key
- key with which the specified value is to be associated.stream
- stream to be associated with the specified key. If this parameter isnull
, the specified key is removed in this applet context.
-
showDocument
Not implemented.- Specified by:
showDocument
in interfaceAppletContext
- See Also:
-
showDocument
Not implemented.- Specified by:
showDocument
in interfaceAppletContext
- See Also:
-
showStatus
Requests that the given status be displayed in this context's
.StatusDisplay
- Specified by:
showStatus
in interfaceAppletContext
- Parameters:
status
- a message to display.
-