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 AccessibilityLabelElement

java.lang.Object
  extended by com.ibm.hats.transform.html.HTMLElement
      extended by com.ibm.hats.transform.html.AccessibilityLabelElement

public class AccessibilityLabelElement
extends HTMLElement

AccessibilityLabelElement is the HTMLElement which represents an accessibility label which can be used in the following way:

 <label for="user_input">User Name</label> <input type="text" id="user_input"/>
 
which appears as

See Also:
HTMLElementFactory

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
AccessibilityLabelElement()
          Class constructor which sets the tag name and sets this label to be invisible by default.
 
Method Summary
 String getContent()
          Gets the description of the targeted field
 String getTarget()
          Returns the ID of the targeted html element.
 boolean isRenderSurroundingDivInside()
          Determines whether or not this label is to be inside or outside the Div.
 boolean isVisible()
          Determines whether or not this label is set to be visible in regular web browsers.
 String render()
          Renders the opening tag and content.
 void render(StringBuffer buffer)
          Renders the opening tag and content.
 String renderEndTag()
          Renders closing tag
 void renderEndTag(StringBuffer buffer)
          Renders closing tag
 void setContent(String string)
          Sets the description for the targeted field
 void setRenderSurroundingDivInside(boolean b)
          Sets whether the label is hidden by surrounding it in a DIV tag or if the label is on the outside of the DIV which has its display style set to none
 void setTarget(String id)
          Sets the targeted html element
 void setVisible(boolean b)
          Sets the visibility of this label in a regular web browser.
 
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, 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
Constructor Detail

AccessibilityLabelElement

public AccessibilityLabelElement()
Class constructor which sets the tag name and sets this label to be invisible by default.

Method Detail

getTarget

public String getTarget()
Returns the ID of the targeted html element.

Returns:
The ID of the targeted html element

setTarget

public void setTarget(String id)
Sets the targeted html element

Parameters:
id - The ID of the element to target

getContent

public String getContent()
Gets the description of the targeted field

Returns:
The description of the targeted field

setContent

public void setContent(String string)
Sets the description for the targeted field

Parameters:
string - The description of the targeted field

isVisible

public boolean isVisible()
Determines whether or not this label is set to be visible in regular web browsers.

Returns:
boolean

setVisible

public void setVisible(boolean b)
Sets the visibility of this label in a regular web browser. The label is hidden by surrounding it in a DIV tag which has its display style set to none

Parameters:
b - visibility

isRenderSurroundingDivInside

public boolean isRenderSurroundingDivInside()
Determines whether or not this label is to be inside or outside the Div.

Returns:
true if label is to be inside a DIV, false otherwise.

setRenderSurroundingDivInside

public void setRenderSurroundingDivInside(boolean b)
Sets whether the label is hidden by surrounding it in a DIV tag or if the label is on the outside of the DIV which has its display style set to none

Parameters:
b - set to true if label is to be inside surrounding DIV

render

public void render(StringBuffer buffer)
Renders the opening tag and content. Closing tag is still necessary

Overrides:
render in class HTMLElement
Parameters:
buffer -
See Also:
HTMLElement.render(java.lang.StringBuffer)

render

public String render()
Renders the opening tag and content. Closing tag is still necessary

Overrides:
render in class HTMLElement
Returns:
String
See Also:
HTMLElement.render()

renderEndTag

public void renderEndTag(StringBuffer buffer)
Renders closing tag

Overrides:
renderEndTag in class HTMLElement
Parameters:
buffer -
See Also:
HTMLElement.renderEndTag(java.lang.StringBuffer)

renderEndTag

public String renderEndTag()
Renders closing tag

Overrides:
renderEndTag in class HTMLElement
Returns:
String
See Also:
HTMLElement.renderEndTag()

HATS 7.5.1 (201005110649)