Class appWrapper
Class appWrapper
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----appWrapper
- public class appWrapper
- extends Applet
- implements AppletStub, Runnable
The appWrapper is thought to make the applet itself independent from
the original context. This is necessary to be able to detach the applet
from the web browsers window without disconnecting it from events.
Note: This applet should work with any applet without changes.
<PARAM NAME="applet" VALUE="applet">
- Defines the applet to be loaded by the appWrapper. State the applet
class name without ".class"!
<PARAM NAME="startButton" VALUE="text">
- If this parameter is set the applet is not loaded until the user presses
the button. This decreases first time download delay. The text
given as value to the parameter is shown on the button. While loading
the applet the message "Loading ..." is shown on the button.
<PARAM NAME="stopButton" VALUE="text">
- This parameter defines the button text when the applet is loaded. When
pressing the button while the applet is running this causes the applet
window to be destroyed and the applet is stopped.
<PARAM NAME="frameTitle" VALUE="text">
- The frameTitle is the text that is shown in the title bar of the
applet window.
- Version:
- $Id: appWrapper.java,v 1.9 1997/07/24 13:26:24 leo Exp $
- Author:
- Matthias L. Jugel
-
appWrapper()
-
-
appletResize(int, int)
- This method is called when the applet want's to be resized.
-
getAppletInfo()
- Give information about the applet.
-
getParameterInfo()
- Give information about the appWrapper and the applet loaded.
-
handleEvent(Event)
- Handle button events.
-
init()
- Applet initialization.
-
paint(Graphics)
- Write a message to the applet area.
-
reshape(int, int, int, int)
- reshape the applet and ourself
-
run()
- Load the applet finally.
appWrapper
public appWrapper()
init
public void init()
- Applet initialization. We load the class giving in parameter "applet"
and set the stub corresponding to ours. Thus we are able to give
it access to the parameters and any applet specific context.
- Overrides:
- init in class Applet
run
public void run()
- Load the applet finally. When using a button this creates a new frame
to put the applet in.
appletResize
public void appletResize(int width,
int height)
- This method is called when the applet want's to be resized.
- Parameters:
- width - the width of the applet
- height - the height of the applet
getAppletInfo
public String getAppletInfo()
- Give information about the applet.
- Overrides:
- getAppletInfo in class Applet
getParameterInfo
public String[][] getParameterInfo()
- Give information about the appWrapper and the applet loaded.
- Overrides:
- getParameterInfo in class Applet
paint
public void paint(Graphics g)
- Write a message to the applet area.
- Overrides:
- paint in class Component
reshape
public void reshape(int x,
int y,
int w,
int h)
- reshape the applet and ourself
- Overrides:
- reshape in class Component
handleEvent
public boolean handleEvent(Event evt)
- Handle button events. When pressed it either creates the new applet
window or destoys it.
- Overrides:
- handleEvent in class Component