|
Eclipse PDE Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.pde.ui.templates.TemplateField
org.eclipse.pde.ui.templates.TemplateOption
org.eclipse.pde.ui.templates.AbstractChoiceOption
Abstract implementation of the TemplateOption that allows users to choose a value from the fixed set of options.
Field Summary | |
---|---|
protected String[][] |
fChoices
|
Constructor Summary | |
---|---|
AbstractChoiceOption(BaseOptionTemplateSection section,
String name,
String label,
String[][] choices)
Constructor for AbstractChoiceOption. |
Method Summary | |
---|---|
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)
Implements the superclass method by updating the enable state of the option's widget. |
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. |
Methods inherited from class org.eclipse.pde.ui.templates.TemplateOption |
---|
getMessageLabel, getName, getValue, isEmpty, isEnabled, isRequired, setName, setRequired |
Methods inherited from class org.eclipse.pde.ui.templates.TemplateField |
---|
createControl, createLabel, getLabel, getSection, setLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String[][] fChoices
Constructor Detail |
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.Method Detail |
public String getChoice()
public void setValue(Object value)
setValue
in class TemplateOption
value
- the new value.protected abstract void setOptionValue(Object value)
public void setEnabled(boolean enabled)
setEnabled
in class TemplateOption
enabled
- the new enabled stateprotected abstract void setOptionEnabled(boolean enabled)
protected GridData fill(Control control, int span)
protected Composite createComposite(Composite parent, int span)
protected void selectChoice(String choice)
protected abstract void selectOptionChoice(String choice)
protected boolean isBlocked()
|
Eclipse PDE Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |