Class Checkbox

java.lang.Object
com.groiss.gui.AbstractComponent
com.groiss.gui.component.Checkbox
All Implemented Interfaces:
Component, Serializable, Cloneable

public class Checkbox extends AbstractComponent
A HTML Checkbox, <input type=checkbox ...
See Also:
  • Constructor Details

    • Checkbox

      public Checkbox()
      Constructs a new Checkbox.
    • Checkbox

      public Checkbox(String name, String value)
      Constructs a new Checkbox with name and value.
      Parameters:
      name - the group where the checkbox belongs to
      value - the value of the checkbox
    • Checkbox

      public Checkbox(String name, String value, boolean checked)
      Constructs a new Checkbox with name and value.
      Parameters:
      name - the group where the checkbox belongs to
      value - the value of the checkbox
      checked - whether the checkbos is initially checked
    • Checkbox

      public Checkbox(String name, String value, boolean checked, String styleClass)
      Constructs a new Checkbox with name and value.
      Parameters:
      name - the group where the checkbox belongs to
      value - the value of the checkbox
      checked - whether the checkbos is initially checked
      styleClass - the name of a CSS class
  • Method Details

    • setChecked

      public void setChecked(boolean checked)
      sets wheter the checkbox is checked or not
      Parameters:
      checked - - the checked-mode of the radioButton
    • isChecked

      public boolean isChecked()
    • setValue

      public void setValue(String value)
      sets the value of the checkbox
      Parameters:
      value - - the value of the checkbox
    • getValue

      public String getValue()
    • setContent

      public void setContent(Object o)
      Set the value of the checkbox
      Specified by:
      setContent in interface Component
      Overrides:
      setContent in class AbstractComponent
      Parameters:
      o - any object where the string representation is used for rendering
    • getContent

      public Object getContent()
      Specified by:
      getContent in interface Component
      Overrides:
      getContent in class AbstractComponent
      Returns:
      - the content object of the component