Eclipse WindowBuilder - Creating User Interfaces - Tutorial
Có thể bạn quan tâm
- 1. Using the SWT Designer for visual UI design
- 1.1. Overview of the SWT Designer
- 1.2. Using SWT Designer
- 2. Install SWT Designer
- 3. Optional exercise: Getting started with SWT Designer
- 3.1. Building a user interface
- 3.2. Add a SelectionListener to the button
- 3.3. Review the generated code
- 4. Learn more and get support
- 5. Links and Literature
- 5.1. vogella Java example code
Lars Vogel(c) 2012 - 2025 vogella GmbH :revnumber: 2.5 :revdate: 29.09.2025 :textselfreference: script
Eclipse WindowBuilder. This tutorial describes the usage of WindowBuilder for creating user interfaces.Learn more in our Eclipse RCP training including Instructional Videos
1. Using the SWT Designer for visual UI design
1.1. Overview of the SWT Designer
SWT Designer is a visual editor used to create graphical user interfaces. It is a two-way parser; for example, you can edit the source code or use a graphical editor to modify the user interface. SWT Designer synchronizes between the two representations.
SWT Designer is part of the WindowBuilder project. WindowBuilder provides the foundation and SWT Designer adds the support for working with SWT-based applications.
1.2. Using SWT Designer
SWT Designer provides a special editor. This editor can work with Eclipse 4 parts, SWT and JFace dialogs, JFace wizards, etc.
The following screenshot demonstrates what the editor looks like.
SWT Designer allows you to drag and drop SWT components into an existing layout. You can configure layout settings and create event handlers for your widgets.
SWT Designer contributes additional SWT and JFace templates to the Eclipse IDE. For example, you can use it to create Composites and add these to the Eclipse user interface. To create a new Composite select File New Other… WindowBuilder SWT Designer SWT Composite.
SWT Designer supports establishing data binding via the JFace Data Binding framework.
2. Install SWT Designer
To install SWT Designer use the Help Install New Software menu entry and enter the following update site to use it. https://download.eclipse.org/windowbuilder/latest/
| The WindowBuilder downloads page lists the available SWT designer releases. Typically, the latest release is the best to use. |
3. Optional exercise: Getting started with SWT Designer
| Most exercises in this book use the latest platform API, which SWT Designer does not yet support. Therefore, it is recommended not to use SWT Designer for the rest of the exercises after you finish this one. |
3.1. Building a user interface
Add a new part to your application. The implementation class of this view should be WindowBuilderPlaygroundPart.
| The following exercise assumes that you have SWT Designer already installed. |
Right-click on your WindowBuilderPlaygroundPart class and select Open With WindowBuilder Editor.
| WindowBuilder uses the @PostConstruct method to identify that a class is an Eclipse part. This method needs to specify at least a Composite as parameter. |
Switch to the Design tab in the WindowBuilder editor. This selection is highlighted in the following screenshot.
Use the SWT Designer to change the layout of the Composite of the part to a GridLayout.
Click in the Palette on Button and add a few buttons to your user interface.
Add a Label and a Text field.
3.2. Add a SelectionListener to the button
Assign a SelectionListener (event handler) to one of your buttons for the widgetSelected. You can do this via a right-click on the button. Select Add event handler selection widgetSelected.
3.3. Review the generated code
Switch to the Source tab and review the code generated by the SWT Designer.
4. Learn more and get support
This tutorial continues on Eclipse RCP online training or Eclipse IDE extensions with lots of video material, additional exercises and much more content.
5. Links and Literature
Nothing listed.
5.1. vogella Java example code
-
Java Source examples
-
Eclipse code examples
-
Eclipse RCP code examples
-
Eclipse IDE extensions code examples
-
Maven code examples
-
JUnit / Java testing code examples
If you need more assistance we offer Online Training and Onsite training as well as consulting
See License for license information.
- Tutorials
- Eclipse RCP
- Eclipse IDE
- Eclipse IDE Extensions
- Flutter
- Android Programming
- Web
- Java
- Technology
- Software design
- Code @ GitHub
- Training
- Eclipse RCP Training
- Java Testing Training
- Cross Mobile App Dev. Training
- Git and Gerrit Training
- Self-study Portal
- Other Onsite Training
- Consulting
- Company
- Jobs
- People
- Customers
- Blog
- Books
- Eclipse RCP
- Eclipse IDE
- Contributing to the Eclipse Project
- Git
- Research Projects
- Contact us
- Read Premium Content ...
- Book Onsite or Virtual Training
- Consulting
Từ khóa » Html Design View In Eclipse
-
How Would I Show An HTML Page In Eclipse At Design Time?
-
HTML Editor | Eclipse Plugins, Bundles And Products
-
Creating HTML Files - Eclipse
-
Web Page Editor In Eclipse | Code Factory - YouTube
-
Live Preview In Eclipse - YouTube
-
Coding HTML5 Pages Using Eclipse | Web Age Solutions
-
MyEclipse HTML And JSP Designer - Genuitec
-
Eclipse HTML Plugin Example - Examples Java Code Geeks - 2022
-
Eclipse HTML Editor Tutorial - Examples Java Code Geeks - 2022
-
Working With HTML5 In Eclipse Juno | HTML Goodies
-
Web Application Development: Using The Web Page Editor Palette
-
Alias Screen Designer For Eclipse - Sun I-tech
-
How To View Html Source Code In Eclipse - Kylo
-
Can You Make Simple Web Page Projects In HTML With Eclipse?