Quick start to the Eclipse form program

Source: Internet
Author: User

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();
}
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.