Package org.eclipse.pde.ui.templates
Class RadioChoiceOption
- java.lang.Object
- 
- org.eclipse.pde.ui.templates.TemplateField
- 
- org.eclipse.pde.ui.templates.TemplateOption
- 
- org.eclipse.pde.ui.templates.AbstractChoiceOption
- 
- org.eclipse.pde.ui.templates.RadioChoiceOption
 
 
 
 
- 
 public class RadioChoiceOption extends AbstractChoiceOption Implementation of the AbstractTemplateOption that allows users to choose a value from the fixed set of options using radio buttons.- Since:
- 3.2
 
- 
- 
Field Summary- 
Fields inherited from class org.eclipse.pde.ui.templates.AbstractChoiceOptionfChoices
 
- 
 - 
Constructor SummaryConstructors Constructor Description RadioChoiceOption(BaseOptionTemplateSection section, String name, String label, String[][] choices)Constructor for RadioChoiceOption.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateControl(Composite parent, int span)Subclasses must implement this method to create the control of the template field.protected voidselectOptionChoice(String choice)protected voidsetOptionEnabled(boolean enabled)protected voidsetOptionValue(Object value)- 
Methods inherited from class org.eclipse.pde.ui.templates.AbstractChoiceOptioncreateComposite, fill, getChoice, isBlocked, selectChoice, setEnabled, setValue, setValue
 - 
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- 
RadioChoiceOptionpublic RadioChoiceOption(BaseOptionTemplateSection section, String name, String label, String[][] choices) Constructor for RadioChoiceOption. Number of choices must be 2, otherwise an assertion will fail.- Parameters:
- section- the parent section.
- name- the unique name
- label- the presentable label
- choices- the list of choices from which the value can be chosen. This list must be of size 2. Each array entry should be an array of size 2, where position 0 will be interpeted as the choice unique name, and position 1 as the choice presentable label.
 
 
- 
 - 
Method Detail- 
createControlpublic void createControl(Composite parent, int span) Description copied from class:TemplateFieldSubclasses must implement this method to create the control of the template field.- Specified by:
- createControlin class- TemplateField
- Parameters:
- parent- the parent composite the control should be created in
- span- number of columns that the control should span
 
 - 
setOptionValueprotected void setOptionValue(Object value) - Specified by:
- setOptionValuein class- AbstractChoiceOption
 
 - 
setOptionEnabledprotected void setOptionEnabled(boolean enabled) - Specified by:
- setOptionEnabledin class- AbstractChoiceOption
 
 - 
selectOptionChoiceprotected void selectOptionChoice(String choice) - Specified by:
- selectOptionChoicein class- AbstractChoiceOption
 
 
- 
 
-