Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse PDE
Release 3.5

org.eclipse.pde.ui.templates
Class TemplateField


java.lang.Object
  extended by 
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 Summary
TemplateField ( BaseOptionTemplateSection section, String label)
          The constructor for the field.
 
Method Summary
abstract  void createControl ( Composite parent, int span)
          Subclasses must implement this method to create the control of the template field.
protected   Label createLabel ( Composite parent, int span)
          Factory method that creates the label in the provided parent.
  String getLabel ()
          Returns the field label.
  BaseOptionTemplateSection getSection ()
          Returns the template section that owns this option field.
 void setLabel ( String label)
          Changes the label of this field.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateField

public 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

getLabel

public 
String getLabel()
Returns the field label.

Returns:
field label

setLabel

public void setLabel(
String label)
Changes the label of this field.

Parameters:
label - the new label of this field.

getSection

public 
BaseOptionTemplateSection getSection()
Returns the template section that owns this option field.

Returns:
parent template section

createLabel

protected 
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.

createControl

public 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

Eclipse PDE
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire