Skip to main content



      Home
Home » Eclipse Projects » GEF » Figure painting lifecycle
Figure painting lifecycle [message #90640] Wed, 13 August 2003 16:43 Go to next message
Eclipse UserFriend
I have a Figure which does a bunch of pre-calculations for painting
itself. It also uses the same calculations to figure out the necessary
border insets, and other bounding boxes for labels etc. What is the
preferred place that I should make these calculations. It seems that
the first thing that is called is getPreferredSize so I am currently
doing it there. Is this approach valid?

Ray
Re: Figure painting lifecycle [message #90656 is a reply to message #90640] Wed, 13 August 2003 18:01 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The label figure is a good example of this. It uses "lazy" calculation of
such values. So, when the values become invalid (invalidate() is called),
the previous results are thrown away. New values are calculated "as
needed", since getPreferredSize() is not guaranteed to be called.

"Ray Tsui" <Raymond_Tsui@ca.ibm.com> wrote in message
news:1q7ljvsk1u97ol774no7kqfg2mhd15bv72@4ax.com...
> I have a Figure which does a bunch of pre-calculations for painting
> itself. It also uses the same calculations to figure out the necessary
> border insets, and other bounding boxes for labels etc. What is the
> preferred place that I should make these calculations. It seems that
> the first thing that is called is getPreferredSize so I am currently
> doing it there. Is this approach valid?
>
> Ray
>
Previous Topic:Scrolling on Object Create
Next Topic:Flow Anchors ? (Repost)
Goto Forum:
  


Current Time: Sun May 11 02:30:24 EDT 2025

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

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

Back to the top