|
Re: Propagating preferences changes to UI [message #189753 is a reply to message #189622] |
Thu, 28 July 2005 20:32 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You could recursively walk through editparts and notify them of changes
using your application's notification interface. Or a single listener could
just know which model objects are affected and get their editparts and tell
them.
Background color is inherited so you may only need to apply it once.
"benedict heal" <bh@benedictheal.com> wrote in message
news:dc91qr$6rk$1@news.eclipse.org...
>
>
> The appearances of my GEF Figures depends on various user preferences such
> as background colour.
>
> I would like a change in the preferences page to cause an immediate update
> to the UI appearance.
>
> I currently have every figure listen for changes on the preference page,
> but this feels like clumsy overkill.
>
> Is there a better way to cause changes to the preferences page to
> propagate and cause the whole UI to be re-displayed?
>
> thanks,
> Benedict
|
|
|
|
Re: Propagating preferences changes to UI [message #189770 is a reply to message #189761] |
Fri, 29 July 2005 13:44 |
Eclipse User |
|
|
|
Originally posted by: gslade.no.spam.us.ibm.com
Have the model parts whose visuals will change because of the preference
settings listen for preference changes. They should respond to only the
preferences that they care about and should respond by firing an event
that the edit part listens to. The edit part would respond to the event
by refreshing it visuals. While refreshing the visuals the edit part
would look at the preference settings to determine things like
background color etc.
Guy
Milan Stanojevic wrote:
> I am interested in this topic also.
> Is it necessary to go through the list of all edit parts and notify them
> about the change (if this is the case, what method should be called on
> editpart)?
>
> Is there a way of somehow telling graphical viewer or top editpart to
> refresh the whole diagram without going through the list of all editparts?
>
>> You could recursively walk through editparts and notify them of
>> changes using your application's notification interface. Or a single
>> listener could just know which model objects are affected and get
>> their editparts and tell them.
>
>
>> Background color is inherited so you may only need to apply it once.
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03713 seconds