Package org.eclipse.pde.ui.templates
Class BooleanOption
- java.lang.Object
- 
- org.eclipse.pde.ui.templates.TemplateField
- 
- org.eclipse.pde.ui.templates.TemplateOption
- 
- org.eclipse.pde.ui.templates.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.- Since:
- 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description BooleanOption(BaseOptionTemplateSection section, String name, String label)The constructor of the option.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateControl(Composite parent, int span)Creates the boolean option control.booleanisSelected()Returns the current state of the option.voidsetEnabled(boolean enabled)Implementatin of the superclass method that updates the option widget with the new enabled state.voidsetSelected(boolean selected)Changes the current state of the option to the provided state.voidsetValue(Object value)Implementation of the superclass method that updates the option's widget with the new value.- 
Methods inherited from class org.eclipse.pde.ui.templates.TemplateOptiongetMessageLabel, getName, getValue, isEmpty, isEnabled, isRequired, setName, setRequired
 - 
Methods inherited from class org.eclipse.pde.ui.templates.TemplateFieldcreateLabel, getLabel, getSection, setLabel
 
- 
 
- 
- 
- 
Constructor Detail- 
BooleanOptionpublic BooleanOption(BaseOptionTemplateSection section, String name, String label) The constructor of the option.- Parameters:
- section- the parent section
- name- the unique name
- label- the presentable label of the option
 
 
- 
 - 
Method Detail- 
isSelectedpublic boolean isSelected() Returns the current state of the option.- Returns:
- true of the option is selected, false otherwise.
 
 - 
setSelectedpublic void setSelected(boolean selected) Changes the current state of the option to the provided state.- Parameters:
- selected- the new state of the option
 
 - 
setValuepublic void setValue(Object value) Implementation of the superclass method that updates the option's widget with the new value.- Overrides:
- setValuein class- TemplateOption
- Parameters:
- value- the new option value
 
 - 
createControlpublic 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:
- createControlin class- TemplateField
- Parameters:
- parent- the parent composite of the option widget
- span- the number of columns that the widget should span
 
 - 
setEnabledpublic void setEnabled(boolean enabled) Implementatin of the superclass method that updates the option widget with the new enabled state.- Overrides:
- setEnabledin class- TemplateOption
- Parameters:
- enabled- the new enabled state.
 
 
- 
 
-