public class HtmlTextInput extends HtmlInput implements SelectableTextInput, LabelableElement
HtmlElement.DisplayStyleDomElement.ChildElementsIteratorDomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode>TAB_INDEX_OUT_OF_BOUNDSATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY, SRC_ATTRIBUTEAS_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_UNINITIALIZEDATTRIBUTE_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| Modifier and Type | Method and Description |
|---|---|
DomNode |
cloneNode(boolean deep) |
protected void |
doType(char c,
boolean lastType)
Performs the effective type action, called after the keyPress event and before the keyUp event.
|
protected void |
doType(int keyCode,
boolean lastType)
Performs the effective type action, called after the keyPress event and before the keyUp event.
|
String |
getSelectedText()
Returns the selected text in this element, or
null if there is no selected text in this element. |
int |
getSelectionEnd()
Returns the end position of the selected text in this element.
|
int |
getSelectionStart()
Returns the start position of the selected text in this element.
|
String |
getText()
Returns all of the text in this element.
|
protected boolean |
isSubmittableByEnter()
Returns
true if clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any). |
void |
reset()
Returns the value of this element to the default value or checked state (usually what it was at
the time the page was loaded, unless it has been modified via JavaScript).
|
void |
select()
Focuses this element and selects all of its text.
|
protected void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String attributeValue,
boolean notifyAttributeChangeListeners,
boolean notifyMutationObservers)
Sets the value of the attribute specified by namespace and qualified name.
|
void |
setDefaultChecked(boolean defaultChecked)
Sets the default checked state to use when this element gets reset, if applicable.
|
void |
setDefaultValue(String defaultValue)
Sets the default value to use when this element gets reset, if applicable.
|
void |
setSelectionEnd(int selectionEnd)
Sets the end position of the selected text in this element.
|
void |
setSelectionStart(int selectionStart)
Sets the start position of the selected text in this element.
|
void |
setText(String text)
Sets the text in this element.
|
protected void |
typeDone(String newValue,
boolean notifyAttributeChangeListeners)
Called from
DoTypeProcessor. |
focus, getAccept, getAcceptAttribute, getAccessKeyAttribute, getAlignAttribute, getAltAttribute, getAutocomplete, getCheckedAttribute, getDefaultStyleDisplay, getDefaultValue, getDisabledAttribute, getMaxLength, getMaxLengthAttribute, getNameAttribute, getNewNames, getOnBlurAttribute, getOnChangeAttribute, getOnFocusAttribute, getOnSelectAttribute, getOriginalName, getPlaceholder, getReadOnlyAttribute, getSize, getSizeAttribute, getSrcAttribute, getSubmitNameValuePairs, getTabIndexAttribute, getTypeAttribute, getUseMapAttribute, getValueAttribute, handles, isChecked, isDefaultChecked, isDisabled, isReadOnly, isRequiredSupported, markAsCreatedByJavascript, propagateClickStateUpdateToParent, removeFocus, setAccept, setAttribute, setAutocomplete, setChecked, setDefaultValue, setMaxLength, setMinLength, setPlaceholder, setReadOnly, setSize, setValueAttribute, wasCreatedByJavascriptacceptChar, addHtmlAttributeChangeListener, appendChildIfNoneExists, checkChildHierarchy, detach, fireHtmlAttributeAdded, fireHtmlAttributeRemoved, fireHtmlAttributeReplaced, getCanonicalXPath, getElementsByAttribute, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getLangAttribute, getNodeName, getOnClickAttribute, getOnDblClickAttribute, getOneHtmlElementByAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getSrcAttributeNormalized, getTabIndex, getTextDirectionAttribute, getXmlLangAttribute, hasEventHandlers, isAltPressed, isAttributeCaseSensitive, isCtrlPressed, isDisplayed, isHidden, isRequired, isShiftPressed, isValid, notifyAttributeChangeListeners, removeAttribute, removeChild, removeHtmlAttributeChangeListener, setAttributeNode, setRequired, type, type, type, typeblur, click, click, click, click, click, dblClick, dblClick, doClickFireChangeEvent, doClickFireClickEvent, doClickStateUpdate, fireEvent, fireEvent, getAttribute, getAttributeDirect, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributesMap, getChildElementCount, getChildElements, getElementsByTagName, getElementsByTagNameNS, getEventTargetElement, getFirstElementChild, getId, getLastElementChild, getNodeType, getSchemaTypeInfo, getStyleElement, getStyleElementCaseInSensitive, getStyleMap, getTagName, hasAttribute, hasAttributeNS, hasAttributes, isDisabledElementAndDisabled, isEmptyXmlTagExpanded, isMouseOver, isStateUpdateFirst, matches, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, preventDefault, printOpeningTagContentAsXml, printXml, removeAttributeNode, removeAttributeNS, removeStyleAttribute, replaceStyleAttribute, rightClick, rightClick, setAttributeNodeNS, setAttributeNS, setId, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, toString, writeStyleToElementgetLocalName, getLowercaseName, getNamespaceURI, getPrefix, getQualifiedName, processImportNode, setPrefixaddCharacterDataChangeListener, addDomChangeListener, appendChild, asText, asXml, basicRemove, compareDocumentPosition, fireCharacterDataChanged, fireNodeAdded, fireNodeDeleted, getAncestors, getBaseURI, getByXPath, getByXPath, getChildNodes, getChildren, getDescendants, getDomElementDescendants, getEndColumnNumber, getEndLineNumber, getFeature, getFirstByXPath, getFirstByXPath, getFirstChild, getHtmlElementDescendants, getHtmlPageOrNull, getIndex, getLastChild, getNextElementSibling, getNextSibling, getNodeValue, getOwnerDocument, getPage, getParentNode, getPreviousElementSibling, getPreviousSibling, getReadyState, getScriptableObject, getSelectorList, getStartColumnNumber, getStartLineNumber, getTextContent, getUserData, getVisibleText, hasChildNodes, hasFeature, insertBefore, insertBefore, isAncestorOf, isAncestorOfAny, isAttachedToPage, isDefaultNamespace, isEqualNode, isSameNode, isSupported, isTrimmedText, lookupNamespaceURI, lookupPrefix, mayBeDisplayed, normalize, notifyIncorrectness, onAddedToDocumentFragment, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, querySelector, querySelectorAll, quietlyRemoveAndMoveChildrenTo, remove, removeAllChildren, removeCharacterDataChangeListener, removeChild, removeDomChangeListener, replace, replaceChild, setEndLocation, setNextSibling, setParentNode, setPreviousSibling, setReadyState, setScriptableObject, setStartLocation, setTextContent, setUserDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfocus, getPageappendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataprotected void doType(char c,
boolean lastType)
doType in class HtmlElementc - the character you with to simulate typinglastType - is this the last character to typeprotected void doType(int keyCode,
boolean lastType)
KeyboardEvent.DOM_VK_PAGE_DOWN.doType in class HtmlElementkeyCode - the key code wish to simulate typinglastType - is this the last to typeprotected void typeDone(String newValue, boolean notifyAttributeChangeListeners)
DoTypeProcessor.typeDone in class HtmlElementnewValue - the new valuenotifyAttributeChangeListeners - to notify the associated HtmlAttributeChangeListenersprotected boolean isSubmittableByEnter()
true if clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any).
The default implementation returns false.isSubmittableByEnter in class HtmlElementtrue if clicking Enter should submit the enclosed form (if any)public void select()
select in interface SelectableTextInputpublic String getSelectedText()
null if there is no selected text in this element.getSelectedText in interface SelectableTextInputnull if there is no selected text in this elementpublic String getText()
getText in interface SelectableTextInputpublic void setText(String text)
setText in interface SelectableTextInputtext - the text to put in this elementpublic int getSelectionStart()
getSelectionStart in interface SelectableTextInputpublic void setSelectionStart(int selectionStart)
setSelectionStart in interface SelectableTextInputselectionStart - the start position of the selected text in this elementpublic int getSelectionEnd()
getSelectionEnd in interface SelectableTextInputpublic void setSelectionEnd(int selectionEnd)
setSelectionEnd in interface SelectableTextInputselectionEnd - the end position of the selected text in this elementprotected void setAttributeNS(String namespaceURI, String qualifiedName, String attributeValue, boolean notifyAttributeChangeListeners, boolean notifyMutationObservers)
setAttributeNS in class HtmlInputnamespaceURI - the URI that identifies an XML namespacequalifiedName - the qualified name (prefix:local) of the attributeattributeValue - the value of the attributenotifyAttributeChangeListeners - to notify the associated HtmlAttributeChangeListenersnotifyMutationObservers - to notify MutationObservers or notpublic void setDefaultValue(String defaultValue)
setDefaultValue in interface SubmittableElementsetDefaultValue in class HtmlInputdefaultValue - the default value to use when this element gets reset, if applicableSubmittableElement.setDefaultValue(String)public void setDefaultChecked(boolean defaultChecked)
setDefaultChecked in interface SubmittableElementdefaultChecked - the default checked state to use when this element gets reset, if applicableSubmittableElement.setDefaultChecked(boolean),
HtmlRadioButtonInput.setDefaultChecked(boolean),
HtmlCheckBoxInput.setDefaultChecked(boolean)public void reset()
reset in interface SubmittableElementreset in class HtmlInputHtmlInput.reset()Copyright © 2002–2020 Gargoyle Software Inc.. All rights reserved.