Class Checkbox


public final class Checkbox extends Choice
Represents a HTML form's checkbox element.
  • Constructor Details

    • Checkbox

      public Checkbox(String name, String value, boolean selected)
      Creates a new checkbox object.
      Parameters:
      name - the field name
      value - the value of this choice item
      selected - true is this choice is originally selected
    • Checkbox

      public Checkbox(String name, String value)
      Constructs a new unselected checkbox with the specified value and HTML text.
      Parameters:
      name - the name of this choice
      value - the value of this choice item
    • Checkbox

      public Checkbox(String name, boolean selected)
      Constructs a new checkbox which is selected/unselected as specified.
      Parameters:
      name - the name of this choice
      selected - true to select this checkbox.
    • Checkbox

      public Checkbox(String name)
      Constructs a new unselected checkbox with no separate value attribute
      Parameters:
      name - the name of this choice
  • Method Details