public abstract class ClickableElement extends StyledElement
HtmlElement.ChildElementsIterator, HtmlElement.MapEntryWrappingIterator
DomNode.ChildIterator, DomNode.DescendantElementsIterator
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY, TAB_INDEX_OUT_OF_BOUNDS
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
Modifier | Constructor and Description |
---|---|
protected |
ClickableElement(String namespaceURI,
String qualifiedName,
HtmlPage page,
Map attributes)
Create an instance
|
Modifier and Type | Method and Description |
---|---|
Page |
click()
Simulate clicking this element.
|
Page |
click(boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Simulate clicking this element.
|
Page |
click(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.
|
getClassAttribute, getIdAttribute, getStyleAttribute, getTitleAttribute, isRenderedVisible
addHtmlAttributeChangeListener, appendChildIfNoneExists, assertNotEmpty, blur, cloneDomNode, cloneNode, fireEvent, fireEvent, fireHtmlAttributeAdded, fireHtmlAttributeRemoved, fireHtmlAttributeReplaced, focus, getAttribute, getAttributeEntriesIterator, getAttributeNS, getAttributeValue, getChildElementsIterator, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getEventHandler, getHtmlElementById, getHtmlElementsByAttribute, getHtmlElementsByTagName, getHtmlElementsByTagNames, getId, getNodeName, getNodeType, getOneHtmlElementByAttribute, getTabIndex, getTagName, hasAttribute, hasAttributeNS, hasAttributes, hasHtmlElementWithId, isAttributeDefined, isEmptyXmlTagExpanded, isSubmittableByEnter, keyDown, keyDown, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, notImplemented, preventDefault, printOpeningTagContentAsXml, printXml, removeAttribute, removeAttributeNS, removeChild, removeEventHandler, removeHtmlAttributeChangeListener, rightClick, rightClick, setAttribute, setAttributeNS, setAttributeValue, setAttributeValue, setEventHandler, setEventHandler, setId, toString, type, type, type, type
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix
addDomChangeListener, addPropertyChangeListener, appendChild, appendDomChild, asText, asXml, fireNodeAdded, fireNodeDeleted, firePropertyChange, getAllHtmlChildElements, getByXPath, getChildIterator, getChildrenAsText, getEndColumnNumber, getEndLineNumber, getFirstByXPath, getFirstChild, getFirstDomChild, getLastChild, getLastDomChild, getLog, getNativePage, getNextDomSibling, getNextSibling, getNodeValue, getPage, getParentDomNode, getParentNode, getPreviousDomSibling, getPreviousSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, insertBefore, isAncestorOf, isTrimmedText, notifyIncorrectness, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, reduceWhitespace, remove, removeAllChildren, removeDomChangeListener, removePropertyChangeListener, replace, setNextSibling, setNodeValue, setParentNode, setPreviousSibling, setReadyState, setScriptObject
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 attributespublic 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 pressedIOException
- If an IO error occurspublic Page click(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 pressedIOException
- 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()
Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.