public abstract class TemplateOption extends TemplateField
| Constructor and Description |
|---|
TemplateOption(BaseOptionTemplateSection section,
String name,
String label)
Creates a new option for the provided template section.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMessageLabel()
Returns the label of this option that can be presented in the messages to
the user.
|
String |
getName()
Returns the unique name of this option
|
Object |
getValue()
Returns the value of this option.
|
boolean |
isEmpty()
Returns whether this option is currently empty.
|
boolean |
isEnabled()
Returns whether this option is enabled.
|
boolean |
isRequired()
Returns whether this option is required (cannot be empty)
|
void |
setEnabled(boolean enabled)
Sets the enabled state of this option.
|
void |
setName(String name)
Changes the unique name of this option
|
void |
setRequired(boolean required)
Marks this option as required.
|
void |
setValue(Object value)
Sets the new value of this option.
|
createControl, createLabel, getLabel, getSection, setLabelpublic TemplateOption(BaseOptionTemplateSection section, String name, String label)
section - the parent template sectionname - the unique name of this optionlabel - presentable label of this optionpublic String getName()
public void setName(String name)
name - the new option namepublic Object getValue()
public boolean isEmpty()
public void setRequired(boolean required)
required - the new value of the propertyisEmpty()public boolean isRequired()
public void setValue(Object value)
value - the new valuepublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - the new enabled statepublic String getMessageLabel()
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.