|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.html.DomNode
com.gargoylesoftware.htmlunit.html.DomNamespaceNode
com.gargoylesoftware.htmlunit.html.DomElement
com.gargoylesoftware.htmlunit.html.HtmlElement
com.gargoylesoftware.htmlunit.html.StyledElement
com.gargoylesoftware.htmlunit.html.ClickableElement
public abstract class ClickableElement
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement |
---|
HtmlElement.ChildElementsIterator, HtmlElement.MapEntryWrappingIterator |
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
DomNode.ChildIterator, DomNode.DescendantElementsIterator |
Field Summary |
---|
Fields inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement |
---|
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY, TAB_INDEX_OUT_OF_BOUNDS |
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
ATTRIBUTE_NODE, COMMENT_NODE, DOCUMENT_NODE, ELEMENT_NODE, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED, TEXT_NODE |
Constructor Summary | |
---|---|
protected |
ClickableElement(String namespaceURI,
String qualifiedName,
HtmlPage page,
Map attributes)
Create an instance |
Method Summary | |
---|---|
Page |
click()
Simulate clicking this element. |
Page |
click(boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Simulate clicking this element. |
Page |
click(com.gargoylesoftware.htmlunit.javascript.host.Event event)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. 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. |
protected Page |
doClickAction(Page defaultPage)
This method will be called if there either wasn't an onclick handler or there was but the result of that handler wasn't false . |
String |
getLangAttribute()
Return the value of the attribute "lang". |
String |
getOnClickAttribute()
Return the value of the attribute "onclick". |
String |
getOnDblClickAttribute()
Return the value of the attribute "ondblclick". |
String |
getOnKeyDownAttribute()
Return the value of the attribute "onkeydown". |
String |
getOnKeyPressAttribute()
Return the value of the attribute "onkeypress". |
String |
getOnKeyUpAttribute()
Return the value of the attribute "onkeyup". |
String |
getOnMouseDownAttribute()
Return the value of the attribute "onmousedown". |
String |
getOnMouseMoveAttribute()
Return the value of the attribute "onmousemove". |
String |
getOnMouseOutAttribute()
Return the value of the attribute "onmouseout". |
String |
getOnMouseOverAttribute()
Return the value of the attribute "onmouseover". |
String |
getOnMouseUpAttribute()
Return the value of the attribute "onmouseup". |
String |
getTextDirectionAttribute()
Return the value of the attribute "dir". |
String |
getXmlLangAttribute()
Return the value of the attribute "xml:lang". |
protected boolean |
isStateUpdateFirst()
Return true if the state update should be done before onclick event handling. |
Methods inherited from class com.gargoylesoftware.htmlunit.html.StyledElement |
---|
getClassAttribute, getIdAttribute, getStyleAttribute, getTitleAttribute, isRenderedVisible |
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode |
---|
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ClickableElement(String namespaceURI, String qualifiedName, HtmlPage page, Map attributes)
namespaceURI
- the URI that identifies an XML namespace.qualifiedName
- The qualified name of the element type to instantiatepage
- The page that contains this elementattributes
- the initial attributesMethod Detail |
---|
public Page click() throws IOException
IOException
- If an IO error occurspublic Page click(boolean shiftKey, boolean ctrlKey, boolean altKey) throws IOException
shiftKey
- true if SHIFT is pressedctrlKey
- true if CTRL is pressedaltKey
- true if ALT is pressed
IOException
- If an IO error occurspublic Page click(com.gargoylesoftware.htmlunit.javascript.host.Event event) throws IOException
event
- the click event used.
IOException
- If an IO error occurspublic Page dblClick() throws IOException
click()
is called first.
IOException
- If an IO error occurspublic Page dblClick(boolean shiftKey, boolean ctrlKey, boolean altKey) throws IOException
click(boolean, boolean, boolean)
is called first.
shiftKey
- true if SHIFT is pressedctrlKey
- true if CTRL is pressedaltKey
- true if ALT is pressed
IOException
- If an IO error occursprotected Page doClickAction(Page defaultPage) throws IOException
false
.
This is the default behavior of clicking the element.
The default implementation returns
the current page - subclasses requiring different behavior (like
HtmlSubmitInput
) will override this method.
defaultPage
- The default page to return if the action does not
load a new page.
IOException
- If an IO error occurredpublic final String getLangAttribute()
public final String getXmlLangAttribute()
public final String getTextDirectionAttribute()
public final String getOnClickAttribute()
public final String getOnDblClickAttribute()
public final String getOnMouseDownAttribute()
public final String getOnMouseUpAttribute()
public final String getOnMouseOverAttribute()
public final String getOnMouseMoveAttribute()
public final String getOnMouseOutAttribute()
public final String getOnKeyPressAttribute()
public final String getOnKeyDownAttribute()
public final String getOnKeyUpAttribute()
protected boolean isStateUpdateFirst()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |