First of all, I like GFace SWT components. I'm using
mostly DatePickerCombo. I also found SearchBox is like
component I made couple years ago for my needs using
Swing API. Only differences between those two
components I implemented in component which I named
ObjectSearchBox. I needed also GFace components work
with JFace Databinding API introduced in Eclipse 3.2.
Result of that work will be attached with this message.
I want to share my work with author of GFace components
so he can put those features in official release of GFace.
You will find DataBindingFactory wich is modified
version from databinding examples to use classes which
supports databinding for GFace SWT components. Use of
databinding then is simple and it is like for other SWT
components.
Usage example:
SomeModelObject smo = new SomeModelObject() {
Date dateOfDocument;
Partner partner;
// Class contains getter and setter methods for
// dateOfDocument and partner
}
DatePickerCombo dateChooser = ...
ObjectSearchBox partnerChooser = ...
DataBindingContext dbc =
BindingFactory.createContext(container,
DataBindingContext.TIME_LATE);
dbc.bind(dateChooser, new Property(smo,
"dateOfDocument", null);
dbc.bind(partnerChooser, new Property(smo, "partner")m
null);
...
That's all.
Databinding support for some GFace components