Free tutorials for Java, Eclipse and Web programming



Follow me on twitter

Eclipse JFace Databinding - Tutorial

Lars Vogel

Version 0.8

21.06.2010

Revision History
Revision 0.123.05.2008Lars Vogel
Created Article
Revision 0.225.12.2008Lars Vogel
Renamed projects, included ControlDecoration
Revision 0.322.03.2009Lars Vogel
Moved model to separate plugin
Revision 0.423.03.2009Lars Vogel
Introduced listviewer
Revision 0.510.06.2009Lars Vogel
Updated to Eclipse 3.5 (Galileo)
Revision 0.602.02.2010Lars Vogel
improved EMF
Revision 0.723.02.2010Lars Vogel
fixed typo
Revision 0.821.06.2010Lars Vogel
Update to Eclipse 3.6

Eclipse JFace Databinding

This article explains Eclipse JFace Databinding which can be used to automatically synchronize changes between the data model and the UI. This article is based on Eclipse 3.6 (Helios) and Java 1.6.


Table of Contents

1. Eclipse Data Binding - Overview
2. Domain Model
2.1. Overview
3. Data Binding with SWT controls
3.1. RCP project
3.2. Model dependencies
3.3. Eclipse Databinding dependencies
3.4. UserInterface
3.5. Run
4. JFace Databinding
4.1. Overview
4.2. JFace Listviewer
5. Using Eclipse Data Binding with Pojos
5.1. Overview
5.2. Example
6. Customer Validations and ControlDecoration
7. Eclipse Data Binding with EMF
8. Thank you
9. Questions and Discussion
10. Links and Literature
10.1. Source Code
10.2. Eclipse DataBinding Resources
10.3. vogella Resources

1. Eclipse Data Binding - Overview

Eclipse DataBinding connects your domain model and the user interface. Changes in both will be automatically synchronized. You can use data validators to verify data changes and converters to convert the data between the UI and the domain model. The following assumes that you are familiar with Eclipse RCP development.

Out example is an application which displays the data of a person and lets you change the person in the UI. Can you also trigger a direct change in the model via a button. Changes in the UI and the model will be synchronized with each other.