Home » Eclipse Projects » Eclipse Platform » [Databinding] Modifying properties of bindings in a TableViewer
[Databinding] Modifying properties of bindings in a TableViewer [message #519010] |
Fri, 05 March 2010 11:49  |
Eclipse User |
|
|
|
Most of the databinding documentation/examples I'm finding seem to fall into one of two camps. The first involves binding observables to single widgets via a DataBindingContext. The second involves using a set of IObservableMaps and an ObservableListContentProvider, and having all the databinding done rather automatically.
Now, I'm binding a list of model objects to a TableViewer, but I'd like to alter the default databinding to introduce a delay between updates to the model and updates to the widgets. It's clear to me how such would be handled if I were explicitly binding individual model elements to individual GUI elements, but I'm unclear how to accomplish the same via the ObservableListContentProvider route. I'm most likely missing something obvious. Could anyone point me in the right direction?
|
|
| |
Re: [Databinding] Modifying properties of bindings in a TableViewer [message #519491 is a reply to message #519429] |
Mon, 08 March 2010 15:40   |
Eclipse User |
|
|
|
Ideally, yes, that's what I want. But, if that functionality isn't
available, I was wondering if there's an easy way to bind a TableViewer
using just IObservableValues and a DataBindingContext. Perhaps I should
just take a peek at how difficult it would be to make a patch for #269728.
On 3/8/10 12:54 PM, Ovidio Mallo wrote:
> Hi Anthony,
>
> is the following bug what you're looking for?
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=269728
>
> Unfortunately, this functionality is not implemented yet...
>
> Kind regards,
> Ovidio
>
>
> Anthony Juckel wrote:
>> Most of the databinding documentation/examples I'm finding seem to
>> fall into one of two camps. The first involves binding observables to
>> single widgets via a DataBindingContext. The second involves using a
>> set of IObservableMaps and an ObservableListContentProvider, and
>> having all the databinding done rather automatically.
>>
>> Now, I'm binding a list of model objects to a TableViewer, but I'd
>> like to alter the default databinding to introduce a delay between
>> updates to the model and updates to the widgets. It's clear to me how
>> such would be handled if I were explicitly binding individual model
>> elements to individual GUI elements, but I'm unclear how to accomplish
>> the same via the ObservableListContentProvider route. I'm most likely
>> missing something obvious. Could anyone point me in the right direction?
|
|
|
Re: [Databinding] Modifying properties of bindings in a TableViewer [message #519781 is a reply to message #519491] |
Tue, 09 March 2010 18:11   |
Eclipse User |
|
|
|
What exactly do you want to bind with a certain delay on the
TableViewer? Are you talking about the elements of the table or just the
selection? If you could write up a simple snippet illustrating your
problem, this might help.
Regards,
Ovidio
Anthony Juckel wrote:
> Ideally, yes, that's what I want. But, if that functionality isn't
> available, I was wondering if there's an easy way to bind a TableViewer
> using just IObservableValues and a DataBindingContext. Perhaps I should
> just take a peek at how difficult it would be to make a patch for #269728.
>
> On 3/8/10 12:54 PM, Ovidio Mallo wrote:
>> Hi Anthony,
>>
>> is the following bug what you're looking for?
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=269728
>>
>> Unfortunately, this functionality is not implemented yet...
>>
>> Kind regards,
>> Ovidio
>>
>>
>> Anthony Juckel wrote:
>>> Most of the databinding documentation/examples I'm finding seem to
>>> fall into one of two camps. The first involves binding observables to
>>> single widgets via a DataBindingContext. The second involves using a
>>> set of IObservableMaps and an ObservableListContentProvider, and
>>> having all the databinding done rather automatically.
>>>
>>> Now, I'm binding a list of model objects to a TableViewer, but I'd
>>> like to alter the default databinding to introduce a delay between
>>> updates to the model and updates to the widgets. It's clear to me how
>>> such would be handled if I were explicitly binding individual model
>>> elements to individual GUI elements, but I'm unclear how to accomplish
>>> the same via the ObservableListContentProvider route. I'm most likely
>>> missing something obvious. Could anyone point me in the right direction?
>
|
|
|
Re: [Databinding] Modifying properties of bindings in a TableViewer [message #519815 is a reply to message #519781] |
Tue, 09 March 2010 22:26  |
Eclipse User |
|
|
|
I've pushed a sample up to github at
http://github.com/ajuckel/org.example.emfdb/ It builds off a previous
example, so don't put any effort into understanding the Addressbook
model. The essence of the problem is, I want to display a large
dataset, where some properties of the model may change very rapidly due
to external data. In my example, I've got ten threads, each updating a
value every 10-20 milliseconds. If you run the app, use the view menu
to populate the TableViewer, then use Bind Temps from the view menu to
start the simulated external data.
I cannot simply ignore the data on the model side (I need to acknowledge
every temperature update), but there's no use trying to update the GUI
as often as I get new temperature data. The UI can keep up with 100
Person objects in the table, but the values are completely illegible.
As a stop gap, I can just forego databinding for the rapidly changing
data, and just manually repaint the column(s) at a set interval, but I'd
rather be able to insert reasoning about how to handle updates between
the model and the widget painting. For instance, only update once a
second, but take the highest/lowest/average of the external data that's
arrived within that time frame.
On the other hand, perhaps I'm asking far too much from a general
purpose databinding framework. I could accomplish essentially the same
thing by not binding the UI directly to temperature, for instance, but
rather having something like the following:
Cell <-- SWT Realm --> Intermediate Object <-- Custom Realm --> Model
On 3/9/10 5:11 PM, Ovidio Mallo wrote:
> What exactly do you want to bind with a certain delay on the
> TableViewer? Are you talking about the elements of the table or just the
> selection? If you could write up a simple snippet illustrating your
> problem, this might help.
>
> Regards,
> Ovidio
>
>
|
|
|
Goto Forum:
Current Time: Wed Jul 23 14:07:58 EDT 2025
Powered by FUDForum. Page generated in 0.06260 seconds
|