Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [CHANGE] easier painting in Figure
[CHANGE] easier painting in Figure [message #52922] Wed, 08 January 2003 21:59
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

Figure.paintFigure(Graphics graphics) used to have the potential to screw up
the following calls to paintChildren(), and paintBorder().

It is now safe to do anything in paintFigure and leave the graphics in
whatever state you want (just make sure you don't leave pushed states on it,
see graphics.pushState/popState()). children will only inherit the changes
done in paint(), which by default is only BG, FG color, and Font.

requirements for paintClientArea() and paintChildren() have been changed.
The changes result in fewer calls to push and pop state on the Graphics.

It is UNLIKELY that you should be overriding these methods, but if you do,
both have been changed:
GOOD: you can call graphics.restoreState() whenever you want
within those methods to restore the graphics to its original state.
BAD: paintClientArea() must leave the Graphics in its original state. This
can be done simply by calling restoreState(). this is not done for you by
the caller (paint()) because the majority of figures are leaf figures with
no children, and calling restoreState() for them is a waste of time.
Previous Topic:Drag and Drop in Logic Editor Example
Next Topic:[CHANGE] Palette model has changed
Goto Forum:
  


Current Time: Wed Jul 17 16:37:34 GMT 2024

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

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

Back to the top