|
||||||||||
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
public abstract class HtmlElement
An abstract wrapper for HTML elements.
Nested Class Summary | |
---|---|
protected class |
HtmlElement.ChildElementsIterator
An iterator over the HtmlElement children. |
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
DomNode.ChildIterator, DomNode.DescendantElementsIterator |
Field Summary | |
---|---|
static java.lang.Short |
TAB_INDEX_OUT_OF_BOUNDS
Constant indicating that a tab index value is out of bounds (less than 0 or greater than 32767). |
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomElement |
---|
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY |
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
AS_TEXT_BLANK, AS_TEXT_BLOCK_SEPARATOR, AS_TEXT_NEW_LINE, AS_TEXT_TAB, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED |
Fields inherited from interface org.w3c.dom.Node |
---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
---|---|
protected |
HtmlElement(java.lang.String namespaceURI,
java.lang.String qualifiedName,
SgmlPage page,
java.util.Map<java.lang.String,DomAttr> attributes)
Creates an instance. |
Method Summary | ||
---|---|---|
void |
addHtmlAttributeChangeListener(HtmlAttributeChangeListener listener)
Adds an HtmlAttributeChangeListener to the listener list. |
|
HtmlElement |
appendChildIfNoneExists(java.lang.String tagName)
Appends a child element to this HTML element with the specified tag name if this HTML element does not already have a child with that tag name. |
|
void |
blur()
Removes focus from this element. |
|
protected void |
checkChildHierarchy(org.w3c.dom.Node childNode)
Check for insertion errors for a new child node. |
|
|
click()
Simulates clicking on this element, returning the page in the window that has the focus after the element has been clicked. |
|
|
click(boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Simulates clicking on this element, returning the page in the window that has the focus after the element has been clicked. |
|
|
click(com.gargoylesoftware.htmlunit.javascript.host.Event event)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Simulates clicking on this element, returning the page in the window that has the focus after the element has been clicked. |
|
|
dblClick()
Simulates double-clicking on this element, returning the page in the window that has the focus after the element has been clicked. |
|
|
dblClick(boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Simulates double-clicking on this element, returning the page in the window that has the focus after the element has been clicked. |
|
protected Page |
doClickAction(Page defaultPage)
This method will be called if there either wasn't an onclick handler, or if there was one, but the result of that handler wasn't false. |
|
protected void |
doType(char c,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Performs the effective type action, called after the keyPress event and before the keyUp event. |
|
ScriptResult |
fireEvent(com.gargoylesoftware.htmlunit.javascript.host.Event event)
Fires the event on the element. |
|
ScriptResult |
fireEvent(java.lang.String eventType)
Shortcut for fireEvent(Event) . |
|
protected void |
fireHtmlAttributeAdded(HtmlAttributeChangeEvent event)
Support for reporting HTML attribute changes. |
|
protected void |
fireHtmlAttributeRemoved(HtmlAttributeChangeEvent event)
Support for reporting HTML attribute changes. |
|
protected void |
fireHtmlAttributeReplaced(HtmlAttributeChangeEvent event)
Support for reporting HTML attribute changes. |
|
void |
focus()
Sets the focus on this element. |
|
java.lang.Iterable<HtmlElement> |
getChildElements()
|
|
|
getElementById(java.lang.String id)
Returns the element in this element's page with the specified ID. |
|
|
getElementsByAttribute(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String attributeValue)
Returns all elements which are descendants of this element and match the specified search criteria. |
|
HtmlElement |
getEnclosingElement(java.lang.String tagName)
Returns the first element with the specified tag name that is an ancestor to this element, or null if no such element is found. |
|
HtmlForm |
getEnclosingForm()
Returns the form which contains this element, or null if this element is not inside of a form. |
|
HtmlForm |
getEnclosingFormOrDie()
Returns the form which contains this element. |
|
net.sourceforge.htmlunit.corejs.javascript.Function |
getEventHandler(java.lang.String eventName)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Return a Function to be executed when a given event occurs. |
|
|
getHtmlElementsByTagName(java.lang.String tagName)
Returns the HTML elements that are descendants of this element and that have the specified tag name. |
|
java.util.List<HtmlElement> |
getHtmlElementsByTagNames(java.util.List<java.lang.String> tagNames)
Returns the HTML elements that are descendants of this element and that have one of the specified tag names. |
|
java.lang.String |
getId()
|
|
java.lang.String |
getLangAttribute()
Returns the value of the attribute "lang". |
|
java.lang.String |
getNodeName()
Returns this node's node name. |
|
java.lang.String |
getOnClickAttribute()
Returns the value of the attribute "onclick". |
|
java.lang.String |
getOnDblClickAttribute()
Returns the value of the attribute "ondblclick". |
|
|
getOneHtmlElementByAttribute(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String attributeValue)
Searches for an element based on the specified criteria, returning the first element which matches said criteria. |
|
java.lang.String |
getOnKeyDownAttribute()
Returns the value of the attribute "onkeydown". |
|
java.lang.String |
getOnKeyPressAttribute()
Returns the value of the attribute "onkeypress". |
|
java.lang.String |
getOnKeyUpAttribute()
Returns the value of the attribute "onkeyup". |
|
java.lang.String |
getOnMouseDownAttribute()
Returns the value of the attribute "onmousedown". |
|
java.lang.String |
getOnMouseMoveAttribute()
Returns the value of the attribute "onmousemove". |
|
java.lang.String |
getOnMouseOutAttribute()
Returns the value of the attribute "onmouseout". |
|
java.lang.String |
getOnMouseOverAttribute()
Returns the value of the attribute "onmouseover". |
|
java.lang.String |
getOnMouseUpAttribute()
Returns the value of the attribute "onmouseup". |
|
java.lang.Short |
getTabIndex()
Returns this element's tab index, if it has one. |
|
java.lang.String |
getTextDirectionAttribute()
Returns the value of the attribute "dir". |
|
java.lang.String |
getXmlLangAttribute()
Returns the value of the attribute "xml:lang". |
|
boolean |
hasHtmlElementWithId(java.lang.String id)
Returns true if there is an element in this element's page with the specified ID. |
|
protected boolean |
isAttributeCaseSensitive()
Indicates if the attribute names are case sensitive. |
|
protected boolean |
isStateUpdateFirst()
Returns true if state updates should be done before onclick event handling. |
|
protected boolean |
isSubmittableByEnter()
Returns true if clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any). |
|
Page |
mouseDown()
Simulates clicking the mouse on this element, returning the page which this element's window contains after the mouse click. |
|
Page |
mouseDown(boolean shiftKey,
boolean ctrlKey,
boolean altKey,
int button)
Simulates clicking the mouse on this element, returning the page which this element's window contains after the mouse click. |
|
Page |
mouseMove()
Simulates moving the mouse over this element, returning the page which this element's window contains after the mouse move. |
|
Page |
mouseMove(boolean shiftKey,
boolean ctrlKey,
boolean altKey,
int button)
Simulates moving the mouse over this element, returning the page which this element's window contains after the mouse move. |
|
Page |
mouseOut()
Simulates moving the mouse out of this element, returning the page which this element's window contains after the mouse move. |
|
Page |
mouseOut(boolean shiftKey,
boolean ctrlKey,
boolean altKey,
int button)
Simulates moving the mouse out of this element, returning the page which this element's window contains after the mouse move. |
|
Page |
mouseOver()
Simulates moving the mouse over this element, returning the page which this element's window contains after the mouse move. |
|
Page |
mouseOver(boolean shiftKey,
boolean ctrlKey,
boolean altKey,
int button)
Simulates moving the mouse over this element, returning the page which this element's window contains after the mouse move. |
|
Page |
mouseUp()
Simulates releasing the mouse click on this element, returning the page which this element's window contains after the mouse click release. |
|
Page |
mouseUp(boolean shiftKey,
boolean ctrlKey,
boolean altKey,
int button)
Simulates releasing the mouse click on this element, returning the page which this element's window contains after the mouse click release. |
|
protected void |
preventDefault()
This method is called if the current fired event is canceled by preventDefault() in FireFox, or by returning false in Internet Explorer. |
|
void |
removeAttribute(java.lang.String attributeName)
Removes an attribute specified by name from this element. |
|
void |
removeChild(java.lang.String tagName,
int i)
Removes the ith child element with the specified tag name from all relationships, if possible. |
|
void |
removeEventHandler(java.lang.String eventName)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Removes the specified event handler. |
|
void |
removeHtmlAttributeChangeListener(HtmlAttributeChangeListener listener)
Removes an HtmlAttributeChangeListener from the listener list. |
|
Page |
rightClick()
Simulates right clicking the mouse on this element, returning the page which this element's window contains after the mouse click. |
|
Page |
rightClick(boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Simulates right clicking the mouse on this element, returning the page which this element's window contains after the mouse click. |
|
void |
setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String attributeValue)
Sets the value of the specified attribute. |
|
void |
setEventHandler(java.lang.String eventName,
net.sourceforge.htmlunit.corejs.javascript.Function eventHandler)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Register a Function as an event handler. |
|
void |
setEventHandler(java.lang.String eventName,
java.lang.String jsSnippet)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Register a snippet of JavaScript code as an event handler. |
|
void |
setId(java.lang.String newId)
Sets the identifier this element. |
|
java.lang.String |
toString()
Returns a string representation of this object. |
|
Page |
type(char c)
Simulates typing the specified character while this element has focus, returning the page contained by this element's window after typing. |
|
Page |
type(char c,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Simulates typing the specified character while this element has focus, returning the page contained by this element's window after typing. |
|
void |
type(java.lang.String text)
Simulates typing the specified text while this element has focus. |
|
void |
type(java.lang.String text,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Simulates typing the specified text while this element has focus. |
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomElement |
---|
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributesMap, getElementsByTagName, getElementsByTagNameNS, getNodeType, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasAttributes, isEmptyXmlTagExpanded, namespaces, printOpeningTagContentAsXml, printXml, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
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 |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Field Detail |
---|
public static final java.lang.Short TAB_INDEX_OUT_OF_BOUNDS
getTabIndex()
Constructor Detail |
---|
protected HtmlElement(java.lang.String namespaceURI, java.lang.String qualifiedName, SgmlPage page, java.util.Map<java.lang.String,DomAttr> attributes)
namespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiatepage
- the page that contains this elementattributes
- a map ready initialized with the attributes for this element, or
null
. The map will be stored as is, not copied.Method Detail |
---|
public void setAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String attributeValue)
setAttributeNS
in interface org.w3c.dom.Element
setAttributeNS
in class DomElement
namespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the attributeattributeValue
- the value of the attributepublic final java.util.List<HtmlElement> getHtmlElementsByTagNames(java.util.List<java.lang.String> tagNames)
tagNames
- the tag names to match (case-insensitive)
public final <E extends HtmlElement> java.util.List<E> getHtmlElementsByTagName(java.lang.String tagName)
E
- the sub-element typetagName
- the tag name to match (case-insensitive)
public final void removeAttribute(java.lang.String attributeName)
removeAttribute
in interface org.w3c.dom.Element
removeAttribute
in class DomElement
attributeName
- the attribute attributeNameprotected void fireHtmlAttributeAdded(HtmlAttributeChangeEvent event)
HtmlAttributeChangeEvent
to any
registered HtmlAttributeChangeListener
s.
Note that this method recursively calls this element's parent's
fireHtmlAttributeAdded(HtmlAttributeChangeEvent)
method.
event
- the eventaddHtmlAttributeChangeListener(HtmlAttributeChangeListener)
protected void fireHtmlAttributeReplaced(HtmlAttributeChangeEvent event)
HtmlAttributeChangeEvent
to any
registered HtmlAttributeChangeListener
s.
Note that this method recursively calls this element's parent's
fireHtmlAttributeReplaced(HtmlAttributeChangeEvent)
method.
event
- the eventaddHtmlAttributeChangeListener(HtmlAttributeChangeListener)
protected void fireHtmlAttributeRemoved(HtmlAttributeChangeEvent event)
HtmlAttributeChangeEvent
to any
registered HtmlAttributeChangeListener
s.
Note that this method recursively calls this element's parent's
fireHtmlAttributeRemoved(HtmlAttributeChangeEvent)
method.
event
- the eventaddHtmlAttributeChangeListener(HtmlAttributeChangeListener)
public java.lang.String getNodeName()
DomElement
getNodeName
in interface org.w3c.dom.Node
getNodeName
in class DomElement
DomElement.getTagName()
public final java.lang.String getId()
public final void setId(java.lang.String newId)
newId
- the new identifier of this elementpublic java.lang.Short getTabIndex()
TAB_INDEX_OUT_OF_BOUNDS
. If this element does not have
a tab index, or its tab index is otherwise invalid, this method returns null.
public HtmlElement getEnclosingElement(java.lang.String tagName)
tagName
- the name of the tag searched (case insensitive)
public HtmlForm getEnclosingForm()
public HtmlForm getEnclosingFormOrDie() throws java.lang.IllegalStateException
IllegalStateException
.
java.lang.IllegalStateException
- if the element is not inside a formpublic void type(java.lang.String text) throws java.io.IOException
text
- the text you with to simulate typing
java.io.IOException
- If an IO error occurspublic void type(java.lang.String text, boolean shiftKey, boolean ctrlKey, boolean altKey) throws java.io.IOException
text
- the text you with to simulate typingshiftKey
- true if SHIFT is pressedctrlKey
- true if CTRL is pressedaltKey
- true if ALT is pressed
java.io.IOException
- If an IO error occurspublic Page type(char c) throws java.io.IOException
c
- the character you with to simulate typing
java.io.IOException
- if an IO error occurspublic Page type(char c, boolean shiftKey, boolean ctrlKey, boolean altKey) throws java.io.IOException
c
- the character you with to simulate typingshiftKey
- true if SHIFT is pressed during the typingctrlKey
- true if CTRL is pressed during the typingaltKey
- true if ALT is pressed during the typing
java.io.IOException
- if an IO error occursprotected void doType(char c, boolean shiftKey, boolean ctrlKey, boolean altKey)
c
- the character you with to simulate typingshiftKey
- true if SHIFT is pressed during the typingctrlKey
- true if CTRL is pressed during the typingaltKey
- true if ALT is pressed during the typingprotected boolean isSubmittableByEnter()
public java.lang.String toString()
toString
in class java.lang.Object
public final <E extends HtmlElement> E getOneHtmlElementByAttribute(java.lang.String elementName, java.lang.String attributeName, java.lang.String attributeValue) throws ElementNotFoundException
E
- the sub-element typeelementName
- the name of the element to search forattributeName
- the name of the attribute to search forattributeValue
- the value of the attribute to search for
ElementNotFoundException
- if no element matches the specified search criteriapublic <E extends HtmlElement> E getElementById(java.lang.String id) throws ElementNotFoundException
E
- the sub-element typeid
- the ID value to search for
ElementNotFoundException
- if no element has the specified IDpublic boolean hasHtmlElementWithId(java.lang.String id)
Returns true if there is an element in this element's page with the specified ID. This method is intended for situations where it is enough to know whether a specific element is present in the document.
Implementation Note: This method calls getElementById(String)
internally,
so writing code such as the following would be extremely inefficient:
if (hasHtmlElementWithId(id)) { HtmlElement element = getHtmlElementWithId(id) ... }
id
- the id to search for
public final <E extends HtmlElement> java.util.List<E> getElementsByAttribute(java.lang.String elementName, java.lang.String attributeName, java.lang.String attributeValue)
E
- the sub-element typeelementName
- the name of the element to search forattributeName
- the name of the attribute to search forattributeValue
- the value of the attribute to search for
public final HtmlElement appendChildIfNoneExists(java.lang.String tagName)
tagName
- the tag name of the child to append
public final void removeChild(java.lang.String tagName, int i)
tagName
- the tag name of the child to removei
- the index of the child to removepublic final java.lang.Iterable<HtmlElement> getChildElements()
public final net.sourceforge.htmlunit.corejs.javascript.Function getEventHandler(java.lang.String eventName)
eventName
- Name of event such as "onclick" or "onblur", etc
public final void setEventHandler(java.lang.String eventName, net.sourceforge.htmlunit.corejs.javascript.Function eventHandler)
eventName
- Name of event such as "onclick" or "onblur", etceventHandler
- a Rhino JavaScript executable Functionpublic final void setEventHandler(java.lang.String eventName, java.lang.String jsSnippet)
eventName
- Name of event such as "onclick" or "onblur", etcjsSnippet
- executable JavaScript codepublic final void removeEventHandler(java.lang.String eventName)
eventName
- Name of the event such as "onclick" or "onblur", etcpublic void addHtmlAttributeChangeListener(HtmlAttributeChangeListener listener)
listener
- the attribute change listener to be addedremoveHtmlAttributeChangeListener(HtmlAttributeChangeListener)
public void removeHtmlAttributeChangeListener(HtmlAttributeChangeListener listener)
listener
- the attribute change listener to be removedaddHtmlAttributeChangeListener(HtmlAttributeChangeListener)
public ScriptResult fireEvent(java.lang.String eventType)
fireEvent(Event)
.
eventType
- the event type (like "load", "click")
null
if nothing is executedpublic ScriptResult fireEvent(com.gargoylesoftware.htmlunit.javascript.host.Event event)
event
- the event to fire
protected void preventDefault()
public Page mouseOver()
public Page mouseOver(boolean shiftKey, boolean ctrlKey, boolean altKey, int button)
shiftKey
- true if SHIFT is pressed during the mouse movectrlKey
- true if CTRL is pressed during the mouse movealtKey
- true if ALT is pressed during the mouse movebutton
- the button code, must be MouseEvent.BUTTON_LEFT
, MouseEvent.BUTTON_MIDDLE
or MouseEvent.BUTTON_RIGHT
public Page mouseMove()
public Page mouseMove(boolean shiftKey, boolean ctrlKey, boolean altKey, int button)
shiftKey
- true if SHIFT is pressed during the mouse movectrlKey
- true if CTRL is pressed during the mouse movealtKey
- true if ALT is pressed during the mouse movebutton
- the button code, must be MouseEvent.BUTTON_LEFT
, MouseEvent.BUTTON_MIDDLE
or MouseEvent.BUTTON_RIGHT
public Page mouseOut()
public Page mouseOut(boolean shiftKey, boolean ctrlKey, boolean altKey, int button)
shiftKey
- true if SHIFT is pressed during the mouse movectrlKey
- true if CTRL is pressed during the mouse movealtKey
- true if ALT is pressed during the mouse movebutton
- the button code, must be MouseEvent.BUTTON_LEFT
, MouseEvent.BUTTON_MIDDLE
or MouseEvent.BUTTON_RIGHT
public Page mouseDown()
public Page mouseDown(boolean shiftKey, boolean ctrlKey, boolean altKey, int button)
shiftKey
- true if SHIFT is pressed during the mouse clickctrlKey
- true if CTRL is pressed during the mouse clickaltKey
- true if ALT is pressed during the mouse clickbutton
- the button code, must be MouseEvent.BUTTON_LEFT
, MouseEvent.BUTTON_MIDDLE
or MouseEvent.BUTTON_RIGHT
public Page mouseUp()
public Page mouseUp(boolean shiftKey, boolean ctrlKey, boolean altKey, int button)
shiftKey
- true if SHIFT is pressed during the mouse click releasectrlKey
- true if CTRL is pressed during the mouse click releasealtKey
- true if ALT is pressed during the mouse click releasebutton
- the button code, must be MouseEvent.BUTTON_LEFT
, MouseEvent.BUTTON_MIDDLE
or MouseEvent.BUTTON_RIGHT
public Page rightClick()
public Page rightClick(boolean shiftKey, boolean ctrlKey, boolean altKey)
shiftKey
- true if SHIFT is pressed during the mouse clickctrlKey
- true if CTRL is pressed during the mouse clickaltKey
- true if ALT is pressed during the mouse click
public void blur()
public void focus()
protected void checkChildHierarchy(org.w3c.dom.Node childNode) throws org.w3c.dom.DOMException
checkChildHierarchy
in class DomNode
childNode
- the new child node that is being inserted below this node
org.w3c.dom.DOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
not allow children of the type of the newChild node, or if the node to insert is one of
this node's ancestors or this node itself, or if this node is of type Document and the
DOM application attempts to insert a second DocumentType or Element node.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the
one that created this node.protected boolean isAttributeCaseSensitive()
isAttributeCaseSensitive
in class DomElement
false
public <P extends Page> P click() throws java.io.IOException
P
- the page type
java.io.IOException
- if an IO error occurspublic <P extends Page> P click(boolean shiftKey, boolean ctrlKey, boolean altKey) throws java.io.IOException
P
- the page typeshiftKey
- true if SHIFT is pressed during the clickctrlKey
- true if CTRL is pressed during the clickaltKey
- true if ALT is pressed during the click
java.io.IOException
- if an IO error occurspublic <P extends Page> P click(com.gargoylesoftware.htmlunit.javascript.host.Event event) throws java.io.IOException
P
- the page typeevent
- the click event used
java.io.IOException
- if an IO error occurspublic <P extends Page> P dblClick() throws java.io.IOException
click()
is automatically called first.
P
- the page type
java.io.IOException
- if an IO error occurspublic <P extends Page> P dblClick(boolean shiftKey, boolean ctrlKey, boolean altKey) throws java.io.IOException
click(boolean, boolean, boolean)
is automatically
called first.
P
- the page typeshiftKey
- true if SHIFT is pressed during the double-clickctrlKey
- true if CTRL is pressed during the double-clickaltKey
- true if ALT is pressed during the double-click
java.io.IOException
- if an IO error occursprotected Page doClickAction(Page defaultPage) throws java.io.IOException
This method will be called if there either wasn't an onclick handler, or if there was one, but the result of that handler wasn't 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
java.io.IOException
- if an IO error occurspublic final java.lang.String getLangAttribute()
public final java.lang.String getXmlLangAttribute()
public final java.lang.String getTextDirectionAttribute()
public final java.lang.String getOnClickAttribute()
public final java.lang.String getOnDblClickAttribute()
public final java.lang.String getOnMouseDownAttribute()
public final java.lang.String getOnMouseUpAttribute()
public final java.lang.String getOnMouseOverAttribute()
public final java.lang.String getOnMouseMoveAttribute()
public final java.lang.String getOnMouseOutAttribute()
public final java.lang.String getOnKeyPressAttribute()
public final java.lang.String getOnKeyDownAttribute()
public final java.lang.String getOnKeyUpAttribute()
protected boolean isStateUpdateFirst()
HtmlCheckBoxInput
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |