com.gargoylesoftware.htmlunit.html
Class HtmlLabel

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.DomNode
      extended by com.gargoylesoftware.htmlunit.html.DomNamespaceNode
          extended by com.gargoylesoftware.htmlunit.html.HtmlElement
              extended by com.gargoylesoftware.htmlunit.html.StyledElement
                  extended by com.gargoylesoftware.htmlunit.html.ClickableElement
                      extended by com.gargoylesoftware.htmlunit.html.FocusableElement
                          extended by com.gargoylesoftware.htmlunit.html.HtmlLabel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class HtmlLabel
extends FocusableElement

Wrapper for the html element "label".

Version:
$Revision: 1.3 $
Author:
Mike Bowler, David K. Taylor, Christian Sell, Marc Guillemot, Ahmed Ashour
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
HtmlElement.MapEntryWrappingIterator
 
Field Summary
static java.lang.String TAG_NAME
 the HTML tag represented by this element
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
 
Method Summary
 void blur()
 Remove focus from this element.
 Page click()
 Clicks the label and propagates to the referenced element.
 void focus()
 Set the focus to this element.
 java.lang.String getAccessKeyAttribute()
 Return the value of the attribute "accesskey".
 java.lang.String getForAttribute()
 Return the value of the attribute "for".
 java.lang.String getOnBlurAttribute()
 Return the value of the attribute "onblur".
 java.lang.String getOnFocusAttribute()
 Return the value of the attribute "onfocus".
 FocusableElement getReferencedElement()
 Gets the element referenced by this label.
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.ClickableElement
click, dblClick, dblClick, getLangAttribute, getOnClickAttribute, getOnDblClickAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getTextDirectionAttribute, getXmlLangAttribute
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.StyledElement
getClassAttribute, getIdAttribute, getStyleAttribute, getTitleAttribute
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
addHtmlAttributeChangeListener, appendChildIfNoneExists, cloneDomNode, fireEvent, fireEvent, getAttributeEntriesIterator, getAttributeValue, getChildElementsIterator, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getEventHandler, getHtmlElementById, getHtmlElementsByAttribute, getHtmlElementsByTagName, getHtmlElementsByTagNames, getId, getNodeName, getNodeType, getOneHtmlElementByAttribute, getTagName, hasHtmlElementWithId, isAttributeDefined, keyDown, keyDown, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, removeAttribute, removeChild, removeEventHandler, removeHtmlAttributeChangeListener, rightClick, rightClick, setAttributeValue, setEventHandler, setEventHandler, setId, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode
addDomChangeListener, appendDomChild, asText, asXml, getAllHtmlChildElements, getByXPath, getChildIterator, getEndColumnNumber, getEndLineNumber, getFirstDomChild, getLastDomChild, getNextDomSibling, getNodeValue, getPage, getParentDomNode, getPreviousDomSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, insertBefore, remove, removeAllChildren, removeDomChangeListener, replace, setNodeValue, setReadyState, setScriptObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
the HTML tag represented by this element

See Also:
Constant Field Values
Method Detail

blur

public void blur()
Remove focus from this element.

Overrides:
blur in class FocusableElement

click

public Page click()
           throws java.io.IOException
Clicks the label and propagates to the referenced element. Simulate clicking this element.

Overrides:
click in class ClickableElement
Returns:
The page that occupies this window after this element is clicked. It may be the same window or it may be a freshly loaded one.
Throws:
java.io.IOException - If an IO error occurs

focus

public void focus()
Set the focus to this element.

Overrides:
focus in class FocusableElement

getAccessKeyAttribute

public final java.lang.String getAccessKeyAttribute()
Return the value of the attribute "accesskey". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "accesskey" or an empty string if that attribute isn't defined.

getForAttribute

public final java.lang.String getForAttribute()
Return the value of the attribute "for". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "for" or an empty string if that attribute isn't defined.

getOnBlurAttribute

public final java.lang.String getOnBlurAttribute()
Return the value of the attribute "onblur". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "onblur" or an empty string if that attribute isn't defined.

getOnFocusAttribute

public final java.lang.String getOnFocusAttribute()
Return the value of the attribute "onfocus". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "onfocus" or an empty string if that attribute isn't defined.

getReferencedElement

public FocusableElement getReferencedElement()
Gets the element referenced by this label. That is the element in the page which id is equal to the value of the for attribute of this label.

Returns:
the element, null if not found


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.