public class HTMLApplet extends HTMLTagAttributes implements java.io.Serializable
This example creates a HTMLApplet tag:
// Create an HTMLApplet. HTMLApplet applet = new HTMLApplet("myApplet", "http://myCompany.com/dir/", 100, 100); // Create a parameter, then add it to the applet. HTMLParameter param = new HTMLParameter("parm1", "value1"); applet.addParameter(param); // Create and add second parameter HTMLParameter param2 = applet.addParameter("parm2", "value2"); System.out.println(applet);
Here is the output of the HTMLApplet tag:
<applet name="myApplet" codebase="http://server:port/dir" width="100" height="100"> <param name="parm1" value="value1"> <param name="parm2" value="value2"> If you see this text, the browser does not support the APPLET tag or the applet has failed to load. </applet>
HTMLApplet objects generate the following events:
Constructor and Description |
---|
HTMLApplet()
Constructs a default HTMLApplet object.
|
HTMLApplet(java.lang.String code)
Constructs an HTMLApplet object with the specified applet code.
|
HTMLApplet(java.lang.String code,
int width,
int height)
Constructs an HTMLApplet object with the specified Applet code, width, and height.
|
HTMLApplet(java.lang.String code,
java.lang.String codebase,
int width,
int height)
Constructs an HTMLApplet object with the specified Applet code, codebase, width, height.
|
HTMLApplet(java.lang.String archive,
java.lang.String code,
java.lang.String codebase,
int width,
int height)
Constructs an HTMLApplet object with the specified Applet code, codebase, width, and height.
|
Modifier and Type | Method and Description |
---|---|
void |
addElementListener(ElementListener listener)
Adds an addElementListener.
|
void |
addParameter(HTMLParameter param)
Adds a parameter to the applet tag.
|
HTMLParameter |
addParameter(java.lang.String name,
java.lang.String value)
Adds a HTMLParameter to the applet.
|
java.lang.String |
getArchive()
Returns the name of the archive(s).
|
java.lang.String |
getCode()
Returns the class name of the applet class.
|
java.lang.String |
getCodebase()
Returns the base URL of the applet.
|
java.lang.String |
getFOTag()
Returns a comment tag.
|
int |
getHeight()
Returns the height of the applet in pixels.
|
java.lang.String |
getTag()
Returns the tag for the HTML applet.
|
java.lang.String |
getText()
Returns the alternate text of the applet.
|
int |
getWidth()
Returns the width of the applet in pixels.
|
void |
removeElementListener(ElementListener listener)
Removes this ElementListener from the internal list.
|
void |
removeParameter(HTMLParameter param)
Removes a parameter from the applet tag.
|
void |
setArchive(java.lang.String archive)
Sets the name of one or more archives containing classes and other resources that will be "preloaded".
|
void |
setCode(java.lang.String code)
Sets the class name of the applet code.
|
void |
setCodebase(java.lang.String codebase)
Sets the base URL of the applet.
|
void |
setHeight(int height)
Set the height of the applet in pixels.
|
void |
setText(java.lang.String text)
Set the alternate text for the Applet, which will be displayed if
the browser does not support the APPLET tag or the applet fails to load.
|
void |
setWidth(int width)
Set the width of the applet in pixels.
|
java.lang.String |
toString()
Returns a String representation for the HTMLApplet tag.
|
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
public HTMLApplet()
public HTMLApplet(java.lang.String code)
code
- The applet name.public HTMLApplet(java.lang.String code, int width, int height)
code
- The applet name.width
- The applet width.height
- The applet height.public HTMLApplet(java.lang.String code, java.lang.String codebase, int width, int height)
code
- The applet name.codebase
- The base URL.width
- The applet width.height
- The applet height.public HTMLApplet(java.lang.String archive, java.lang.String code, java.lang.String codebase, int width, int height)
archive
- The archive namecode
- The applet name.codebase
- The base URL.width
- The applet width.height
- The applet height.public void addParameter(HTMLParameter param)
param
- The parameter.public HTMLParameter addParameter(java.lang.String name, java.lang.String value)
name
- The parameter name.value
- The parameter value.public void addElementListener(ElementListener listener)
listener
- The ElementListener.removeElementListener(com.ibm.as400.util.html.ElementListener)
public java.lang.String getArchive()
public java.lang.String getCode()
public java.lang.String getCodebase()
public int getHeight()
public java.lang.String getText()
public int getWidth()
public java.lang.String getFOTag()
getFOTag
in interface HTMLTagElement
public java.lang.String getTag()
getTag
in interface HTMLTagElement
public void removeParameter(HTMLParameter param)
param
- The parameter.public void removeElementListener(ElementListener listener)
listener
- The ElementListener.addElementListener(com.ibm.as400.util.html.ElementListener)
public void setCodebase(java.lang.String codebase)
codebase
- The base URL.public void setArchive(java.lang.String archive)
archive
- The applet archive(s).public void setCode(java.lang.String code)
code
- The applet name.public void setHeight(int height)
height
- The height.public void setText(java.lang.String text)
text
- The alternate text.public void setWidth(int width)
width
- The width.public java.lang.String toString()
toString
in class java.lang.Object