public class ComboChoiceOption extends AbstractChoiceOption
fChoices| Constructor and Description |
|---|
ComboChoiceOption(BaseOptionTemplateSection section,
String name,
String label,
String[][] choices)
Constructor for ComboChoiceOption.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createControl(Composite parent,
int span)
Subclasses must implement this method to create the control of the
template field.
|
protected int |
getIndexOfChoice(String choice)
Get the index (in the collection) of the choice
|
protected void |
selectOptionChoice(String choice) |
protected void |
setOptionEnabled(boolean enabled) |
protected void |
setOptionValue(Object value) |
createComposite, fill, getChoice, isBlocked, selectChoice, setEnabled, setValue, setValuegetMessageLabel, getName, getValue, isEmpty, isEnabled, isRequired, setName, setRequiredcreateLabel, getLabel, getSection, setLabelpublic ComboChoiceOption(BaseOptionTemplateSection section, String name, String label, String[][] choices)
section - the parent section.name - the unique namelabel - the presentable labelchoices - 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.public void createControl(Composite parent, int span)
TemplateFieldcreateControl in class TemplateFieldparent - the parent composite the control should be created inspan - number of columns that the control should spanprotected void setOptionValue(Object value)
setOptionValue in class AbstractChoiceOptionprotected void setOptionEnabled(boolean enabled)
setOptionEnabled in class AbstractChoiceOptionprotected void selectOptionChoice(String choice)
selectOptionChoice in class AbstractChoiceOptionprotected int getIndexOfChoice(String choice)
choice - The key of the item
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.