- All Implemented Interfaces:
Serializable,Cloneable,DisabledElement,SelectableTextInput,LabelableElement,SubmittableElement,ValidatableHtmlElement,Element,Node
Wrapper for the HTML element "input" with type is "number".
- Author:
- Ahmed Ashour, Ronald Brill, Frank Danek, Anton Demydenko, Raik Bieniek, Michael Lueck
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.html.HtmlElement
HtmlElement.DisplayStyleNested classes/interfaces inherited from class org.htmlunit.html.DomElement
DomElement.ChildElementsIteratorNested classes/interfaces inherited from class org.htmlunit.html.DomNode
DomNode.AbstractDescendantIterator<T extends DomNode>, DomNode.ChildIterator, DomNode.DescendantDomElementsIterator, DomNode.DescendantDomNodesIterator, DomNode.DescendantHtmlElementsIterator -
Field Summary
Fields inherited from class org.htmlunit.html.HtmlElement
ATTRIBUTE_CHECKED, ATTRIBUTE_HIDDEN, ATTRIBUTE_READONLY, ATTRIBUTE_REQUIRED, TAB_INDEX_OUT_OF_BOUNDSFields inherited from class org.htmlunit.html.DomElement
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY, ID_ATTRIBUTE, NAME_ATTRIBUTE, SRC_ATTRIBUTE, TYPE_ATTRIBUTE, VALUE_ATTRIBUTEFields inherited from class org.htmlunit.html.DomNode
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZEDFields inherited from interface org.htmlunit.html.DisabledElement
ATTRIBUTE_DISABLEDFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoType(char c, boolean lastType) Performs the effective type action, called after the keyPress event and before the keyUp event.getValue()Returns the value.booleanReturns whether the user has provided input that the browser is unable to convert.booleanReturns whether the element's value exceeds the maximum allowed value.booleanReturns whether the element's value is less than the minimum allowed value.booleanReturns whether the element's value does not satisfy thestepconstraint.protected booleanReturnstrueif clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any).voidsetDefaultChecked(boolean defaultChecked) Sets the default checked state to use when this element gets reset, if applicable.voidSets the value.Methods inherited from class org.htmlunit.html.HtmlSelectableTextInput
cloneNode, doType, getSelectedText, getSelectionEnd, getSelectionStart, getText, select, setSelectionEnd, setSelectionStart, setText, typeDoneMethods inherited from class org.htmlunit.html.HtmlInput
adjustValueAfterTypeChange, changeType, focus, getAccept, getAcceptAttribute, getAccessKeyAttribute, getAlignAttribute, getAltAttribute, getAutocomplete, getCheckedAttribute, getCustomValidity, getDefaultStyleDisplay, getDefaultValue, getDisabledAttribute, getInternalValue, getMax, getMaxLength, getMaxLengthAttribute, getMin, getMinLength, getMinLengthAttribute, getNameAttribute, getOnBlurAttribute, getOnChangeAttribute, getOnFocusAttribute, getOnSelectAttribute, getPattern, getPlaceholder, getRawValue, getReadOnlyAttribute, getSize, getSizeAttribute, getSrc, getSrcAttribute, getStep, getSubmitNameValuePairs, getTabIndexAttribute, getType, getTypeAttribute, getUseMapAttribute, getValueAttribute, handles, hasPatternMismatchValidityState, isBlankPatternValidated, isCheckable, isChecked, isCustomErrorValidityState, isCustomValidityValid, isDefaultChecked, isFormNoValidate, isMinMaxLengthSupported, isPatternSupported, isReadOnly, isRequiredSupported, isSubmitable, isTooShortValidityState, isValid, isValidValidityState, isValueMissingValidityState, markValueDirty, propagateClickStateUpdateToParent, removeFocus, reset, setAccept, setAttributeNS, setAutocomplete, setChecked, setCustomValidity, setDefaultValue, setFormNoValidate, setMax, setMaxLength, setMin, setMinLength, setPattern, setPlaceholder, setRawValue, setReadOnly, setSize, setSrcAttribute, setStep, setValueAttribute, unmarkValueDirty, valueAttributeChanged, valueModifiedByJavascript, willValidateMethods inherited from class org.htmlunit.html.HtmlElement
acceptChar, addHtmlAttributeChangeListener, appendChildIfNoneExists, checkChildHierarchy, detach, fireHtmlAttributeAdded, fireHtmlAttributeRemoved, fireHtmlAttributeReplaced, getCanonicalXPath, getElementsByAttribute, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getHidden, getLangAttribute, getNodeName, getOffsetLeft, getOffsetParentInternal, getOffsetTop, getOnClickAttribute, getOnDblClickAttribute, getOneHtmlElementByAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getPosX, getPosY, getSrcAttributeNormalized, getTabIndex, getTextDirectionAttribute, getXmlLangAttribute, hasEventHandlers, isAltPressed, isAttributeCaseSensitive, isCtrlPressed, isDisplayed, isHidden, isOptional, isRequired, isShiftPressed, notifyAttributeChangeListeners, removeAttribute, removeChild, removeHtmlAttributeChangeListener, setAttributeNode, setHidden, setHidden, setOwningForm, setRequired, type, type, type, typeMethods inherited from class org.htmlunit.html.DomElement
blur, 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, getStaticElementsByTagName, 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, setAttribute, setAttributeNodeNS, setAttributeNS, setDefaults, setId, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInnerHtml, setNodeValue, toString, writeStyleToElementMethods inherited from class org.htmlunit.html.DomNamespaceNode
getLocalName, getLowercaseName, getNamespaceURI, getPrefix, getQualifiedName, processImportNode, setPrefixMethods inherited from class org.htmlunit.html.DomNode
addCharacterDataChangeListener, addDomChangeListener, appendChild, asNormalizedText, asXml, basicRemove, closest, 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, lookupNamespaceURI, lookupPrefix, mayBeDisplayed, moveBefore, moveBefore, normalize, notifyIncorrectness, onAddedToDocumentFragment, onAddedToPage, onAllChildrenAddedToPage, parseHtmlSnippet, printChildrenAsXml, querySelector, querySelectorAll, quietlyRemoveAndMoveChildrenTo, remove, removeAllChildren, removeCharacterDataChangeListener, removeChild, removeDomChangeListener, replace, replaceChild, setEndLocation, setParentNode, setReadyState, setScriptableObject, setStartLocation, setTextContent, setUserDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.htmlunit.html.DisabledElement
isDisabledMethods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods inherited from interface org.w3c.dom.Node
appendChild, 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, setUserDataMethods inherited from interface org.htmlunit.html.impl.SelectableTextInput
focus, getPageMethods inherited from interface org.htmlunit.html.ValidatableHtmlElement
getBadInputMessage, getPatternMismatchMessage, getRangeOverflowMessage, getRangeUnderflowMessage, getStepMismatchMessage, getTooLongMessage, getTooShortMessage, getTypeMismatchMessage, getValidationMessage, getValueMissingMessage, hasTypeMismatchValidityState, isTooLongValidityState
-
Method Details
-
isSubmittableByEnter
protected boolean isSubmittableByEnter()Returnstrueif clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any). The default implementation returnsfalse.- Overrides:
isSubmittableByEnterin classHtmlElement- Returns:
trueif clicking Enter should submit the enclosed form (if any)
-
setDefaultChecked
public void setDefaultChecked(boolean defaultChecked) Sets the default checked state to use when this element gets reset, if applicable. The default implementation is empty; only checkboxes and radio buttons really care what the default checked value is.- Specified by:
setDefaultCheckedin interfaceSubmittableElement- Parameters:
defaultChecked- the default checked state to use when this element gets reset, if applicable- See Also:
-
doType
protected void doType(char c, boolean lastType) Performs the effective type action, called after the keyPress event and before the keyUp event.- Overrides:
doTypein classHtmlSelectableTextInput- Parameters:
c- the character you with to simulate typinglastType- is this the last character to type
-
getValue
Returns the value. -
setValue
Sets the value.- Overrides:
setValuein classHtmlSelectableTextInput- Parameters:
newValue- the new value
-
hasRangeOverflowValidityState
public boolean hasRangeOverflowValidityState()Returns whether the element's value exceeds the maximum allowed value. A raw value that isn't even a well-formed number ishasBadInputValidityState()'s concern, not a range violation.- Specified by:
hasRangeOverflowValidityStatein interfaceValidatableHtmlElement- Returns:
trueif the value is greater than the maximum specified by themaxattribute; iftrue, the element matches the:invalidand:out-of-rangeCSS pseudo-classes
-
hasRangeUnderflowValidityState
public boolean hasRangeUnderflowValidityState()Returns whether the element's value is less than the minimum allowed value. SeehasRangeOverflowValidityState()for the malformed-value / badInput distinction.- Specified by:
hasRangeUnderflowValidityStatein interfaceValidatableHtmlElement- Returns:
trueif the value is less than the minimum specified by theminattribute; iftrue, the element matches the:invalidand:out-of-rangeCSS pseudo-classes
-
isStepMismatchValidityState
public boolean isStepMismatchValidityState()Returns whether the element's value does not satisfy thestepconstraint. SeehasRangeOverflowValidityState()for the malformed-value / badInput distinction.- Specified by:
isStepMismatchValidityStatein interfaceValidatableHtmlElement- Returns:
trueif the value does not fit the rules determined by thestepattribute; iftrue, the element matches the:invalidand:out-of-rangeCSS pseudo-classes
-
hasBadInputValidityState
public boolean hasBadInputValidityState()Returns whether the user has provided input that the browser is unable to convert. The new home for the malformed-value case that used to make hasRangeOverflowValidityState()/hasRangeUnderflowValidityState()/ isStepMismatchValidityState() all incorrectly returntruesimultaneously.- Specified by:
hasBadInputValidityStatein interfaceValidatableHtmlElement- Returns:
trueif the user has provided input that the browser is unable to convert
-