|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
fi.hut.tml.xsmiles.mlfc.jax.AppletRunner
AppletRunner - 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.
| Nested Class Summary |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| 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 | |
AppletRunner(java.applet.Applet applet,
java.lang.String cB,
java.net.URL docBase,
int w,
int h,
MLFCListener listener)
Constructor for the main class, given an existing applet object. |
|
| Method Summary | |
void |
appletResize(int width,
int height)
Called when the applet wants to be resized. |
java.applet.Applet |
getApplet(java.lang.String name)
Gets an applet by name. |
java.applet.AppletContext |
getAppletContext()
Gets a handler to the applet's context. |
java.util.Enumeration |
getApplets()
Enumerates the applets in this context. |
java.applet.AudioClip |
getAudioClip(java.net.URL url)
Gets an audio clip. |
java.net.URL |
getCodeBase()
Gets the codebase URL. |
java.net.URL |
getDocumentBase()
Gets the document URL. |
java.awt.Image |
getImage(java.net.URL url)
Gets an image. |
java.lang.String |
getParameter(java.lang.String name)
Gets a parameter of the applet. |
java.awt.Dimension |
getPreferredSize()
so that this is a perfect component |
java.awt.Dimension |
getSize()
|
java.io.InputStream |
getStream(java.lang.String key)
|
java.util.Iterator |
getStreamKeys()
|
boolean |
handleEvent(java.awt.Event evt)
Event handler to catch the Frame (window) close action, and exit the program. |
boolean |
isActive()
Returns true if the applet is active. |
void |
runApplet()
Starts the crapplet |
void |
setDimension(java.awt.Dimension d)
|
void |
setParams(java.util.Hashtable p)
A hashtable containing all the parameters, with the name as a key |
void |
setStream(java.lang.String key,
java.io.InputStream stream)
Creates a new URLStreamHandler instance with the specified protocol. |
void |
showDocument(java.net.URL url)
Shows a new document. |
void |
showDocument(java.net.URL url,
java.lang.String target)
Show a new document in a target window or frame. |
void |
showStatus(java.lang.String text)
Show a status string in the status area (the Text object at the bottom of the window. |
void |
stop()
|
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AppletRunner(java.applet.Applet applet,
java.lang.String cB,
java.net.URL docBase,
int w,
int h,
MLFCListener listener)
applet - the applet embedded in this AppletContext| Method Detail |
public void runApplet()
public void stop()
public void setParams(java.util.Hashtable p)
public void setDimension(java.awt.Dimension d)
public boolean handleEvent(java.awt.Event evt)
evt - The event that occurred
public boolean isActive()
isActive in interface java.applet.AppletStubpublic java.net.URL getDocumentBase()
getDocumentBase in interface java.applet.AppletStubpublic java.net.URL getCodeBase()
getCodeBase in interface java.applet.AppletStubpublic final java.lang.String getParameter(java.lang.String name)
getParameter in interface java.applet.AppletStubname - the name of the parameter
public final java.applet.AppletContext getAppletContext()
getAppletContext in interface java.applet.AppletStub
public void appletResize(int width,
int height)
appletResize in interface java.applet.AppletStubwidth - the new width of the appletheight - the new height of the appletpublic java.awt.Dimension getPreferredSize()
public java.awt.Dimension getSize()
public final java.applet.AudioClip getAudioClip(java.net.URL url)
getAudioClip in interface java.applet.AppletContexturl - URL of the AudioClip to load
public final java.awt.Image getImage(java.net.URL url)
getImage in interface java.applet.AppletContexturl - URL of the Image to load
public final java.applet.Applet getApplet(java.lang.String name)
getApplet in interface java.applet.AppletContextname - the name of the applet
public final java.util.Enumeration getApplets()
getApplets in interface java.applet.AppletContextpublic void showDocument(java.net.URL url)
showDocument in interface java.applet.AppletContexturl - URL to load
public void showDocument(java.net.URL url,
java.lang.String target)
showDocument in interface java.applet.AppletContexturl - URL to loadtarget - the target stringpublic void showStatus(java.lang.String text)
showStatus in interface java.applet.AppletContexttext - the text to display
public void setStream(java.lang.String key,
java.io.InputStream stream)
throws java.io.IOException
setStream in interface java.applet.AppletContextjava.io.IOExceptionpublic java.io.InputStream getStream(java.lang.String key)
getStream in interface java.applet.AppletContextpublic java.util.Iterator getStreamKeys()
getStreamKeys in interface java.applet.AppletContext
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||