Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Changing palettes and maintaining there state
Changing palettes and maintaining there state [message #191439] Wed, 10 August 2005 14:02 Go to next message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Hi,

I change my GEF diagram root based on the user selection in the model out
line view. I also change the tool palette based on this selection.

My problem is that every time a palette is redisplayed by calling
PaletteViewer#setPaleteRoot() it is displayed in it's initial state with
all its draws opened.

Id like to maintain the palette draw state between selections.

Any ideas on how to do this?

Thanks, Steve.
Re: Changing palettes and maintaining there state [message #191451 is a reply to message #191439] Wed, 10 August 2005 14:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

@see PaletteViewer#saveState(Memento)

"Steve Jones" <steve@istech.demon.co.uk> wrote in message
news:ddd1d1$n8g$1@news.eclipse.org...
> Hi,
>
> I change my GEF diagram root based on the user selection in the model out
> line view. I also change the tool palette based on this selection.
>
> My problem is that every time a palette is redisplayed by calling
> PaletteViewer#setPaleteRoot() it is displayed in it's initial state with
> all its draws opened.
>
> Id like to maintain the palette draw state between selections.
>
> Any ideas on how to do this?
>
> Thanks, Steve.
>
Re: Changing palettes and maintaining there state [message #191513 is a reply to message #191451] Wed, 10 August 2005 16:54 Go to previous messageGo to next message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Randy Hudson wrote:

> @see PaletteViewer#saveState(Memento)

I've subclassed PaletteViewer and save & restore the PaletteViewer state
whenever the palette root changes. It works just as expected, thanks.

I'm puzzled by the fact that if I change root to a diagram who's palette
draws are closed it takes quite a bit longer to draw the palette than when
the draws are open. One is instant, the other takes about a second. Like,
you can watch it.

Any Ideas as to why that should be?

Steve.



>
> "Steve Jones" <steve@istech.demon.co.uk> wrote in message
> news:ddd1d1$n8g$1@news.eclipse.org...
>> Hi,
>>
>> I change my GEF diagram root based on the user selection in the model out
>> line view. I also change the tool palette based on this selection.
>>
>> My problem is that every time a palette is redisplayed by calling
>> PaletteViewer#setPaleteRoot() it is displayed in it's initial state with
>> all its draws opened.
>>
>> Id like to maintain the palette draw state between selections.
>>
>> Any ideas on how to do this?
>>
>> Thanks, Steve.
>>

--
Steve Jones
I.S.Technology Ltd
Re: Changing palettes and maintaining there state [message #191576 is a reply to message #191513] Wed, 10 August 2005 17:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I can't think of any reason for that performance problem. Hopefully it is
related to something else that is happening when you switch palettes.

"Steve Jones" <steve@istech.demon.co.uk> wrote in message
news:dddbga$4ju$1@news.eclipse.org...
> Randy Hudson wrote:
>
>> @see PaletteViewer#saveState(Memento)
>
> I've subclassed PaletteViewer and save & restore the PaletteViewer state
> whenever the palette root changes. It works just as expected, thanks.
>
> I'm puzzled by the fact that if I change root to a diagram who's palette
> draws are closed it takes quite a bit longer to draw the palette than when
> the draws are open. One is instant, the other takes about a second. Like,
> you can watch it.
>
> Any Ideas as to why that should be?
>
> Steve.
>
Re: Changing palettes and maintaining there state [message #191743 is a reply to message #191576] Thu, 11 August 2005 08:45 Go to previous messageGo to next message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Randy Hudson wrote:

> I can't think of any reason for that performance problem. Hopefully it is
> related to something else that is happening when you switch palettes.

It's the palette animation that I'm seeing. When I redisplay a palette it's
reconstructed from scratch, using the initial draw states - that's how the
palette viewer works.

I then apply the cached state from my Memento. All the cached changes are
applied but each is animated as it would be under normal user selection.

Watching several draws open together under animation looks sick. It would
not normally happen.

Is it possible to turn the palette animation off?


Steve.

>
> "Steve Jones" <steve@istech.demon.co.uk> wrote in message
> news:dddbga$4ju$1@news.eclipse.org...
>> Randy Hudson wrote:
>>
>>> @see PaletteViewer#saveState(Memento)
>>
>> I've subclassed PaletteViewer and save & restore the PaletteViewer state
>> whenever the palette root changes. It works just as expected, thanks.
>>
>> I'm puzzled by the fact that if I change root to a diagram who's palette
>> draws are closed it takes quite a bit longer to draw the palette than
>> when the draws are open. One is instant, the other takes about a second.
>> Like, you can watch it.
>>
>> Any Ideas as to why that should be?
>>
>> Steve.
>>

--
Steve Jones
I.S.Technology Ltd
Re: Changing palettes and maintaining there state [message #191773 is a reply to message #191743] Thu, 11 August 2005 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

Open a bug report. Mention on there how big your palette is (how many
drawers, groups, etc.).

"Steve Jones" <steve@istech.demon.co.uk> wrote in message
news:ddf377$pp0$1@news.eclipse.org...
> Randy Hudson wrote:
>
> > I can't think of any reason for that performance problem. Hopefully it
is
> > related to something else that is happening when you switch palettes.
>
> It's the palette animation that I'm seeing. When I redisplay a palette
it's
> reconstructed from scratch, using the initial draw states - that's how the
> palette viewer works.
>
> I then apply the cached state from my Memento. All the cached changes are
> applied but each is animated as it would be under normal user selection.
>
> Watching several draws open together under animation looks sick. It would
> not normally happen.
>
> Is it possible to turn the palette animation off?
>
>
> Steve.
>
> >
> > "Steve Jones" <steve@istech.demon.co.uk> wrote in message
> > news:dddbga$4ju$1@news.eclipse.org...
> >> Randy Hudson wrote:
> >>
> >>> @see PaletteViewer#saveState(Memento)
> >>
> >> I've subclassed PaletteViewer and save & restore the PaletteViewer
state
> >> whenever the palette root changes. It works just as expected, thanks.
> >>
> >> I'm puzzled by the fact that if I change root to a diagram who's
palette
> >> draws are closed it takes quite a bit longer to draw the palette than
> >> when the draws are open. One is instant, the other takes about a
second.
> >> Like, you can watch it.
> >>
> >> Any Ideas as to why that should be?
> >>
> >> Steve.
> >>
>
> --
> Steve Jones
> I.S.Technology Ltd
Re: Changing palettes and maintaining there state [message #191796 is a reply to message #191743] Thu, 11 August 2005 16:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Pratik, how is it that we avoid animation when the palette gets slurped
inside the flyout composite or opened inside the palette view?


"Steve Jones" <steve@istech.demon.co.uk> wrote in message
news:ddf377$pp0$1@news.eclipse.org...
> Randy Hudson wrote:
>
>> I can't think of any reason for that performance problem. Hopefully it is
>> related to something else that is happening when you switch palettes.
>
> It's the palette animation that I'm seeing. When I redisplay a palette
> it's
> reconstructed from scratch, using the initial draw states - that's how the
> palette viewer works.
>
> I then apply the cached state from my Memento. All the cached changes are
> applied but each is animated as it would be under normal user selection.
>
> Watching several draws open together under animation looks sick. It would
> not normally happen.
>
> Is it possible to turn the palette animation off?
>
>
> Steve.
>
>>
>> "Steve Jones" <steve@istech.demon.co.uk> wrote in message
>> news:dddbga$4ju$1@news.eclipse.org...
>>> Randy Hudson wrote:
>>>
>>>> @see PaletteViewer#saveState(Memento)
>>>
>>> I've subclassed PaletteViewer and save & restore the PaletteViewer state
>>> whenever the palette root changes. It works just as expected, thanks.
>>>
>>> I'm puzzled by the fact that if I change root to a diagram who's palette
>>> draws are closed it takes quite a bit longer to draw the palette than
>>> when the draws are open. One is instant, the other takes about a second.
>>> Like, you can watch it.
>>>
>>> Any Ideas as to why that should be?
>>>
>>> Steve.
>>>
>
> --
> Steve Jones
> I.S.Technology Ltd
Re: Changing palettes and maintaining there state [message #191804 is a reply to message #191796] Thu, 11 August 2005 17:05 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

That's what I was thinking. But apparently we don't. I'm thinking we just
don't see this problem because we don't have a lot of items in the palette
and all drawers are usually always open in our examples.

This bug has a patch to disable animation based on the workbench preference:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=82736
We could enhance it to support disabling animation when desired.

"Randy Hudson" <none@us.ibm.com> wrote in message
news:ddfv8i$tul$1@news.eclipse.org...
> Pratik, how is it that we avoid animation when the palette gets slurped
> inside the flyout composite or opened inside the palette view?
>
>
> "Steve Jones" <steve@istech.demon.co.uk> wrote in message
> news:ddf377$pp0$1@news.eclipse.org...
> > Randy Hudson wrote:
> >
> >> I can't think of any reason for that performance problem. Hopefully it
is
> >> related to something else that is happening when you switch palettes.
> >
> > It's the palette animation that I'm seeing. When I redisplay a palette
> > it's
> > reconstructed from scratch, using the initial draw states - that's how
the
> > palette viewer works.
> >
> > I then apply the cached state from my Memento. All the cached changes
are
> > applied but each is animated as it would be under normal user selection.
> >
> > Watching several draws open together under animation looks sick. It
would
> > not normally happen.
> >
> > Is it possible to turn the palette animation off?
> >
> >
> > Steve.
> >
> >>
> >> "Steve Jones" <steve@istech.demon.co.uk> wrote in message
> >> news:dddbga$4ju$1@news.eclipse.org...
> >>> Randy Hudson wrote:
> >>>
> >>>> @see PaletteViewer#saveState(Memento)
> >>>
> >>> I've subclassed PaletteViewer and save & restore the PaletteViewer
state
> >>> whenever the palette root changes. It works just as expected, thanks.
> >>>
> >>> I'm puzzled by the fact that if I change root to a diagram who's
palette
> >>> draws are closed it takes quite a bit longer to draw the palette than
> >>> when the draws are open. One is instant, the other takes about a
second.
> >>> Like, you can watch it.
> >>>
> >>> Any Ideas as to why that should be?
> >>>
> >>> Steve.
> >>>
> >
> > --
> > Steve Jones
> > I.S.Technology Ltd
>
>
Previous Topic:CompoundDirectedGraph orientation
Next Topic:schema example - hack to add initial location for TablePart?
Goto Forum:
  


Current Time: Thu Dec 12 19:35:43 GMT 2024

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

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

Back to the top