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

Constructor Index

 o appWrapper()

Method Index

 o appletResize(int, int)
This method is called when the applet want's to be resized.
 o getAppletInfo()
Give information about the applet.
 o getParameterInfo()
Give information about the appWrapper and the applet loaded.
 o handleEvent(Event)
Handle button events.
 o init()
Applet initialization.
 o paint(Graphics)
Write a message to the applet area.
 o reshape(int, int, int, int)
reshape the applet and ourself
 o run()
Load the applet finally.

Constructors

 o appWrapper
  public appWrapper()

Methods

 o 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
 o run
  public void run()
Load the applet finally. When using a button this creates a new frame to put the applet in.
 o 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
 o getAppletInfo
  public String getAppletInfo()
Give information about the applet.
Overrides:
getAppletInfo in class Applet
 o getParameterInfo
  public String[][] getParameterInfo()
Give information about the appWrapper and the applet loaded.
Overrides:
getParameterInfo in class Applet
 o paint
  public void paint(Graphics g)
Write a message to the applet area.
Overrides:
paint in class Component
 o reshape
  public void reshape(int x,
                      int y,
                      int w,
                      int h)
reshape the applet and ourself
Overrides:
reshape in class Component
 o 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