com.gargoylesoftware.htmlunit.html
Class HtmlTextInput
java.lang.Object
com.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
com.gargoylesoftware.htmlunit.html.FocusableElement
com.gargoylesoftware.htmlunit.html.HtmlInput
com.gargoylesoftware.htmlunit.html.HtmlTextInput
- All Implemented Interfaces:
- DisabledElement, SubmittableElement, Serializable, Cloneable
public class HtmlTextInput
- extends HtmlInput
Wrapper for the html element "input".
- Version:
- $Revision: 2132 $
- Author:
- Mike Bowler, David K. Taylor, Christian Sell, Daniel Gredler, Ahmed Ashour
- See Also:
- Serialized Form
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 |
HtmlTextInput(HtmlPage page,
Map attributes)
Deprecated. You should not directly construct HtmlTextInput. |
Method Summary |
protected boolean |
isSubmittableByEnter()
Returns true if clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any). |
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. |
Page |
type(char c,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Simulates typing the specified character while this element has focus. |
Methods inherited from class com.gargoylesoftware.htmlunit.html.HtmlInput |
asText, click, getAcceptAttribute, getAccessKeyAttribute, getAlignAttribute, getAltAttribute, getCheckedAttribute, getDefaultValue, getDisabledAttribute, getMaxLengthAttribute, getNameAttribute, getOnBlurAttribute, getOnChangeAttribute, getOnFocusAttribute, getOnSelectAttribute, getReadOnlyAttribute, getSizeAttribute, getSrcAttribute, getSubmitKeyValuePairs, getTabIndexAttribute, getTypeAttribute, getUseMapAttribute, getValueAttribute, isChecked, isDefaultChecked, isDisabled, reset, setChecked, setDefaultChecked, setDefaultValue, setDefaultValue, setValueAttribute |
Methods inherited from class com.gargoylesoftware.htmlunit.html.ClickableElement |
click, click, click, dblClick, dblClick, doClickAction, getLangAttribute, getOnClickAttribute, getOnDblClickAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getTextDirectionAttribute, getXmlLangAttribute, isStateUpdateFirst |
Methods inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement |
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, keyDown, keyDown, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, notImplemented, printOpeningTagContentAsXml, printXml, removeAttribute, removeAttributeNS, removeChild, removeEventHandler, removeHtmlAttributeChangeListener, rightClick, rightClick, setAttribute, setAttributeNS, setAttributeValue, setAttributeValue, setEventHandler, setEventHandler, setId, toString, type, type, type |
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
addDomChangeListener, addPropertyChangeListener, appendChild, appendDomChild, 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 |
HtmlTextInput
public HtmlTextInput(HtmlPage page,
Map attributes)
- Deprecated. You should not directly construct HtmlTextInput.
- Create an instance
- Parameters:
page
- The page that contains this elementattributes
- the initial attributes
type
public Page type(char c,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
throws IOException
- Simulates typing the specified character while this element has focus.
Note that for some elements, typing '\n' submits the enclosed form.
- Overrides:
type
in class HtmlElement
- Parameters:
c
- the character you with to simulate typingshiftKey
- true if SHIFT is pressedctrlKey
- true if CTRL is pressedaltKey
- true if ALT is pressed
- Returns:
- The page that occupies this window after typing.
It may be the same window or it may be a freshly loaded one.
- Throws:
IOException
- If an IO error occurs
preventDefault
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.
The default implementation does nothing.
- Overrides:
preventDefault
in class HtmlElement
isSubmittableByEnter
protected boolean isSubmittableByEnter()
- Returns true if clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any).
Default implementation is false.
- Overrides:
isSubmittableByEnter
in class HtmlElement
- Returns:
- true if clicking Enter should submit the enclosed form (if any).
Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.