javatools.applet
Class AppletHtml

java.lang.Object
  |
  +--javatools.applet.AppletHtml

public class AppletHtml
extends java.lang.Object

Generating HTML to launch an applet that is compatible with IE and Netscape of various versions is an enormous mess. See http://java.sun.com/products/plugin/1.3/docs/tags.html for all the gory details. This class generates HTML according to the spec that is, according to the Sun standard, compatible across browser versions.


Field Summary
(package private)  java.lang.String archive
           
(package private)  java.util.Map args
           
(package private)  java.lang.String codeBase
           
(package private)  java.lang.String height
           
(package private)  java.lang.String javaClass
           
(package private)  java.lang.String pluginUrl
           
(package private)  java.lang.String pluginWinUrl
           
(package private)  java.lang.String width
           
 
Constructor Summary
AppletHtml()
           
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
          Add a parameter to pass to the applet
 java.lang.String getBody()
          Get the body HTML.
static java.lang.String getHeader()
          Get the header HTML.
 void setArchive(java.lang.String archive)
           
 void setCodeBase(java.lang.String codeBase)
           
 void setHeight(int height)
           
 void setJavaClass(java.lang.String javaClass)
           
 void setWidth(int width)
           
 java.lang.String toString()
          The header + body.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width

java.lang.String width

height

java.lang.String height

archive

java.lang.String archive

pluginWinUrl

java.lang.String pluginWinUrl

pluginUrl

java.lang.String pluginUrl

javaClass

java.lang.String javaClass

codeBase

java.lang.String codeBase

args

java.util.Map args
Constructor Detail

AppletHtml

public AppletHtml()
Method Detail

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)
Add a parameter to pass to the applet


setWidth

public void setWidth(int width)

setHeight

public void setHeight(int height)

setJavaClass

public void setJavaClass(java.lang.String javaClass)

setCodeBase

public void setCodeBase(java.lang.String codeBase)

setArchive

public void setArchive(java.lang.String archive)

getHeader

public static java.lang.String getHeader()
Get the header HTML. If you have multiple applets, you only need include this once.


getBody

public java.lang.String getBody()
Get the body HTML. Include this for each applet.


toString

public java.lang.String toString()
The header + body.

Overrides:
toString in class java.lang.Object