Class HTMLInputElementImpl

All Implemented Interfaces:
Cloneable, EventTarget, GlobalEventHandlers, HTMLElement, HTMLInputElement, ModelNode, Element, InnerHTML, Node, NonDocumentTypeChildNode, ParentNode, CSSPropertiesContext, ScriptableDelegate

public class HTMLInputElementImpl extends HTMLBasicInputElement implements HTMLInputElement

HTMLInputElementImpl class.

  • Constructor Details

    • HTMLInputElementImpl

      public HTMLInputElementImpl(String name)

      Constructor for HTMLInputElementImpl.

      Parameters:
      name - a String object.
  • Method Details

    • getAccept

      public String getAccept()
      Sets or retrieves a comma-separated list of content types.
      Specified by:
      getAccept in interface HTMLInputElement
      Returns:
      a String object.
    • getAlt

      public String getAlt()
      Sets or retrieves a text alternative to the graphic.
      Specified by:
      getAlt in interface HTMLInputElement
      Returns:
      a String object.
    • isChecked

      public boolean isChecked()
      Sets or retrieves the state of the check box or radio button.
      Specified by:
      isChecked in interface HTMLInputElement
      Returns:
      a boolean.
    • getForm

      public HTMLFormElement getForm()
      Retrieves a reference to the form that the object is embedded in.
      Specified by:
      getForm in interface HTMLInputElement
      Returns:
      a HTMLFormElement object.
    • getName

      public String getName()
      Sets or retrieves the name of the object.
      Specified by:
      getName in interface HTMLInputElement
      Returns:
      a String object.
    • getSize

      public int getSize()

      getSize.

      Specified by:
      getSize in interface HTMLInputElement
      Returns:
      a Integer object.
    • getSrc

      public String getSrc()
      The address or URL of the a media resource that is to be considered.
      Specified by:
      getSrc in interface HTMLInputElement
      Returns:
      a String object.
    • getType

      public String getType()
      Returns the content type of the object.
      Specified by:
      getType in interface HTMLInputElement
      Returns:
      a String object.
    • getValue

      public String getValue()
      Returns the value of the data at the cursor's current position.
      Specified by:
      getValue in interface HTMLInputElement
      Specified by:
      getValue in class HTMLBasicInputElement
      Returns:
      a String object.
    • select

      public void select()
      Makes the selection equal to the current object.
      Specified by:
      select in interface HTMLInputElement
    • blur

      public void blur()

      blur.

    • focus

      public void focus()

      focus.

    • click

      public void click()
      Description copied from class: HTMLElementImpl

      click.

      Specified by:
      click in interface HTMLElement
      Overrides:
      click in class HTMLElementImpl
    • setRangeText

      public void setRangeText(String select, int start, int end, String preserve)

      setRangeText.

      Specified by:
      setRangeText in interface HTMLInputElement
      Parameters:
      select - a String object.
      start - a Integer object.
      end - a Integer object.
      preserve - a String object.
    • setAccept

      public void setAccept(String accept)

      setAccept.

      Specified by:
      setAccept in interface HTMLInputElement
      Parameters:
      accept - a String object.
    • setAlt

      public void setAlt(String alt)

      setAlt.

      Specified by:
      setAlt in interface HTMLInputElement
      Parameters:
      alt - a String object.
    • setChecked

      public void setChecked(boolean checked)

      setChecked.

      Specified by:
      setChecked in interface HTMLInputElement
      Parameters:
      checked - a boolean.
    • setName

      public void setName(String name)

      setName.

      Specified by:
      setName in interface HTMLInputElement
      Parameters:
      name - a String object.
    • setSize

      public void setSize(int size)

      setSize.

      Specified by:
      setSize in interface HTMLInputElement
      Parameters:
      size - a Integer object.
    • setSrc

      public void setSrc(String src)

      setSrc.

      Specified by:
      setSrc in interface HTMLInputElement
      Parameters:
      src - a String object.
    • setType

      public void setType(String type)

      setType.

      Specified by:
      setType in interface HTMLInputElement
      Parameters:
      type - a String object.
    • setValue

      public void setValue(String value)

      setValue.

      Specified by:
      setValue in interface HTMLInputElement
      Specified by:
      setValue in class HTMLBasicInputElement
      Parameters:
      value - a String object.
    • draw

      public void draw(InputControl ic)

      draw.

      Parameters:
      ic - a InputControl object.
    • submit

      public void submit()

      submit.

    • reset

      public void reset()

      reset.

    • submitImage

      public void submitImage(int x, int y)

      submitImage.

      Parameters:
      x - a Integer object.
      y - a Integer object.
    • submitForm

      public void submitForm(FormInput[] extraFormInputs)

      submitForm.

      Parameters:
      extraFormInputs - an array of FormInput objects.
    • resetInput

      public void resetInput()

      resetInput.

    • getAlign

      public String getAlign()
      Sets or retrieves how the object is aligned with adjacent text.
      Specified by:
      getAlign in interface HTMLInputElement
      Returns:
      a String object.
    • setAlign

      public void setAlign(String align)

      setAlign.

      Specified by:
      setAlign in interface HTMLInputElement
      Parameters:
      align - a String object.
    • isDefaultChecked

      public boolean isDefaultChecked()
      Sets or retrieves the state of the check box or radio button.
      Specified by:
      isDefaultChecked in interface HTMLInputElement
      Returns:
      a boolean.
    • setDefaultChecked

      public void setDefaultChecked(boolean defaultChecked)

      setDefaultChecked.

      Specified by:
      setDefaultChecked in interface HTMLInputElement
      Parameters:
      defaultChecked - a boolean.
    • getFormAction

      public String getFormAction()
      Overrides the action attribute (where the data on a form is sent) on the parent form element.
      Specified by:
      getFormAction in interface HTMLInputElement
      Returns:
      a String object.
    • setFormAction

      public void setFormAction(String formAction)

      setFormAction.

      Specified by:
      setFormAction in interface HTMLInputElement
      Parameters:
      formAction - a String object.
    • getFormEnctype

      public String getFormEnctype()
      Used to override the encoding (formEnctype attribute) specified on the form element.
      Specified by:
      getFormEnctype in interface HTMLInputElement
      Returns:
      a String object.
    • setFormEnctype

      public void setFormEnctype(String formEnctype)

      setFormEnctype.

      Specified by:
      setFormEnctype in interface HTMLInputElement
      Parameters:
      formEnctype - a String object.
    • getFormMethod

      public String getFormMethod()
      Overrides the submit method attribute previously specified on a form element.
      Specified by:
      getFormMethod in interface HTMLInputElement
      Returns:
      a String object.
    • setFormMethod

      public void setFormMethod(String formMethod)

      setFormMethod.

      Specified by:
      setFormMethod in interface HTMLInputElement
      Parameters:
      formMethod - a String object.
    • isFormNoValidate

      public boolean isFormNoValidate()
      Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
      Specified by:
      isFormNoValidate in interface HTMLInputElement
      Returns:
      a boolean.
    • setFormNoValidate

      public void setFormNoValidate(boolean formNoValidate)

      setFormNoValidate.

      Specified by:
      setFormNoValidate in interface HTMLInputElement
      Parameters:
      formNoValidate - a boolean.
    • getFormTarget

      public String getFormTarget()
      Overrides the target attribute on a form element.
      Specified by:
      getFormTarget in interface HTMLInputElement
      Returns:
      a String object.
    • setFormTarget

      public void setFormTarget(String formTarget)

      setFormTarget.

      Specified by:
      setFormTarget in interface HTMLInputElement
      Parameters:
      formTarget - a String object.
    • getHeight

      public double getHeight()
      Sets or retrieves the height of the object.
      Specified by:
      getHeight in interface HTMLInputElement
      Returns:
      a double.
    • setHeight

      public void setHeight(double height)

      setHeight.

      Specified by:
      setHeight in interface HTMLInputElement
      Parameters:
      height - a double.
    • isIndeterminate

      public boolean isIndeterminate()

      isIndeterminate.

      Specified by:
      isIndeterminate in interface HTMLInputElement
      Returns:
      a boolean.
    • setIndeterminate

      public void setIndeterminate(boolean indeterminate)

      setIndeterminate.

      Specified by:
      setIndeterminate in interface HTMLInputElement
      Parameters:
      indeterminate - a boolean.
    • getList

      public HTMLElement getList()
      Specifies the ID of a pre-defined datalist of options for an input element.
      Specified by:
      getList in interface HTMLInputElement
      Returns:
      a HTMLElement object.
    • getMax

      public String getMax()
      Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
      Specified by:
      getMax in interface HTMLInputElement
      Returns:
      a String object.
    • setMax

      public void setMax(String max)

      setMax.

      Specified by:
      setMax in interface HTMLInputElement
      Parameters:
      max - a String object.
    • getMin

      public String getMin()
      Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
      Specified by:
      getMin in interface HTMLInputElement
      Returns:
      a String object.
    • setMin

      public void setMin(String min)

      setMin.

      Specified by:
      setMin in interface HTMLInputElement
      Parameters:
      min - a String object.
    • isMultiple

      public boolean isMultiple()
      Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
      Specified by:
      isMultiple in interface HTMLInputElement
      Returns:
      a boolean.
    • setMultiple

      public void setMultiple(boolean multiple)

      setMultiple.

      Specified by:
      setMultiple in interface HTMLInputElement
      Parameters:
      multiple - a boolean.
    • getPattern

      public String getPattern()
      Gets or sets a string containing a regular expression that the user's input must match.
      Specified by:
      getPattern in interface HTMLInputElement
      Returns:
      a String object.
    • setPattern

      public void setPattern(String pattern)

      setPattern.

      Specified by:
      setPattern in interface HTMLInputElement
      Parameters:
      pattern - a String object.
    • getStep

      public String getStep()
      Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
      Specified by:
      getStep in interface HTMLInputElement
      Returns:
      a String object.
    • setStep

      public void setStep(String step)

      setStep.

      Specified by:
      setStep in interface HTMLInputElement
      Parameters:
      step - a String object.
    • getUseMap

      public String getUseMap()
      Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
      Specified by:
      getUseMap in interface HTMLInputElement
      Returns:
      a String object.
    • setUseMap

      public void setUseMap(String useMap)

      setUseMap.

      Specified by:
      setUseMap in interface HTMLInputElement
      Parameters:
      useMap - a String object.
    • getValueAsNumber

      public double getValueAsNumber()
      Returns the input field value as a number.
      Specified by:
      getValueAsNumber in interface HTMLInputElement
      Returns:
      a double.
    • setValueAsNumber

      public void setValueAsNumber(double valueAsNumber)

      setValueAsNumber.

      Specified by:
      setValueAsNumber in interface HTMLInputElement
      Parameters:
      valueAsNumber - a double.
    • getWidth

      public double getWidth()
      Sets or retrieves the width of the object.
      Specified by:
      getWidth in interface HTMLInputElement
      Returns:
      a double.
    • setWidth

      public void setWidth(double width)

      setWidth.

      Specified by:
      setWidth in interface HTMLInputElement
      Parameters:
      width - a double.
    • stepDown

      public void stepDown(double n)
      Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
      Specified by:
      stepDown in interface HTMLInputElement
      Parameters:
      n - Value to decrement the value by.
    • stepDown

      public void stepDown()

      stepDown.

      Specified by:
      stepDown in interface HTMLInputElement
    • stepUp

      public void stepUp(double n)
      Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
      Specified by:
      stepUp in interface HTMLInputElement
      Parameters:
      n - Value to increment the value by.
    • stepUp

      public void stepUp()

      stepUp.

      Specified by:
      stepUp in interface HTMLInputElement
    • getOffsetWidth

      public Integer getOffsetWidth()
      Description copied from class: HTMLElementImpl

      getOffsetWidth.

      Specified by:
      getOffsetWidth in interface HTMLElement
      Overrides:
      getOffsetWidth in class HTMLElementImpl
      Returns:
      a Integer object.
    • getClientWidth

      public Integer getClientWidth()
      Description copied from class: ElementImpl

      getClientWidth.

      Specified by:
      getClientWidth in interface Element
      Overrides:
      getClientWidth in class ElementImpl
      Returns:
      a Integer object.
    • getClientHeight

      public int getClientHeight()
      Description copied from class: ElementImpl

      getClientHeight.

      Specified by:
      getClientHeight in interface Element
      Overrides:
      getClientHeight in class ElementImpl
      Returns:
      a Integer object.
    • createRenderState

      protected RenderState createRenderState(RenderState prevRenderState)

      createRenderState.

      Overrides:
      createRenderState in class HTMLElementImpl
      Parameters:
      prevRenderState - a RenderState object.
      Returns:
      a RenderState object.
    • toString

      public String toString()
      Overrides:
      toString in class HTMLElementImpl