public class StringOption extends TemplateOption
| Constructor and Description |
|---|
StringOption(BaseOptionTemplateSection section,
String name,
String label)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createControl(Composite parent,
int span)
Creates the string option control.
|
String |
getText()
A utility version of the getValue() method that converts
the current value into the String object.
|
boolean |
isEmpty()
A string option is empty if its text field contains no text.
|
void |
setEnabled(boolean enabled)
Implements the superclass method by passing the enabled state to the
option's widget.
|
void |
setText(String newText)
A utility version of the setValue method that accepts
String objects.
|
void |
setValue(Object value)
Implements the superclass method by passing the string value of the new
value to the widget
|
getMessageLabel, getName, getValue, isEnabled, isRequired, setName, setRequiredcreateLabel, getLabel, getSection, setLabelpublic StringOption(BaseOptionTemplateSection section, String name, String label)
section - the parent sectionname - the unique option namelabel - the translatable label of the optionpublic String getText()
public void setText(String newText)
newText - the new text value of the optionsetValue(Object)public void setValue(Object value)
setValue in class TemplateOptionvalue - the new option valuepublic void createControl(Composite parent, int span)
createControl in class TemplateFieldparent - parent composite of the string option widgetspan - the number of columns that the widget should spanpublic boolean isEmpty()
isEmpty in class TemplateOptionpublic void setEnabled(boolean enabled)
setEnabled in class TemplateOptionenabled - Copyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.