Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » A Question Regarding UpdateManager
A Question Regarding UpdateManager [message #155509] Mon, 25 October 2004 22:25 Go to next message
Eclipse UserFriend
Originally posted by: zenilnh.infotech.stph.net

Hi,

Got a couple of doubts that i encountered when going through the examples.
Cna somebody please clarify??

1)
While going through the flow example ,I came across the following code,

while(GraphAnimation.step()){
parentFigure.getUpdateManager().performUpdate();
}
What does a peformUpdate() do??When is it used??Instead of the above cant
i call each child figure(of parentFigure) and say repaint()??

2)What is the diffrence b/w calling a figure.revalidate() and
figure.repaint()??

Thanks,
Zenil
Re: A Question Regarding UpdateManager [message #155665 is a reply to message #155509] Tue, 26 October 2004 15:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> 1)
> While going through the flow example ,I came across the following code,
>
> while(GraphAnimation.step()){
> parentFigure.getUpdateManager().performUpdate();
> }
> What does a peformUpdate() do??When is it used??Instead of the above cant

This causes an update (layout followed by repaint) synchronously, instead of
deferred. The animation must occur while the UI is blocked to prevent
unexpected changes during the animation. Therefore, waiting for a deferred
layout is not OK.

> i call each child figure(of parentFigure) and say repaint()??

> 2)What is the diffrence b/w calling a figure.revalidate() and
> figure.repaint()??

revalidate() means that the figure hierarchy needs to be validated. For
example, if you change the text for a label, the label now wants to be
bigger, which may cause it's parent to be bigger, etc.

repaint() means that the figure needs to be repainted. For example, the
COLOR has changed.

Often, you need to call both revalidate() and repaint() because even if a
property changes, sometimes nothing moves, and there won't be a repaint
without asking for it.
Re: A Question Regarding UpdateManager [message #155795 is a reply to message #155665] Tue, 26 October 2004 23:21 Go to previous message
Eclipse UserFriend
Originally posted by: zenilnh.infotech.stph.net

Thanks for the clarification.

Zenil

Randy Hudson wrote:

> > 1)
> > While going through the flow example ,I came across the following code,
> >
> > while(GraphAnimation.step()){
> > parentFigure.getUpdateManager().performUpdate();
> > }
> > What does a peformUpdate() do??When is it used??Instead of the above cant

> This causes an update (layout followed by repaint) synchronously, instead of
> deferred. The animation must occur while the UI is blocked to prevent
> unexpected changes during the animation. Therefore, waiting for a deferred
> layout is not OK.

> > i call each child figure(of parentFigure) and say repaint()??

> > 2)What is the diffrence b/w calling a figure.revalidate() and
> > figure.repaint()??

> revalidate() means that the figure hierarchy needs to be validated. For
> example, if you change the text for a label, the label now wants to be
> bigger, which may cause it's parent to be bigger, etc.

> repaint() means that the figure needs to be repainted. For example, the
> COLOR has changed.

> Often, you need to call both revalidate() and repaint() because even if a
> property changes, sometimes nothing moves, and there won't be a repaint
> without asking for it.
Previous Topic:Command.execute will not be called
Next Topic:Refreshing FlyoutPalette
Goto Forum:
  


Current Time: Wed Feb 05 14:44:00 GMT 2025

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

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

Back to the top