public abstract class AbstractChoiceOption extends TemplateOption
Constructor and Description |
---|
AbstractChoiceOption(BaseOptionTemplateSection section,
String name,
String label,
String[][] choices)
Constructor for AbstractChoiceOption.
|
Modifier and Type | Method and Description |
---|---|
protected Composite |
createComposite(Composite parent,
int span) |
protected GridData |
fill(Control control,
int span) |
String |
getChoice()
Returns the string value of the current choice.
|
protected boolean |
isBlocked() |
protected void |
selectChoice(String choice) |
protected abstract void |
selectOptionChoice(String choice) |
void |
setEnabled(boolean enabled)
Sets the enabled state of this option.
|
protected abstract void |
setOptionEnabled(boolean enabled) |
protected abstract void |
setOptionValue(Object value) |
void |
setValue(Object value)
Implements the superclass method by passing the new value to the option's
widget.
|
protected 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.
|
getMessageLabel, getName, getValue, isEmpty, isEnabled, isRequired, setName, setRequired
createControl, createLabel, getLabel, getSection, setLabel
protected String[][] fChoices
public AbstractChoiceOption(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 String getChoice()
public void setValue(Object value)
setValue
in class TemplateOption
value
- the new value.protected void setValue(Object value, boolean updateControl)
value
- the new value.updateControl
- true to have the Combo's displayed value updated too, false to
indicate that this isn't necessary.protected abstract void setOptionValue(Object value)
public void setEnabled(boolean enabled)
TemplateOption
setEnabled
in class TemplateOption
enabled
- the new enabled stateprotected abstract void setOptionEnabled(boolean enabled)
protected void selectChoice(String choice)
protected abstract void selectOptionChoice(String choice)
protected boolean isBlocked()
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.