Class HtmlNumberInput

All Implemented Interfaces:
Serializable, Cloneable, DisabledElement, FormFieldWithNameHistory, org.htmlunit.html.impl.SelectableTextInput, LabelableElement, SubmittableElement, ValidatableElement, Element, Node

public class HtmlNumberInput extends HtmlSelectableTextInput implements LabelableElement
Wrapper for the HTML element "input" with type is "number".
See Also:
  • Method Details

    • isSubmittableByEnter

      protected boolean isSubmittableByEnter()
      Returns true if clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any). The default implementation returns false.
      Overrides:
      isSubmittableByEnter in class HtmlElement
      Returns:
      true if 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:
      setDefaultChecked in interface SubmittableElement
      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:
      doType in class HtmlSelectableTextInput
      Parameters:
      c - the character you with to simulate typing
      lastType - is this the last character to type
    • getValue

      public String getValue()
      Overrides:
      getValue in class HtmlInput
      Returns:
      the value
    • isValid

      public boolean isValid()
      Returns whether this element satisfies all form validation constraints set.
      Overrides:
      isValid in class HtmlInput
      Returns:
      whether this element satisfies all form validation constraints set