Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » custom UpdateManager in Layer
custom UpdateManager in Layer [message #169044] Mon, 21 February 2005 14:29 Go to next message
Eclipse UserFriend
Originally posted by: kvdijken.tiscali.nl

I want to experiment with a custom UpdateManager in a Layer. How should I
do this?

I tried it by overriding getUpdateManager() in the Layer to return a
custom UpdateManager, but I was unable to get a GraphicsSource to use as
an argument for UpdateManager#setGraphicsSource(). As I understand, this
GraphicsSource should originate somewhere in the Control of the viewer,
but that is a long way from a Layer...

Koen
Re: custom UpdateManager in Layer [message #169100 is a reply to message #169044] Mon, 21 February 2005 16:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Probably, your layer will manage an offscreen Image and some type of
graphicssource on that Image.

"Koen van Dijken" <kvdijken@tiscali.nl> escreveu na mensagem
news:cvcr8j$8r7$1@www.eclipse.org...
>I want to experiment with a custom UpdateManager in a Layer. How should I
>do this?
>
> I tried it by overriding getUpdateManager() in the Layer to return a
> custom UpdateManager, but I was unable to get a GraphicsSource to use as
> an argument for UpdateManager#setGraphicsSource(). As I understand, this
> GraphicsSource should originate somewhere in the Control of the viewer,
> but that is a long way from a Layer...
>
> Koen
>
>
Re: custom UpdateManager in Layer [message #169116 is a reply to message #169100] Mon, 21 February 2005 17:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kvdijken.tiscali.nl

Hi Randy,

No, I am trying to achieve something else. I noticed something with
selecting EditParts which is not very good on large and heavy datasets.

First: instead of FreeformLayer I use a subclassed FreeformLayer which does
not have the origin (0,0) in it. The (0,0) is not nice when you have a
dataset which is located far from the origin (scrollbars). Its
freeformextent is only dependent on the children it has. Then, I discovered
that when selecting an EditPart on the lefttop of the screen is followed by
a selection on the rightbottom of the screen causes a repaint of nearly the
entire screen. That made me to look into the DeferredUpdateManager, where I
found out that all repaint requests are unioned into one big repaint
request. Unfortunately this is not a very good choice for heavy datasets
with two repaint requests which are far apart.

Now I made an UpdateManager which clusters nearby repaint request and
repaints these clusters separately which boosts performance on such type of
datasets. I got this to work when I inject this UpdateManager into the
LightWeightSystem, but I'd prefer to use it in a Layer instead of right at
the top of the Figure heirarchy.

Koen



"Randy Hudson" <none@us.ibm.com> wrote in message
news:cvd1ad$bu7$1@www.eclipse.org...
> Probably, your layer will manage an offscreen Image and some type of
> graphicssource on that Image.
>
> "Koen van Dijken" <kvdijken@tiscali.nl> escreveu na mensagem
> news:cvcr8j$8r7$1@www.eclipse.org...
>>I want to experiment with a custom UpdateManager in a Layer. How should I
>>do this?
>>
>> I tried it by overriding getUpdateManager() in the Layer to return a
>> custom UpdateManager, but I was unable to get a GraphicsSource to use as
>> an argument for UpdateManager#setGraphicsSource(). As I understand, this
>> GraphicsSource should originate somewhere in the Control of the viewer,
>> but that is a long way from a Layer...
>>
>> Koen
>>
>>
>
>
Re: custom UpdateManager in Layer [message #169123 is a reply to message #169116] Mon, 21 February 2005 18:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It sounds like you are just modifying the behavior by adding in another
updatemanager. I don't see why you didn't like replacing the LWS's manager.
Anyway, it sounds like some form of a wrapper, so maybe you can reuse the
outer manager's graphics source?

"Koen van Dijken" <kvdijken@tiscali.nl> escreveu na mensagem
news:cvd77u$9bs$1@www.eclipse.org...
> Hi Randy,
>
> No, I am trying to achieve something else. I noticed something with
> selecting EditParts which is not very good on large and heavy datasets.
>
> First: instead of FreeformLayer I use a subclassed FreeformLayer which
> does not have the origin (0,0) in it. The (0,0) is not nice when you have
> a dataset which is located far from the origin (scrollbars). Its
> freeformextent is only dependent on the children it has. Then, I
> discovered that when selecting an EditPart on the lefttop of the screen is
> followed by a selection on the rightbottom of the screen causes a repaint
> of nearly the entire screen. That made me to look into the
> DeferredUpdateManager, where I found out that all repaint requests are
> unioned into one big repaint request. Unfortunately this is not a very
> good choice for heavy datasets with two repaint requests which are far
> apart.
>
> Now I made an UpdateManager which clusters nearby repaint request and
> repaints these clusters separately which boosts performance on such type
> of datasets. I got this to work when I inject this UpdateManager into the
> LightWeightSystem, but I'd prefer to use it in a Layer instead of right at
> the top of the Figure heirarchy.
>
> Koen
>
>
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:cvd1ad$bu7$1@www.eclipse.org...
>> Probably, your layer will manage an offscreen Image and some type of
>> graphicssource on that Image.
>>
>> "Koen van Dijken" <kvdijken@tiscali.nl> escreveu na mensagem
>> news:cvcr8j$8r7$1@www.eclipse.org...
>>>I want to experiment with a custom UpdateManager in a Layer. How should I
>>>do this?
>>>
>>> I tried it by overriding getUpdateManager() in the Layer to return a
>>> custom UpdateManager, but I was unable to get a GraphicsSource to use as
>>> an argument for UpdateManager#setGraphicsSource(). As I understand, this
>>> GraphicsSource should originate somewhere in the Control of the viewer,
>>> but that is a long way from a Layer...
>>>
>>> Koen
>>>
>>>
>>
>>
>
>
Re: custom UpdateManager in Layer [message #169136 is a reply to message #169123] Mon, 21 February 2005 19:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kvdijken.tiscali.nl

"Randy Hudson" <none@us.ibm.com> wrote in message
news:cvda82$nfp$1@www.eclipse.org...
> It sounds like you are just modifying the behavior by adding in another

Yes.

> updatemanager. I don't see why you didn't like replacing the LWS's
> manager.

Well, at this moment I don't know exactly. It's just because this custom
UpdateManager is optimized for one kind of Layer. Not all kinds of Layers in
this application need this kind of optimization. Maybe it doesn't hurt
either, it is still too early to tell.

> Anyway, it sounds like some form of a wrapper, so maybe you can reuse the
> outer manager's graphics source?

Indeed, I can try to wrap this custom UpdateManager around the LWS's
DeferredUpdateManager and delegate pieces of work to it. I will have a look
at this option, it sounds like a good idea.

Thanks,

Koen



>
> "Koen van Dijken" <kvdijken@tiscali.nl> escreveu na mensagem
> news:cvd77u$9bs$1@www.eclipse.org...
>> Hi Randy,
>>
>> No, I am trying to achieve something else. I noticed something with
>> selecting EditParts which is not very good on large and heavy datasets.
>>
>> First: instead of FreeformLayer I use a subclassed FreeformLayer which
>> does not have the origin (0,0) in it. The (0,0) is not nice when you have
>> a dataset which is located far from the origin (scrollbars). Its
>> freeformextent is only dependent on the children it has. Then, I
>> discovered that when selecting an EditPart on the lefttop of the screen
>> is followed by a selection on the rightbottom of the screen causes a
>> repaint of nearly the entire screen. That made me to look into the
>> DeferredUpdateManager, where I found out that all repaint requests are
>> unioned into one big repaint request. Unfortunately this is not a very
>> good choice for heavy datasets with two repaint requests which are far
>> apart.
>>
>> Now I made an UpdateManager which clusters nearby repaint request and
>> repaints these clusters separately which boosts performance on such type
>> of datasets. I got this to work when I inject this UpdateManager into the
>> LightWeightSystem, but I'd prefer to use it in a Layer instead of right
>> at the top of the Figure heirarchy.
>>
>> Koen
>>
>>
>>
>> "Randy Hudson" <none@us.ibm.com> wrote in message
>> news:cvd1ad$bu7$1@www.eclipse.org...
>>> Probably, your layer will manage an offscreen Image and some type of
>>> graphicssource on that Image.
>>>
>>> "Koen van Dijken" <kvdijken@tiscali.nl> escreveu na mensagem
>>> news:cvcr8j$8r7$1@www.eclipse.org...
>>>>I want to experiment with a custom UpdateManager in a Layer. How should
>>>>I do this?
>>>>
>>>> I tried it by overriding getUpdateManager() in the Layer to return a
>>>> custom UpdateManager, but I was unable to get a GraphicsSource to use
>>>> as an argument for UpdateManager#setGraphicsSource(). As I understand,
>>>> this GraphicsSource should originate somewhere in the Control of the
>>>> viewer, but that is a long way from a Layer...
>>>>
>>>> Koen
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: custom UpdateManager in Layer [message #169151 is a reply to message #169136] Mon, 21 February 2005 19:43 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Feel free to contribute your optimizations :-)
Previous Topic:PropertySource
Next Topic:EDiagram Wizard
Goto Forum:
  


Current Time: Fri Apr 26 09:17:01 GMT 2024

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

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

Back to the top