com.ibm.as400.util.html
Class ToggleFormInput

java.lang.Object
  extended by com.ibm.as400.util.html.HTMLTagAttributes
      extended by com.ibm.as400.util.html.FormInput
          extended by com.ibm.as400.util.html.ToggleFormInput
All Implemented Interfaces:
HTMLTagElement, 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:

See Also:
Serialized Form

Constructor Summary
Constructor and Description
ToggleFormInput()
          Constructs a default ToggleFormInput object.
ToggleFormInput(String label)
          Constructs a ToggleFormInput object with the specified viewable text label.
ToggleFormInput(String label, boolean checked)
          Constructs a ToggleFormInput object with the specified viewable text label and initial checked value.
 
Method Summary
Modifier and Type Method and Description
 String getLabel()
          Returns the viewable text label for the toggle.
 boolean isChecked()
          Indicates if the toggle is initialized to checked.
 void setChecked(boolean checked)
          Sets whether the toggle is initialized to being checked.
 void setLabel(String label)
          Sets the viewable text label for the toggle.
 
Methods inherited from class com.ibm.as400.util.html.FormInput
addVetoableChangeListener, getDirection, getLanguage, getName, getSize, getValue, removeVetoableChangeListener, setDirection, setLanguage, setName, setSize, setValue, toString
 
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.as400.util.html.HTMLTagElement
getFOTag, getTag
 

Constructor Detail

ToggleFormInput

public ToggleFormInput()
Constructs a default ToggleFormInput object.


ToggleFormInput

public ToggleFormInput(String label)
Constructs a ToggleFormInput object with the specified viewable text label.

Parameters:
label - The viewable text label.

ToggleFormInput

public ToggleFormInput(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 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 PropertyVetoException
Sets whether the toggle is initialized to being checked.

Parameters:
checked - true if initialized to checked; false otherwise. The default is false.
Throws:
PropertyVetoException - If a change is vetoed.

setLabel

public void setLabel(String label)
              throws PropertyVetoException
Sets the viewable text label for the toggle.

Parameters:
label - The viewable text label.
Throws:
PropertyVetoException - If a change is vetoed.