HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.html
Class ImageElement

java.lang.Object
  extended by com.ibm.hats.transform.html.HTMLElement
      extended by com.ibm.hats.transform.html.ImageElement
Direct Known Subclasses:
LinkedImageElement

public class ImageElement
extends HTMLElement

ImageElement is the HTMLElement which represents an HTML inline image such as the following:

 <img src="http://www.tim.org/images/Jackin2.GIF" />
 
which appears as


Field Summary
static String CLASSNAME
           
 
Fields inherited from class com.ibm.hats.transform.html.HTMLElement
ATTR_ACCESS_KEY, ATTR_ACTION, ATTR_ALT, ATTR_CLASS_NAME, ATTR_DIR, ATTR_FOR, ATTR_HREF, ATTR_ID, ATTR_IMG_ALT, ATTR_MAX_LENGTH, ATTR_NAME, ATTR_ON_BLUR, ATTR_ON_CHANGE, ATTR_ON_CLICK, ATTR_ON_CUT, ATTR_ON_DROP, ATTR_ON_FOCUS, ATTR_ON_KEY_DOWN, ATTR_ON_KEY_PRESS, ATTR_ON_KEY_UP, ATTR_ON_MOUSEDOWN, ATTR_ON_MOUSEOVER, ATTR_ON_PASTE, ATTR_SIZE, ATTR_SRC, ATTR_STYLE, ATTR_TARGET, ATTR_TYPE, ATTR_VALUE, FLAG_CHECKED, FLAG_DISABLED, FLAG_MULTIPLE, FLAG_READ_ONLY, FLAG_SELECTED, tagName
 
Constructor Summary
ImageElement()
          Class constructor which creates sets the tag name to img.
 
Method Summary
 String getAlt()
          Gets the alternate text for the image to be displayed.
 String getOnClick()
          Returns the onClick attribute of this HTMLElement.
 String getOnMouseover()
          Gets the onMouseOver
 String getSrc()
          Gets the source URL for the image to be displayed.
 void renderEndTag(StringBuffer buffer)
          Does nothing.
 void setAlt(String alt)
          Sets the alternate text for the image to be displayed.
 void setOnClick(String action)
          Sets the onClick attribute of this HTMLElement.
 void setOnMouseover(String action)
          Sets the onMouseOver
 void setSrc(String src)
          Sets the source URL for the image to be displayed.
 
Methods inherited from class com.ibm.hats.transform.html.HTMLElement
addFlag, appendClassName, appendStyle, buildTag, buildTag, getAttribute, getClassName, getDir, getId, getName, getStyle, getTagName, hasFlag, removeFlag, render, render, render, render, renderEndTag, setAlign, setAttribute, setClassName, setDir, setId, setName, setStyle, setTagName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values
Constructor Detail

ImageElement

public ImageElement()
Class constructor which creates sets the tag name to img.

Method Detail

renderEndTag

public void renderEndTag(StringBuffer buffer)
Does nothing. This method is overridden because images do not require a closing tag.

Overrides:
renderEndTag in class HTMLElement

setSrc

public void setSrc(String src)
Sets the source URL for the image to be displayed.

Parameters:
src -

getSrc

public String getSrc()
Gets the source URL for the image to be displayed.

Returns:
String

setOnClick

public void setOnClick(String action)
Sets the onClick attribute of this HTMLElement.

Parameters:
action - the onClick

getOnClick

public String getOnClick()
Returns the onClick attribute of this HTMLElement.

Returns:
String

setOnMouseover

public void setOnMouseover(String action)
Sets the onMouseOver
Parameters:
action - the onMouseOver

getOnMouseover

public String getOnMouseover()
Gets the onMouseOver
Returns:
String

setAlt

public void setAlt(String alt)
Sets the alternate text for the image to be displayed.

Parameters:
alt -

getAlt

public String getAlt()
Gets the alternate text for the image to be displayed.

Returns:
String

HATS 7.5.1 (201005110649)