com.gargoylesoftware.htmlunit.html
Class HtmlImageInput

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.HtmlInput
                              extended by com.gargoylesoftware.htmlunit.html.HtmlImageInput
All Implemented Interfaces:
DisabledElement, SubmittableElement, java.io.Serializable, java.lang.Cloneable

public class HtmlImageInput
extends HtmlInput

Wrapper for the html element "input"

Version:
$Revision: 1.3 $
Author:
Mike Bowler, David K. Taylor, Christian Sell, Marc Guillemot, Daniel Gredler, 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.HtmlInput
TAG_NAME
 
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()
 Submit the form that contains this input.
 Page click(int x, int y)
 Simulate clicking this input with a pointing device.
 KeyValuePair[] getSubmitKeyValuePairs()
 Return an array of KeyValuePairs that are the values that will be sent back to the server whenever the current form is submitted.
 void setDefaultValue(java.lang.String defaultValue)
 Sets the default value to use when this element gets reset, if applicable. Also sets the value attribute when emulating Netscape browsers. Also sets the value to the new default value, just like IE.
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.HtmlInput
asText, getAcceptAttribute, getAccessKeyAttribute, getAlignAttribute, getAltAttribute, getCheckedAttribute, getDefaultValue, getDisabledAttribute, getMaxLengthAttribute, getNameAttribute, getOnBlurAttribute, getOnChangeAttribute, getOnFocusAttribute, getOnSelectAttribute, getReadOnlyAttribute, getSizeAttribute, getSrcAttribute, getTabIndexAttribute, getTypeAttribute, getUseMapAttribute, getValueAttribute, isChecked, isDefaultChecked, isDisabled, reset, setChecked, setDefaultChecked, setValueAttribute
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.FocusableElement
blur, focus
 
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, 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
Submit the form that contains this input. Only a couple of the inputs support this method so it is made protected here. Those subclasses that wish to expose it will override and make it public.

Overrides:
click in class ClickableElement
Returns:
The Page that is the result of submitting this page to the server
Throws:
java.io.IOException - If an io error occurs

click

public Page click(int x,
                  int y)
           throws java.io.IOException,
                  ElementNotFoundException
Simulate clicking this input with a pointing device. The x and y coordinates of the pointing device will be sent to the server.

Overrides:
click in class HtmlInput
Parameters:
x - The x coordinate of the pointing device at the time of clicking
y - The y coordinate of the pointing device at the time of clicking
Returns:
The page that is loaded after the click has taken place.
Throws:
java.io.IOException - If an io error occurs
ElementNotFoundException - If a particular xml element could not be found in the dom model

getSubmitKeyValuePairs

public KeyValuePair[] getSubmitKeyValuePairs()
Return an array of KeyValuePairs that are the values that will be sent back to the server whenever the current form is submitted.

THIS METHOD IS INTENDED FOR THE USE OF THE FRAMEWORK ONLY AND SHOULD NOT BE USED BY CONSUMERS OF HTMLUNIT. USE AT YOUR OWN RISK.

Specified by:
getSubmitKeyValuePairs in interface SubmittableElement
Overrides:
getSubmitKeyValuePairs in class HtmlInput
Returns:
See above

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Sets the default value to use when this element gets reset, if applicable. Also sets the value attribute when emulating Netscape browsers. Also sets the value to the new default value, just like IE.

Specified by:
setDefaultValue in interface SubmittableElement
Overrides:
setDefaultValue in class HtmlInput
Parameters:
defaultValue - The default value to use when this element gets reset, if applicable.
See Also:
SubmittableElement.setDefaultValue(String)


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