Free tutorials for Java, Eclipse and Web programming



Follow me on twitter

Eclipse Forms API - Tutorial

Lars Vogel

Version 0.3

27.11.2010

Revision History
Revision 0.103.05.2009Lars Vogel
created
Revision 0.327.11.2010Lars Vogel
bug fixes and enhancements

Eclipse Forms API

This article describes how to build User Interfaces using Eclipse Forms.


Table of Contents

1. Eclipse Forms
1.1. Overview
1.2. Form / ScrolledForm
2. Forms Example
2.1. First Example
2.2. Adding command to the menu
3. Thank you
4. Questions and Discussion
5. Links and Literature
5.1. Source Code
5.2. vogella Resources

1. Eclipse Forms

1.1. Overview

Eclipse supports a web-like user interface style, called Eclipse Forms. Eclipse Forms is a plugin based on SWT and JFace that provides the support for creating portable web-style user interfaces across all Eclipse UI categories. The Eclipse forms functionality is contained in the plugin "org.eclipse.ui.forms".

The class FormToolkit serves as a factory for the creation of the required user interface elements. This factory adjust the look and and feel of the standard SWT and JFace elements to the Forms API. Existing UI elements can be enhanced to the form API via the method adapt(Composite).

1.2. Form / ScrolledForm

FormToolkit provides Form or ScrollForm which are serves as the frame for the user interface elements. They provide a header, a toolbar and a body. The body can get accessed via getBody() and contains other ui elements.