com.gargoylesoftware.htmlunit.html
Class ClickableElement

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
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
FocusableElement, HtmlAddress, HtmlBlockQuote, HtmlBody, HtmlCaption, HtmlCenter, HtmlDefinitionDescription, HtmlDefinitionList, HtmlDefinitionTerm, HtmlDeletedText, HtmlDivision, HtmlFieldSet, HtmlForm, HtmlHeader1, HtmlHeader2, HtmlHeader3, HtmlHeader4, HtmlHeader5, HtmlHeader6, HtmlHorizontalRule, HtmlImage, HtmlInlineQuotation, HtmlInsertedText, HtmlLegend, HtmlLink, HtmlListItem, HtmlMap, HtmlMenu, HtmlNoFrames, HtmlNoScript, HtmlObject, HtmlOption, HtmlOptionGroup, HtmlOrderedList, HtmlParagraph, HtmlPreformattedText, HtmlSpan, HtmlTable, HtmlTableCell, HtmlTableColumn, HtmlTableColumnGroup, HtmlTableRow, HtmlTextDirection, HtmlUnorderedList, TableRowGroup, UnknownHtmlElement

public abstract class ClickableElement
extends StyledElement

Intermediate base class for "clickable" HTML elements. As defined HTML 4.01 documentation, this class is a base class for all HTML elements except these: applet, base, basefront, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, and title.

Version:
$Revision: 1.3 $
Author:
David K. Taylor, Mike Bowler, Jun Chen, Christian Sell, David D. Kilzer, 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
 
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
 Page click()
 Simulate clicking this element.
 Page click(boolean shiftKey, boolean ctrlKey, boolean altKey)
 Simulate clicking this element.
 Page dblClick()
 Simulate double clicking this element, note that click() is called first.
 Page dblClick(boolean shiftKey, boolean ctrlKey, boolean altKey)
 Simulate double clicking this element, note that click(boolean, boolean, boolean) is called first.
 java.lang.String getLangAttribute()
 Return the value of the attribute "lang".
 java.lang.String getOnClickAttribute()
 Return the value of the attribute "onclick".
 java.lang.String getOnDblClickAttribute()
 Return the value of the attribute "ondblclick".
 java.lang.String getOnKeyDownAttribute()
 Return the value of the attribute "onkeydown".
 java.lang.String getOnKeyPressAttribute()
 Return the value of the attribute "onkeypress".
 java.lang.String getOnKeyUpAttribute()
 Return the value of the attribute "onkeyup".
 java.lang.String getOnMouseDownAttribute()
 Return the value of the attribute "onmousedown".
 java.lang.String getOnMouseMoveAttribute()
 Return the value of the attribute "onmousemove".
 java.lang.String getOnMouseOutAttribute()
 Return the value of the attribute "onmouseout".
 java.lang.String getOnMouseOverAttribute()
 Return the value of the attribute "onmouseover".
 java.lang.String getOnMouseUpAttribute()
 Return the value of the attribute "onmouseup".
 java.lang.String getTextDirectionAttribute()
 Return the value of the attribute "dir".
 java.lang.String getXmlLangAttribute()
 Return the value of the attribute "xml:lang".
 
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
 

Method Detail

click

public Page click()
           throws java.io.IOException
Simulate clicking this element.

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

click

public Page click(boolean shiftKey,
                  boolean ctrlKey,
                  boolean altKey)
           throws java.io.IOException
Simulate clicking this element.

Parameters:
shiftKey - true if SHIFT is pressed
ctrlKey - true if CTRL is pressed
altKey - true if ALT is pressed
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

dblClick

public Page dblClick()
              throws java.io.IOException
Simulate double clicking this element, note that click() is called first.

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

dblClick

public Page dblClick(boolean shiftKey,
                     boolean ctrlKey,
                     boolean altKey)
              throws java.io.IOException
Simulate double clicking this element, note that click(boolean, boolean, boolean) is called first.

Parameters:
shiftKey - true if SHIFT is pressed
ctrlKey - true if CTRL is pressed
altKey - true if ALT is pressed
Returns:
The page that occupies this window after this element is double clicked. It may be the same window or it may be a freshly loaded one.
Throws:
java.io.IOException - If an IO error occurs

getLangAttribute

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

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

getOnClickAttribute

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

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

getOnDblClickAttribute

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

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

getOnKeyDownAttribute

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

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

getOnKeyPressAttribute

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

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

getOnKeyUpAttribute

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

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

getOnMouseDownAttribute

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

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

getOnMouseMoveAttribute

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

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

getOnMouseOutAttribute

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

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

getOnMouseOverAttribute

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

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

getOnMouseUpAttribute

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

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

getTextDirectionAttribute

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

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

getXmlLangAttribute

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

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


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