Package org.eclipse.pde.ui.templates
Class AbstractChoiceOption
- java.lang.Object
- 
- org.eclipse.pde.ui.templates.TemplateField
- 
- org.eclipse.pde.ui.templates.TemplateOption
- 
- org.eclipse.pde.ui.templates.AbstractChoiceOption
 
 
 
- 
- Direct Known Subclasses:
- ComboChoiceOption,- RadioChoiceOption
 
 public abstract class AbstractChoiceOption extends TemplateOption Abstract implementation of the TemplateOption that allows users to choose a value from the fixed set of options.- Since:
- 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description AbstractChoiceOption(BaseOptionTemplateSection section, String name, String label, String[][] choices)Constructor for AbstractChoiceOption.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected CompositecreateComposite(Composite parent, int span)protected GridDatafill(Control control, int span)StringgetChoice()Returns the string value of the current choice.protected booleanisBlocked()protected voidselectChoice(String choice)protected abstract voidselectOptionChoice(String choice)voidsetEnabled(boolean enabled)Sets the enabled state of this option.protected abstract voidsetOptionEnabled(boolean enabled)protected abstract voidsetOptionValue(Object value)voidsetValue(Object value)Implements the superclass method by passing the new value to the option's widget.protected voidsetValue(Object value, boolean updateControl)Implements the superclass method by passing the new value to the option's widget; updates to the combo can be supressed.- 
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.TemplateFieldcreateControl, createLabel, getLabel, getSection, setLabel
 
- 
 
- 
- 
- 
Field Detail- 
fChoicesprotected String[][] fChoices 
 
- 
 - 
Constructor Detail- 
AbstractChoiceOptionpublic AbstractChoiceOption(BaseOptionTemplateSection section, String name, String label, String[][] choices) Constructor for AbstractChoiceOption.- 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. 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- 
getChoicepublic String getChoice() Returns the string value of the current choice.- Returns:
- the current choice or null if not initialized.
 
 - 
setValuepublic void setValue(Object value) Implements the superclass method by passing the new value to the option's widget.- Overrides:
- setValuein class- TemplateOption
- Parameters:
- value- the new value.
 
 - 
setValueprotected void setValue(Object value, boolean updateControl) Implements the superclass method by passing the new value to the option's widget; updates to the combo can be supressed.- Parameters:
- value- the new value.
- updateControl- true to have the Combo's displayed value updated too, false to indicate that this isn't necessary.
- Since:
- 3.4
 
 - 
setOptionValueprotected abstract void setOptionValue(Object value) 
 - 
setEnabledpublic void setEnabled(boolean enabled) Description copied from class:TemplateOptionSets the enabled state of this option. The action presentation of the enabled state depends on the implementing option.- Overrides:
- setEnabledin class- TemplateOption
- Parameters:
- enabled- the new enabled state
 
 - 
setOptionEnabledprotected abstract void setOptionEnabled(boolean enabled) 
 - 
selectChoiceprotected void selectChoice(String choice) 
 - 
selectOptionChoiceprotected abstract void selectOptionChoice(String choice) 
 - 
isBlockedprotected boolean isBlocked() 
 
- 
 
-