Module org.htmlunit

Class HtmlRangeInput

All Implemented Interfaces:
Serializable, Cloneable, DisabledElement, LabelableElement, SubmittableElement, ValidatableElement, Element, Node

public class HtmlRangeInput extends HtmlInput implements LabelableElement
Wrapper for the HTML element "input" where type is "range".
Author:
Ahmed Ashour, Ronald Brill, Frank Danek, Anton Demydenko
See Also:
  • Method Details

    • getMinNumeric

      public double getMinNumeric()
      Returns the numeric value of the min attribute.
      Returns:
      the value of the min attribute as a double, or 0 if the attribute is not defined or cannot be parsed
    • getMaxNumeric

      public double getMaxNumeric()
      Returns the numeric value of the max attribute.
      Returns:
      the value of the max attribute as a double, or 100 if the attribute is not defined or cannot be parsed
    • getStepNumeric

      public double getStepNumeric()
      Returns the numeric value of the step attribute.
      Returns:
      the value of the step attribute as a double, or 1 if the attribute is not defined or cannot be parsed
    • 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:
    • setValue

      public void setValue(String newValue)
      Sets the value.
      Overrides:
      setValue in class HtmlInput
      Parameters:
      newValue - the new value
    • valueAttributeChanged

      protected void valueAttributeChanged(String attributeValue, boolean isValueDirty)
      Overrides:
      valueAttributeChanged in class HtmlInput
    • isRequiredSupported

      protected boolean isRequiredSupported()
      Returns whether this element supports the required constraint.
      Overrides:
      isRequiredSupported in class HtmlInput
      Returns:
      whether this element supports the required constraint
    • 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