Package org.eclipse.pde.ui.templates
Class TemplateField
- java.lang.Object
- 
- org.eclipse.pde.ui.templates.TemplateField
 
- 
- Direct Known Subclasses:
- TemplateOption
 
 public abstract class TemplateField extends Object The base class for all the template option fields. Template option is a single editable option that is exposed to the users in the wizard pages associated with templates. Although the field is associated with the template section, there is no 1/1 mapping between the field and the substitution value that can be used in the template files. In general, a subclass of this class can generate any SWT control in the provided composite.- Since:
- 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description TemplateField(BaseOptionTemplateSection section, String label)The constructor for the field.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcreateControl(Composite parent, int span)Subclasses must implement this method to create the control of the template field.protected LabelcreateLabel(Composite parent, int span)Factory method that creates the label in the provided parent.StringgetLabel()Returns the field label.BaseOptionTemplateSectiongetSection()Returns the template section that owns this option field.voidsetLabel(String label)Changes the label of this field.
 
- 
- 
- 
Constructor Detail- 
TemplateFieldpublic TemplateField(BaseOptionTemplateSection section, String label) The constructor for the field.- Parameters:
- section- the section that owns this field
- label- the label of this field
 
 
- 
 - 
Method Detail- 
getLabelpublic String getLabel() Returns the field label.- Returns:
- field label
 
 - 
setLabelpublic void setLabel(String label) Changes the label of this field.- Parameters:
- label- the new label of this field.
 
 - 
getSectionpublic BaseOptionTemplateSection getSection() Returns the template section that owns this option field.- Returns:
- parent template section
 
 - 
createLabelprotected Label createLabel(Composite parent, int span) Factory method that creates the label in the provided parent.- Parameters:
- parent- the parent composite to create the label in
- span- number of columns that the label should span
- Returns:
- the newly created Label widget.
 
 - 
createControlpublic abstract void createControl(Composite parent, int span) Subclasses must implement this method to create the control of the template field.- Parameters:
- parent- the parent composite the control should be created in
- span- number of columns that the control should span
 
 
- 
 
-