| |
|
| java.lang.Object org.eclipse.pde.ui.templates.TemplateField org.eclipse.pde.ui.templates.TemplateOption org.eclipse.pde.ui.templates.StringOption
StringOption | public class StringOption extends TemplateOption (Code) | | This template option can be used to collect string option from the user in
the template section wizard page.
since: 2.0 |
Method Summary | |
public void | createControl(Composite parent, int span) Creates the string option control. | public String | getText() A utility version of the getValue() method that converts
the current value into the String object. | public boolean | isEmpty() A string option is empty if its text field contains no text. | public void | setEnabled(boolean enabled) Implements the superclass method by passing the enabled state to the
option's widget. | public void | setReadOnly(boolean readOnly) | public void | setText(String newText) A utility version of the setValue method that accepts
String objects. | public void | setValue(Object value) |
StringOption | public StringOption(BaseOptionTemplateSection section, String name, String label)(Code) | | The constructor.
Parameters: section - the parent section Parameters: name - the unique option name Parameters: label - the translatable label of the option |
createControl | public void createControl(Composite parent, int span)(Code) | | Creates the string option control.
Parameters: parent - parent composite of the string option widget Parameters: span - the number of columns that the widget should span |
getText | public String getText()(Code) | | A utility version of the getValue() method that converts
the current value into the String object.
the string version of the current value. |
isEmpty | public boolean isEmpty()(Code) | | A string option is empty if its text field contains no text.
true if there is no text in the text field. |
setEnabled | public void setEnabled(boolean enabled)(Code) | | Implements the superclass method by passing the enabled state to the
option's widget.
Parameters: enabled - |
setReadOnly | public void setReadOnly(boolean readOnly)(Code) | | Update the text widget style to be read only
Added to default style (does not override)
Parameters: readOnly - |
setText | public void setText(String newText)(Code) | | A utility version of the setValue method that accepts
String objects.
Parameters: newText - the new text value of the option See Also: StringOption.setValue(Object) |
setValue | public void setValue(Object value)(Code) | | Implements the superclass method by passing the string value of the new
value to the widget
Parameters: value - the new option value |
|
|
|