com.ge.research.html
Class AppletTag

java.lang.Object
  extended bycom.ge.research.html.HTMLTag
      extended bycom.ge.research.html.AppletTag

public class AppletTag
extends HTMLTag

Encapsulates all the attributes of an HTML "APPLET" element, its accessors, validations, and default values.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:34 $
Author:
garbiras
Created on:
Sep 9, 2002

Field Summary
 
Fields inherited from class com.ge.research.html.HTMLTag
HORIZONTAL_LINE, LINEBREAK, reconstructTag, tag, WHITESPACE
 
Constructor Summary
AppletTag()
          Default constructor.
 
Method Summary
 void addParam(java.lang.String key, java.lang.String value)
          Adds a new param element to the applet tag.
 boolean containsParam(java.lang.String key)
          Determines if there is currently a parameter element with "NAME=key" in the current set of parameters of this tag.
 java.lang.String getArchive()
          Returns the value of the HTML Tag archive attribute.
 java.lang.String getCode()
          Returns the value of the HTML Tag code attribute.
 java.lang.String getCodebase()
          Returns the value of the HTML Tag codebase attribute.
 int getHeight()
          Returns the value of the HTML Tag height attribute.
 java.util.HashMap getParams()
          Returns a copy of the internal mapping of parameter names to their values.
 java.lang.String getParamValue(java.lang.String key)
          Returns the VALUE attribute for the ParamTag element with "NAME=key"
 int getWidth()
          Returns the value of the HTML Tag width attribute.
 boolean removeParam(java.lang.String key)
          Removes the specified parameter element from the applet tag Sets the value of the HTMLTag.reconstructTag to true
 void removeParams()
          Removes all parameter elements from the applet tag Sets the value of the HTMLTag.reconstructTag to true
protected  void resetTagSpecificInformation()
          Resets the tag attributes and content of the HTML Tag to their default values.
 void setArchive(java.lang.String attribute)
          Sets the HTML Tag archive attribute.
 void setCode(java.lang.String attribute)
          Sets the HTML Tag code attribute.
 void setCodebase(java.lang.String attribute)
          Sets the HTML Tag codebase attribute.
 void setHeight(int attribute)
          Sets the HTML Tag height attribute.
 void setHeight(java.lang.String attribute)
          Sets the HTML Tag height attribute.
 void setWidth(int attribute)
          Sets the HTML Tag width attribute.
 void setWidth(java.lang.String attribute)
          Sets the HTML Tag width attribute.
protected  void writeTagSpecificAttributes()
          Adds the tag specific attribute information to the HTML Tag.
protected  void writeTagSpecificData()
          Iterates through the set of parameters and constructs the ParamTag element tags for them, and adds them to the applet tag.
 
Methods inherited from class com.ge.research.html.HTMLTag
addAttribute, addAttribute, getId, getOnClick, getOnContextMenu, getOnDblClick, getOnDrag, getOnDragEnd, getOnDragStart, getOnFocus, getOnFocusOut, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnMoveEnd, getOnMoveStart, getStyle, getStyleClass, getTitle, removeAttribute, reset, setId, setOnClick, setOnContextMenu, setOnDblClick, setOnDrag, setOnDragEnd, setOnDragStart, setOnFocus, setOnFocusOut, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnMoveEnd, setOnMoveStart, setStyle, setStyleClass, setTitle, toString, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppletTag

public AppletTag()
Default constructor. Calls super(TagPropertyConstants.APPLET_TAG).

See Also:
TagPropertyConstants.APPLET_TAG
Method Detail

addParam

public void addParam(java.lang.String key,
                     java.lang.String value)
Adds a new param element to the applet tag. The name / value pair of the param element is specified by the method parameters. Param elements are identified by the "name" attribute (specified by the key parameter). Duplicate param elements are overwritten.

Parameters:
key - the parameter NAME attribute
value - the parameter VALUE attribute

containsParam

public boolean containsParam(java.lang.String key)
Determines if there is currently a parameter element with "NAME=key" in the current set of parameters of this tag.

Parameters:
key - the PARAM_TAG element to try to find within the list of applet parameters
Returns:
true if a parameter with "NAME=key" is found; false if no such parameter is found

getArchive

public java.lang.String getArchive()
Returns the value of the HTML Tag archive attribute.

Returns:
The current value of the HTML Tag archive attribute

getCode

public java.lang.String getCode()
Returns the value of the HTML Tag code attribute.

Returns:
The current value of the HTML Tag code attribute

getCodebase

public java.lang.String getCodebase()
Returns the value of the HTML Tag codebase attribute.

Returns:
The current value of the HTML Tag codebase attribute

getHeight

public int getHeight()
Returns the value of the HTML Tag height attribute.

Returns:
The current value of the HTML Tag height attribute

getParams

public java.util.HashMap getParams()
Returns a copy of the internal mapping of parameter names to their values.

Returns:
A copy of the internal mapping of parameter names to their values

getParamValue

public java.lang.String getParamValue(java.lang.String key)
Returns the VALUE attribute for the ParamTag element with "NAME=key"

Parameters:
key - the parameter NAME attribute value to compare against each of the parameter elements of the tag
Returns:
String the value attribute of the parameter element with "NAME=key". If no parameter element is found, null is returned.

getWidth

public int getWidth()
Returns the value of the HTML Tag width attribute.

Returns:
The current value of the HTML Tag width attribute

removeParam

public boolean removeParam(java.lang.String key)
Removes the specified parameter element from the applet tag Sets the value of the HTMLTag.reconstructTag to true

Parameters:
key - the parameter element to remove, identified by it's NAME attribute
Returns:
true if the remove was successful; false otherwise
See Also:
HTMLTag.reconstructTag

removeParams

public void removeParams()
Removes all parameter elements from the applet tag Sets the value of the HTMLTag.reconstructTag to true

See Also:
HTMLTag.reconstructTag

setArchive

public void setArchive(java.lang.String attribute)
Sets the HTML Tag archive attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag archive attribute
See Also:
HTMLTag.reconstructTag

setCode

public void setCode(java.lang.String attribute)
Sets the HTML Tag code attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag code attribute
See Also:
HTMLTag.reconstructTag

setCodebase

public void setCodebase(java.lang.String attribute)
Sets the HTML Tag codebase attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag codebase attribute
See Also:
HTMLTag.reconstructTag

setHeight

public void setHeight(int attribute)
Sets the HTML Tag height attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag height attribute
See Also:
HTMLTag.reconstructTag

setHeight

public void setHeight(java.lang.String attribute)
               throws java.lang.NumberFormatException
Sets the HTML Tag height attribute. Trys to convert the String to an int and call the setHeight(int) method.

Parameters:
attribute - the new value for the HTML Tag height attribute
Throws:
java.lang.NumberFormatException - If _height cannot be converted to an int
See Also:
Integer.parseInt(java.lang.String), setHeight(int)

setWidth

public void setWidth(int attribute)
Sets the HTML Tag width attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag width attribute
See Also:
HTMLTag.reconstructTag

setWidth

public void setWidth(java.lang.String attribute)
              throws java.lang.NumberFormatException
Sets the HTML Tag width attribute. Trys to convert the String to an int and call the setWidth(int) method.

Parameters:
attribute - the new value for the HTML Tag width attribute
Throws:
java.lang.NumberFormatException - If _width cannot be converted to an int
See Also:
Integer.parseInt(java.lang.String), setWidth(int)

resetTagSpecificInformation

protected void resetTagSpecificInformation()
Description copied from class: HTMLTag
Resets the tag attributes and content of the HTML Tag to their default values. Called by HTMLTag.reset(). This method is not implemented in HTMLTag. Subclasses that contain tag content information should implement this method to set their information to their default values.

Overrides:
resetTagSpecificInformation in class HTMLTag
See Also:
HTMLTag.reset()

writeTagSpecificAttributes

protected void writeTagSpecificAttributes()
Description copied from class: HTMLTag
Adds the tag specific attribute information to the HTML Tag. Called by HTMLTag.toString(). This method is not implemented in HTMLTag. Subclasses that contain additional attribute information should implement this method to write those attributes in the inline tag.

Overrides:
writeTagSpecificAttributes in class HTMLTag
See Also:
HTMLTag.toString()

writeTagSpecificData

protected void writeTagSpecificData()
Iterates through the set of parameters and constructs the ParamTag element tags for them, and adds them to the applet tag.

Overrides:
writeTagSpecificData in class HTMLTag
See Also:
ParamTag.ParamTag(java.lang.String, java.lang.String)