Documentation generated
from the Eclipse Help
for the product
Automatic Data Binding Wizard
Supported for Eclipse 3.3
and above only
The JFace Automatic Data Binding wizard can be used
to create new user interface classes (Composites, Dialogs or Windows)
complete with widgets, layouts and data bindings from arbitrary domain model
(bean) classes.
To use the wizard, select the project source folder and package
to contain the class. Then enter the class name and hit the
Next
button.
The org.eclipse.swt.widgets.Composite class is the default
superclass. You can select either
org.eclipse.jface.dialogs.Dialog or org.eclipse.swt.widgets.Shell
as alternative superclasses.
The second page of the wizard is used to specify the bean class, properties
and widgets used for the new user interface. Click the "..." button
to select a bean type. The Properties list will show a list of bindable properties
discovered by inspecting the class (basically any properties with
getter/setter pairs with bindable data types). Next to "..." button is a
filter button that can be use to show other properties that can't be bound
(like class).
The order of the properties may be changed using the Up and Down
buttons or via drag and drop. Check each property that should be bound to a
user interface widget. Only checked properties will appear in the user
interface. For each property, you can select a widget type and update
strategy. String properties will be defaulted to Text widgets
and Boolean properties will be defaulted to Button (CheckBox)
widgets. The update strategy can be bi-directional, from widget to bean,
bean to widget, or nothing. When you are satisfied with your suggestions,
click Finish to generate the class.
The generated user interface will consist of a two-column GridLayout with
labels in the first column and editable widgets (text fields, checkboxes,
spinners, etc.) in the second column. The generated layout is fully editable
in Designer.
Click the
Edit Data Bindings button on the main Designer toolbar to open the Edit Data Bindings
dialog and review the generated bindings. All of the bindings may be edited
and new ones added.