public class BooleanOption extends TemplateOption
Constructor and Description |
---|
BooleanOption(BaseOptionTemplateSection section,
String name,
String label)
The constructor of the option.
|
Modifier and Type | Method and Description |
---|---|
void |
createControl(Composite parent,
int span)
Creates the boolean option control.
|
boolean |
isSelected()
Returns the current state of the option.
|
void |
setEnabled(boolean enabled)
Implementatin of the superclass method that updates the option widget
with the new enabled state.
|
void |
setSelected(boolean selected)
Changes the current state of the option to the provided state.
|
void |
setValue(Object value)
Implementation of the superclass method that updates the option's widget
with the new value.
|
getMessageLabel, getName, getValue, isEmpty, isEnabled, isRequired, setName, setRequired
createLabel, getLabel, getSection, setLabel
public BooleanOption(BaseOptionTemplateSection section, String name, String label)
section
- the parent sectionname
- the unique namelabel
- the presentable label of the optionpublic boolean isSelected()
public void setSelected(boolean selected)
selected
- the new state of the optionpublic void setValue(Object value)
setValue
in class TemplateOption
value
- the new option valuepublic void createControl(Composite parent, int span)
createControl
in class TemplateField
parent
- the parent composite of the option widgetspan
- the number of columns that the widget should spanpublic void setEnabled(boolean enabled)
setEnabled
in class TemplateOption
enabled
- the new enabled state.
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.