com.aspose.html.forms

Class InputElement



  • public class InputElement
    extends FormElement<HTMLInputElement>

    The InputElement represents a wrapper that is associated with the HTMLInputElement.

    • Constructor Summary

      Constructors 
      Constructor and Description
      InputElement(HTMLInputElement element)
      Creates a new instance of the input element associated with the HTMLInputElement
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addFile(String uri)
      This method adds files to the HTMLInputElement.Files(HTMLInputElement.getFiles()) collection which will be sent during the next web request.
      boolean getCheckboxValue()
      Returns the checkedness state for the input element with the Checkbox type .
      com.aspose.html.internal.ms.System.Drawing.Color getColorValue()
      This method is used to get the value as a color.
      com.aspose.html.internal.ms.System.DateTime getDateTimeLocalValue()
      This method is used to get the value as a DateTime object object.
      com.aspose.html.internal.ms.System.DateTime getDateValue()
      This method is used to get the value as a DateTime object.
      String getEmailValue()
      This method is used to get the value as an email string object.
      String getId()
      Represents the Id attribute of the input element.
      DataListElement getList()
      Represents a list of options
      com.aspose.html.internal.ms.System.DateTime getMonthValue()
      This method is used to get the value as a DateTime object.
      String getName()
      Represent the name attribute of the input element.
      float getNumberValue()
      This method is used to get the value as a number.
      String getPasswordValue()
      This method is used to get the value as a password string object.
      boolean getRadioValue()
      Returns the checkedness state for the input element with the radio type.
      com.aspose.html.internal.ms.System.TimeSpan getTimeValue()
      This method is used to get the value as a TimeSpan object.
      int getType()
      Type of the form control.
      Url getUrlValue()
      This method is used to get the value as Url object.
      String getValue()
      Represents the string value of the input element that is directly mapped to the 'value' attribute.
      String getWeekValue()
      This method is used to get the value as a week string.
      void setCheckboxValue(boolean value)
      Sets the checkedness state for the input elemen with the Checkbox type.
      void setColorValue(com.aspose.html.internal.ms.System.Drawing.Color value)
      This method is used to set color as a value for input element.
      void setDateTimeLocalValue(com.aspose.html.internal.ms.System.DateTime value)
      This method is used to set DateTime object as a value for input element.
      void setDateValue(com.aspose.html.internal.ms.System.DateTime value)
      This method is used to set DateTime object as a value for input element.
      void setEmailValue(String value)
      This method is used to set email string as a value for input element.
      void setId(String value)
      Represents the Id attribute of the input element.
      void setMonthValue(com.aspose.html.internal.ms.System.DateTime value)
      This method is used to set DateTime object as a value for input element.
      void setName(String value)
      Represent the name attribute of the input element.
      void setNumberValue(float value)
      This method is used to set number as a value for input element.
      void setPasswordValue(String value)
      This method is used to set password string as a value for input element.
      void setRadioValue(boolean value)
      Sets the checkedness state for the input element with the radio type.
      void setTimeValue(com.aspose.html.internal.ms.System.TimeSpan value)
      This method is used to set TimeSpan object as a value for input element.
      void setType(int value)
      Type of the form control.
      void setUrlValue(Url value)
      This method is used to set Url object as a value for input element.
      void setValue(String value)
      Represents the string value of the input element that is directly mapped to the 'value' attribute.
      void setWeekValue(String value)
      This method is used to set 'week' string as a value for input element.
      • Methods inherited from class com.aspose.html.forms.FormElementBase

        getElementType
    • Constructor Detail

      • InputElement

        public InputElement(HTMLInputElement element)

        Creates a new instance of the input element associated with the HTMLInputElement

        Parameters:
        element - The HTMLInputElement.
    • Method Detail

      • getName

        public String getName()

        Represent the name attribute of the input element.

        Overrides:
        getName in class com.aspose.html.forms.FormElementBase
      • setName

        public void setName(String value)

        Represent the name attribute of the input element.

        Overrides:
        setName in class com.aspose.html.forms.FormElementBase
      • getId

        public String getId()

        Represents the Id attribute of the input element.

        Overrides:
        getId in class com.aspose.html.forms.FormElementBase
      • setId

        public void setId(String value)

        Represents the Id attribute of the input element.

        Overrides:
        setId in class com.aspose.html.forms.FormElementBase
      • getValue

        public String getValue()

        Represents the string value of the input element that is directly mapped to the 'value' attribute.

        Overrides:
        getValue in class com.aspose.html.forms.FormElementBase
      • setValue

        public void setValue(String value)

        Represents the string value of the input element that is directly mapped to the 'value' attribute.

        Overrides:
        setValue in class com.aspose.html.forms.FormElementBase
      • getType

        public int getType()

        Type of the form control.

      • setType

        public void setType(int value)

        Type of the form control.

      • getUrlValue

        public Url getUrlValue()

        This method is used to get the value as Url object. This method is valid if only only type of the input element is "url"

        Returns:
        The field value as url.
      • setUrlValue

        public void setUrlValue(Url value)

        This method is used to set Url object as a value for input element. This method is valid if only the type of the input element is "url"

        Parameters:
        value - The url value.
      • getEmailValue

        public String getEmailValue()

        This method is used to get the value as an email string object. This method is valid if only only type of the input element is "email"

        Returns:
        The email.
      • setEmailValue

        public void setEmailValue(String value)

        This method is used to set email string as a value for input element. This method is valid if only the type of the input element is "email"

        Parameters:
        value - The email.
      • getPasswordValue

        public String getPasswordValue()

        This method is used to get the value as a password string object. This method is valid if only only type of the input element is "password"

        Returns:
        The password.
      • setPasswordValue

        public void setPasswordValue(String value)

        This method is used to set password string as a value for input element. This method is valid if only the type of the input element is "password"

        Parameters:
        value - The password.
      • getDateValue

        public com.aspose.html.internal.ms.System.DateTime getDateValue()

        This method is used to get the value as a DateTime object. This method is valid if only only type of the input element is "date"

        Returns:
        The date object.
      • setDateValue

        public void setDateValue(com.aspose.html.internal.ms.System.DateTime value)

        This method is used to set DateTime object as a value for input element. This method is valid if only the type of the input element is "date"

        Parameters:
        value - The date object.
      • getMonthValue

        public com.aspose.html.internal.ms.System.DateTime getMonthValue()

        This method is used to get the value as a DateTime object. This method is valid if only only type of the input element is "month"

        Returns:
        The date object.
      • setMonthValue

        public void setMonthValue(com.aspose.html.internal.ms.System.DateTime value)

        This method is used to set DateTime object as a value for input element. This method is valid if only the type of the input element is "month"

        Parameters:
        value - The date object.
      • getWeekValue

        public String getWeekValue()

        This method is used to get the value as a week string. This method is valid if only only type of the input element is "week"

        Returns:
        The week value.
      • setWeekValue

        public void setWeekValue(String value)

        This method is used to set 'week' string as a value for input element. This method is valid if only the type of the input element is "week"

        Parameters:
        value - The week value.
      • getTimeValue

        public com.aspose.html.internal.ms.System.TimeSpan getTimeValue()

        This method is used to get the value as a TimeSpan object. This method is valid if only only type of the input element is "time"

        Returns:
        The TimeSpan object.
      • setTimeValue

        public void setTimeValue(com.aspose.html.internal.ms.System.TimeSpan value)

        This method is used to set TimeSpan object as a value for input element. This method is valid if only the type of the input element is "time"

        Parameters:
        value - The TimeSpan object.
      • getDateTimeLocalValue

        public com.aspose.html.internal.ms.System.DateTime getDateTimeLocalValue()

        This method is used to get the value as a DateTime object object. This method is valid if only only type of the input element is "datetime-local"

        Returns:
        The date object.
      • setDateTimeLocalValue

        public void setDateTimeLocalValue(com.aspose.html.internal.ms.System.DateTime value)

        This method is used to set DateTime object as a value for input element. This method is valid if only the type of the input element is "datetime-local"

        Parameters:
        value - The date object.
      • getNumberValue

        public float getNumberValue()

        This method is used to get the value as a number. This method is valid if only only type of the input element is "number"

        Returns:
        The number object.
      • setNumberValue

        public void setNumberValue(float value)

        This method is used to set number as a value for input element. This method is valid if only the type of the input element is "number"

        Parameters:
        value - The number object.
      • getColorValue

        public com.aspose.html.internal.ms.System.Drawing.Color getColorValue()

        This method is used to get the value as a color. This method is valid if only only type of the input element is "color"

        Returns:
        The color object.
      • setColorValue

        public void setColorValue(com.aspose.html.internal.ms.System.Drawing.Color value)

        This method is used to set color as a value for input element. This method is valid if only the type of the input element is "color"

        Parameters:
        value - The color object.
      • getCheckboxValue

        public boolean getCheckboxValue()

        Returns the checkedness state for the input element with the Checkbox type .

        Returns:
        The checkedness state.
      • setCheckboxValue

        public void setCheckboxValue(boolean value)

        Sets the checkedness state for the input elemen with the Checkbox type.

        Parameters:
        value - The checkedness.
      • getRadioValue

        public boolean getRadioValue()

        Returns the checkedness state for the input element with the radio type.

        Returns:
        The checkedness.
      • setRadioValue

        public void setRadioValue(boolean value)

        Sets the checkedness state for the input element with the radio type.

        Parameters:
        value - The checkedness.
      • addFile

        public void addFile(String uri)

        This method adds files to the HTMLInputElement.Files(HTMLInputElement.getFiles()) collection which will be sent during the next web request.

        Parameters:
        uri - The file path.