|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--com.sas.util.AppletHost
AppletHost - implements AppletContext and AppletStub to allow any applet to easily run as an application. The only thing it can't do is access URL's. Applet parameters are entered on the command line with name as one word and value as the next.
| Inner classes inherited from class java.awt.Frame |
Frame.AccessibleAWTFrame |
| Inner classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
| Inner classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
protected Vector |
applets
|
protected int |
initial_height
|
protected int |
initial_width
|
protected Hashtable |
params
|
protected Button |
startButton
|
protected TextField |
status
|
protected Button |
stopButton
|
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
AppletHost(Applet applet,
int default_width,
int default_height,
String[] args)
Constructor for the main class, given an existing applet object and a default frame (window) width and height. |
|
AppletHost(Applet applet,
String[] args)
Constructor for the main class, given an existing applet object. |
|
AppletHost(String[] args)
Constructor for the main class, from the command line arguments. |
|
AppletHost(String appletClassName,
int default_width,
int default_height,
String[] args)
Constructor for the main class, given a name of an applet object and a default frame (window) width and height. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent evt)
|
void |
appletResize(int width,
int height)
Called when the applet wants to be resized. |
Applet |
getApplet(String name)
Gets an applet by name. |
AppletContext |
getAppletContext()
Gets a handler to the applet's context. |
Enumeration |
getApplets()
Enumerates the applets in this context. |
AudioClip |
getAudioClip(URL url)
Gets an audio clip. |
URL |
getCodeBase()
Gets the codebase URL. |
URL |
getDocumentBase()
Gets the document URL. |
Image |
getImage(URL url)
Gets an image. |
String |
getParameter(String name)
Gets a parameter of the applet. |
InputStream |
getStream(String key)
Returns the stream to which specified key is associated within this applet context. |
Iterator |
getStreamKeys()
Finds all the keys of the streams in this applet context. |
boolean |
isActive()
Returns true if the applet is active. |
static void |
main(String[] args)
Entry point into the standalone program. |
void |
parseArgs(String[] args,
int startidx)
Parse the command line arguments. |
void |
processWindowEvent(WindowEvent evt)
|
void |
setStream(String key,
InputStream stream)
Associates the specified stream with the specified key in this applet context. |
void |
showDocument(URL url)
Shows a new document. |
void |
showDocument(URL url,
String target)
Show a new document in a target window or frame. |
void |
showStatus(String text)
Show a status string in the status area (the Text object at the bottom of the window. |
| Methods inherited from class java.awt.Frame |
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Field Detail |
protected TextField status
protected Button startButton
protected Button stopButton
protected Hashtable params
protected Vector applets
protected int initial_width
protected int initial_height
| Constructor Detail |
public AppletHost(Applet applet,
String[] args)
applet - the applet embedded in this AppletContextargs - the command line arguments. Contains possibly
height and width, and any applet parameters
public AppletHost(Applet applet,
int default_width,
int default_height,
String[] args)
applet - the applet embedded in this AppletContextdefault_width - the default width of the windowdefault_height - the default width of the windowargs - the command line arguments. Contains possibly
height and width, and any applet parameters
public AppletHost(String appletClassName,
int default_width,
int default_height,
String[] args)
appletClassName - the applet embedded in this AppletContextdefault_width - the default width of the windowdefault_height - the default width of the windowargs - the command line arguments. Contains possibly
height and width, and any applet parameterspublic AppletHost(String[] args)
args - the command line arguments. Contains the name of the applet
class, possibly height and width, and any applet parameters.| Method Detail |
public static void main(String[] args)
args - the command line arguments
public void parseArgs(String[] args,
int startidx)
args - the command line arguments. Contains possibly
height and width, and any applet parametersstartidx - index in the args array at which to start parsingpublic void processWindowEvent(WindowEvent evt)
processWindowEvent in class Windowpublic void actionPerformed(ActionEvent evt)
actionPerformed in interface ActionListenerpublic boolean isActive()
isActive in interface AppletStubisActive in class Windowpublic URL getDocumentBase()
getDocumentBase in interface AppletStubpublic final URL getCodeBase()
getCodeBase in interface AppletStubpublic final String getParameter(String name)
getParameter in interface AppletStubname - the name of the parameterpublic final AppletContext getAppletContext()
getAppletContext in interface AppletStub
public void appletResize(int width,
int height)
appletResize in interface AppletStubwidth - the new width of the appletheight - the new height of the appletpublic final AudioClip getAudioClip(URL url)
getAudioClip in interface AppletContexturl - URL of the AudioClip to loadpublic final Image getImage(URL url)
getImage in interface AppletContexturl - URL of the Image to loadpublic final Applet getApplet(String name)
getApplet in interface AppletContextname - the name of the appletpublic final Enumeration getApplets()
getApplets in interface AppletContextpublic void showDocument(URL url)
showDocument in interface AppletContexturl - URL to load
public void showDocument(URL url,
String target)
showDocument in interface AppletContexturl - URL to loadtarget - the target stringpublic void showStatus(String text)
showStatus in interface AppletContexttext - the text to displaypublic InputStream getStream(String key)
getStream in interface AppletContextpublic Iterator getStreamKeys()
getStreamKeys in interface AppletContext
public void setStream(String key,
InputStream stream)
setStream in interface AppletContext
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||