Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [Databinding] - Custom Widgets(Creating a custom Observable For Widget)
[Databinding] - Custom Widgets [message #560228] Tue, 21 September 2010 15:37
eshvar60  is currently offline eshvar60 Friend
Messages: 51
Registered: March 2010
Ok Guys, I have been racking my head around this problem for 2 days now and I need your help.

I wrote a custom widget which consists of a couple of SWT Widgets(Spinner, Text and etc...). Anytime one of these is modified in value an attribute of type long in my widget class is updated.

Now I am using databinding to connect this value to my model. So I wrote a custom WidgetValueProperty with the correct doGetValue/doSetValue methods and my model updates just fine.

The problem I am having is that my bindings all have a change listener attached to them to set my editor's dirty state onchange. The UI elements that have an observable created via SWTObservables all fire a change event when modified. My custom widget does not.

So I am guessing I need to override the wrapObservable method of the WidgetValueProperty but I don't know what I am suppose to put in place of the SWTObservableValueDecorator.

Does anyone have ideas on how to properly implement this?

Previous Topic:Insert Text in Editor
Next Topic:Content proposal and tab navigation
Goto Forum:

Current Time: Fri Jun 22 03:57:40 GMT 2018

Powered by FUDForum. Page generated in 0.01488 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top