Jump to: navigation, search

Difference between revisions of "JFace Data Binding/Snippets"

(Running the Snippets)
(Running the Snippets)
Line 35: Line 35:
  
 
<p>
 
<p>
A great way to learn is to look at concrete examples that you can run and experiment with. You can clone the eclipse.platform.ui git repository which contains the "org.eclipse.jface.examples.databinding" project with the JFace Databinding examples. For cloning a git repository you can use the [http://eclipse.org/egit/ EGit] tooling of Eclipse.
+
A great way to learn is to look at concrete examples that you can run and experiment with. You can clone the [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/ eclipse.platform.ui git repository] which contains the "org.eclipse.jface.examples.databinding" project with the JFace Databinding examples. For cloning a git repository you can use the [http://eclipse.org/egit/ EGit] tooling of Eclipse.
 
+
Use the following URL to clone the repository.  
+
  
 +
Use the following URL to clone the repository via File -> Import -> Git repository
  
 
* http://anonymous@git.eclipse.org/gitroot/platform/eclipse.platform.ui.git
 
* http://anonymous@git.eclipse.org/gitroot/platform/eclipse.platform.ui.git

Revision as of 16:16, 23 August 2011

JFace Data Binding
Home
How to Contribute
FAQ
Snippets
Concepts
Binding
Converter
Observable
Realm

Snippets show how common use cases can be implemented using the JFace Data Binding framework. They are typically a single self-contained Java class with a main method. See the bottom of this page for instructions on how to get and run the snippets.

Basic

WizardPage

  • Wizard Dialog - Shows how to use data binding in a wizard dialog so that validation results are displayed in the dialog's title area

ComputedValue

  • Spreadsheet - fills a Table updating cells upon change
  • Name Formatter - observable value that updates when the first or last name changes

Bindings

Master Detail

SWT

Viewers

Running the Snippets

A great way to learn is to look at concrete examples that you can run and experiment with. You can clone the eclipse.platform.ui git repository which contains the "org.eclipse.jface.examples.databinding" project with the JFace Databinding examples. For cloning a git repository you can use the EGit tooling of Eclipse. Use the following URL to clone the repository via File -> Import -> Git repository

After you cloned the project the clone wizard will allow you to import the included projects. For the databinding examples you only have to import the "org.eclipse.jface.examples.databinding" project. For an introduction into EGit please see EGit Most of the examples provide a main method, you can run it as a Java Application to see what happens.

You can also copy any of the snippets (see below) into a scratch project within Eclipse. If you are copying single snippets into a scratch project, make sure that it is set up with the correct dependencies. You will need org.eclipse.core.databinding, org.eclipse.core.databinding.beans, and org.eclipse.jface.databinding.