1 11 package org.eclipse.pde.ui.templates; 12 import org.eclipse.swt.SWT; 13 import org.eclipse.swt.widgets.Composite; 14 import org.eclipse.swt.widgets.Label; 15 25 public abstract class TemplateField { 26 private BaseOptionTemplateSection section; 27 private String label; 28 36 public TemplateField(BaseOptionTemplateSection section, String label) { 37 this.section = section; 38 this.label = label; 39 } 40 45 public String getLabel() { 46 return label; 47 } 48 54 public void setLabel(String label) { 55 this.label = label; 56 } 57 62 public BaseOptionTemplateSection getSection() { 63 return section; 64 } 65 74 protected Label createLabel(Composite parent, int span) { 75 Label label = new Label(parent, SWT.NULL); 76 label.setText(getLabel()); 77 return label; 78 } 79 88 public abstract void createControl(Composite parent, int span); 89 } 90 | Popular Tags |