TOC PREV NEXT INDEX




Applet Pilot


The applet pilot is used for rendering applets. It also supports Java Plugin tags and versioning. For more information on applets, see Applet Example and Deploying as a Java Applet.

MIME Types

The applet pilot supports the following MIME types:

JAR Files

To support applets, you must include ib6extra.jar on your classpath.

System Properties

You can use the system property ice.pilots.applet.loadAllApplets to load all applet classes, regardless of specified versions in the Object tag. For more information, see System Properties.

Property Change Events

The applet pilot fires the statusLine event at various points in the applet life cycle. The property is available as the symbolic constant PropertyConstants.STATUS_LINE.

The notifications are as follows, in order of normal occurrence:

Event
Description
"Applet <applet name> Loading Completed"
The classes comprising the applet have been loaded. The applet can now be initialized.
"Init: applet <applet name> initialized"
The AppletViewer has initialized (called the init method on) the applet. The applet can now be started.
"Init: <applet name> not loaded."
This error message indicates that the AppletViewer attempted to initialize the applet when the applet classes had not been loaded.
"Start: Applet <applet name> started."
The AppletViewer has started (called the start method on) the applet, and the applet is now visible.
"Start: applet <applet name> not initialized."
An error condition occurred where the AppletViewer attempted to process the start event for an applet that has not been initialized.
"Stop: applet <applet name> stopped."
The AppletViewer has stopped (called the stop method on) the applet. This occurs when the user navigates away from the page containing the applet.
"Stop: applet <applet name> not running."
An error condition has occurred where the AppletViewer has attempted to process the stop event for an applet that has not been started.
"Destroy: Applet <applet name> destroyed."
The AppletViewer has destroyed the applet. This consists of setting the Applet components invisible and calling the destroy method on the Applet. This occurs when the user navigates away from the page containing the applet.
"Destroy: <applet name> not stopped."
An error condition has occurred where the AppletViewer has attempted to process the destroy event for an applet that has not stopped.
"Dispose: Applet <applet name> disposed."
The AppletViewer has disposed of the applet.
"Dispose: <applet name> not destroyed."
An error condition has occurred where the AppletViewer has attempted to process the dispose event for an applet that is not destroyed.
 
Other error events include the following:
load: loading thread interrupted. Applet: <apname>
The class loading thread was interrupted. Typically this is as a result of a user action, such as pressing the stop button while loading the applet.
load: error loading <applet name> + "error message"
An exception of subclass Exception has been thrown by the class loading mechanism while attempting to load the applet classes. The error message from the exception will be shown.
load: Applet <applet name> Thread killed"
The thread loading the applet class was stopped.
load: Applet <applet name> + "Error message"
An exception or error of subclass Throwable has been occurred. The error message from the exception will be shown.

Accessing An Applet

Your application can access applets after loading the document using the following procedure:

Document d = pilot.getDocument();

HTMLCollection c = d.getApplets();

for(int i=0;i<c.getLength();i++) {

    DAppletElement e=(DAppletElement)c.item(i);

    Applet a = (Applet)e.getActualObject();

    ... use applet a ...}
 


Copyright 2005. ICEsoft Technologies, Inc.
http://www.icesoft.com

TOC PREV NEXT INDEX