Class BooleanOption

public class BooleanOption extends TemplateOption
This implementation of the TemplateOption can be used to represent options that are boolean choices. Option provides the appropriate visual presentation that allows users to set the boolean value of the option.
  • Constructor Details

    • BooleanOption

      public BooleanOption(BaseOptionTemplateSection section, String name, String label)
      The constructor of the option.
      section - the parent section
      name - the unique name
      label - the presentable label of the option
  • Method Details

    • isSelected

      public boolean isSelected()
      Returns the current state of the option.
      true of the option is selected, false otherwise.
    • setSelected

      public void setSelected(boolean selected)
      Changes the current state of the option to the provided state.
      selected - the new state of the option
    • setValue

      public void setValue(Object value)
      Implementation of the superclass method that updates the option's widget with the new value.
      setValue in class TemplateOption
      value - the new option value
    • createControl

      public void createControl(Composite parent, int span)
      Creates the boolean option control. Option reserves the right to modify the actual widget used as long as the user can modify its boolean state.
      Specified by:
      createControl in class TemplateField
      parent - the parent composite of the option widget
      span - the number of columns that the widget should span
    • setEnabled

      public void setEnabled(boolean enabled)
      Implementatin of the superclass method that updates the option widget with the new enabled state.
      setEnabled in class TemplateOption
      enabled - the new enabled state.