com.ibm.as400.util.html

Class ToggleFormInput

  • All Implemented Interfaces:
    HTMLTagElement, java.io.Serializable
    Direct Known Subclasses:
    CheckboxFormInput, RadioFormInput


    public abstract class ToggleFormInput
    extends FormInput
    The ToggleFormInput class represents a toggle input type in an HTML form.

    ToggleFormInput objects generate the following events:

    • PropertyChangeEvent
    • VetoableChangeEvent
    See Also:
    Serialized Form
    • Constructor Detail

      • ToggleFormInput

        public ToggleFormInput()
        Constructs a default ToggleFormInput object.
      • ToggleFormInput

        public ToggleFormInput(java.lang.String label)
        Constructs a ToggleFormInput object with the specified viewable text label.
        Parameters:
        label - The viewable text label.
      • ToggleFormInput

        public ToggleFormInput(java.lang.String label,
                       boolean checked)
        Constructs a ToggleFormInput object with the specified viewable text label and initial checked value.
        Parameters:
        label - The viewable text label.
        checked - If the toggle initializes to checked.
    • Method Detail

      • getLabel

        public java.lang.String getLabel()
        Returns the viewable text label for the toggle.
        Returns:
        The viewable text label.
      • isChecked

        public boolean isChecked()
        Indicates if the toggle is initialized to checked.
        Returns:
        true if checked; false otherwise.
      • setChecked

        public void setChecked(boolean checked)
                        throws java.beans.PropertyVetoException
        Sets whether the toggle is initialized to being checked.
        Parameters:
        checked - true if initialized to checked; false otherwise. The default is false.
        Throws:
        java.beans.PropertyVetoException - If a change is vetoed.
      • setLabel

        public void setLabel(java.lang.String label)
                      throws java.beans.PropertyVetoException
        Sets the viewable text label for the toggle.
        Parameters:
        label - The viewable text label.
        Throws:
        java.beans.PropertyVetoException - If a change is vetoed.