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 StatusDisplayprivate final Map<String,InputStream> -
Constructor Summary
ConstructorsConstructorDescriptionBasicAppletContext(StatusDisplay statusDisplay) Creates a newBasicAppletContext. -
Method Summary
Modifier and TypeMethodDescriptionprivate static AppletappletFrom(StatusDisplay statusDisplay) If thepassed to this context is an instance ofStatusDisplay, this method will return theAppletViewerAppletof suchAppletViewer.Returns an enumeration containing theAppletreturned 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.voidsetStream(String key, InputStream stream) Associates the specified stream with the specified key in this applet context.voidshowDocument(URL url) Not implemented.voidshowDocument(URL url, String target) Not implemented.voidshowStatus(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- ifstatusDisplayisnull.
-
-
Method Details
-
getApplet
If thepassed to this context is an instance ofStatusDisplay, this method will return theAppletViewerAppletof suchAppletViewer. Otherwise this method returnsnull.- Specified by:
getAppletin interfaceAppletContext- Returns:
- the
Appletin this context'sStatusDisplay(if any.) - See Also:
-
getApplets
Returns an enumeration containing theAppletreturned by. IfgetApplet(String)returnsgetApplet(String)null, this method will return an empty enumeration.- Specified by:
getAppletsin interfaceAppletContext- Returns:
- an enumeration containing the
Appletin this context'sStatusDisplay(if any.) - See Also:
-
appletFrom
-
getAudioClip
Not implemented. Returnsnull.- Specified by:
getAudioClipin interfaceAppletContext- See Also:
-
getImage
Not implemented. Returnsnull.- Specified by:
getImagein interfaceAppletContext- See Also:
-
getStream
Returns the stream to which specified key is associated within this applet context. Returnsnullif the applet context contains no stream for this key.- Specified by:
getStreamin 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:
getStreamKeysin 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:
setStreamin 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:
showDocumentin interfaceAppletContext- See Also:
-
showDocument
Not implemented.- Specified by:
showDocumentin interfaceAppletContext- See Also:
-
showStatus
Requests that the given status be displayed in this context's.StatusDisplay- Specified by:
showStatusin interfaceAppletContext- Parameters:
status- a message to display.
-