1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
public class DocumentationSection extends AbstractPropertySection {
/** The documentation label. */
private CLabel documentationLabel;
/** The textarea. */
private Text documentationText;
/**
* Gets the property category.
*
* @return PropertyCategory The property category used
*/
protected PropertyCategory getPropertyCategory() {
return PropertyCategory.DOCUMENTATION_LITERAL;
}
/**
* Create the controls of the DocumentationSection.
*
* @param parent
* The parent composite
* @param aTabbedPropertySheetPage
* The property sheet page
*/
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
super.createControls (parent, aTabbedPropertySheetPage);
Composite composite = getWidgetFactory ().createFlatFormComposite (parent);
FormData formData = new FormData();
formData.left = new FormAttachment (0, STANDARD_LABEL_WIDTH);
formData.right = new FormAttachment (1, 0);
formData.top = new FormAttachment (0, ITabbedPropertyConstants.VSPACE);
documentationLabel = getWidgetFactory ().createCLabel (composite, "Documentation");
documentationLabel.setLayoutData(formData);
formData = new FormData();
documentationText = new Text(composite, 578);
documentationText.setBackground(parent.getBackground());
formData = new FormData();
formData.height = 150;
formData.width = 400;
documentationText.setLayoutData(formData);
}
} |
Partager