1. Introduction
The Eclipse form is a new feature of Eclipse 3.0.
The Eclipse form is a set of custom widgets and support classes that were used internally by the PDE and update components and have become public APIs in Eclipse 3.0.
The Eclipse form provides:
• The "Form" concept for inclusion in the content area (editor or view)
• Tool kits for managing colors, hyperlink groups, and other form appearance like SWT controls
• New layout manager with layout like HTML table
• Custom controls (hyperlinks, image links, scrollable composite, etc.) Designed for form
• Each page is a multiple-page editor for a form (just like PDE)
2. Quick Start
(1) HelloWorld example
The following example creates an empty form in the view
public class FormView extends ViewPart {
private FormToolkit toolkit;
private ScrolledForm form;
public void createPartControl(Composite parent) {
toolkit = new FormToolkit(parent.getDisplay());
form = toolkit.createScrolledForm(parent);
form.setText("Hello, Eclipse Forms");
}
public void setFocus() {
form.setFocus();
}
public void dispose() {
toolkit.dispose();
super.dispose();
}
}