Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to paint all Figures at once?
How to paint all Figures at once? [message #167047] Fri, 04 February 2005 20:41 Go to next message
Eclipse UserFriend
Originally posted by: marcelogilman.yahoo.com.ar

I am using GEF as a viewer/editor for many visual objects. These objects
(models) are usually updated behind the scene (without the GEF editor).
When the models are updated the corresponding figures are updated one by
one but
I want to update all at once. Is there any way to get this behavior? I
read about double buffering in Draw2D but I couldn't find the way to use
it (may be it is beeing used).
Any help will be appreciated.
Thanks,
Marcelo.
Re: How to paint all Figures at once? [message #167117 is a reply to message #167047] Sun, 06 February 2005 05:50 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Hmm, that's interesting. I don't think there's a simple way to do that
right now. The best place to do this would be in the UpdateManager. We
should probably add some flag on there so that it doesn't enqueue the
performUpdates() when that flag is set. Another way is for Figures to have
a setting like SWT's setRedraw(boolean) that would allow you to customize
which Figures get updated right away and which don't. And then those
figures would block ignore the repaint() and/or revalidate() calls. But the
figure's interface is bloated enough already, so that might not be the best
place. Feel free to open a feature request regarding this.

For now, I think you can get the same effect if you enqueue all your
notification on the Display thread before you actually notify the listeners.
So, when a resource change or something like that happens causing several
changes in different model objects, do something like:

Display.getDefault().asyncExec(new Runnable() {
public void run() {
// update all model objects here
}
});

"Marcelo" <marcelogilman@yahoo.com.ar> wrote in message
news:cu0mlu$1j7$1@www.eclipse.org...
> I am using GEF as a viewer/editor for many visual objects. These objects
> (models) are usually updated behind the scene (without the GEF editor).
> When the models are updated the corresponding figures are updated one by
> one but
> I want to update all at once. Is there any way to get this behavior? I
> read about double buffering in Draw2D but I couldn't find the way to use
> it (may be it is beeing used).
> Any help will be appreciated.
> Thanks,
> Marcelo.
>
Previous Topic:Why REQ_CLONE is a ChangeBoundsRequest
Next Topic:where is the code that put presentation properties in the flow example
Goto Forum:
  


Current Time: Tue Sep 24 00:33:23 GMT 2024

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

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

Back to the top