Hi Mark, Am Sonntag, den 25.09.2005, 23:38 +0200 schrieb Mark Wielaard: > Hi Roman, > > > > 2005-09-22 Roman Kennke <[EMAIL PROTECTED]> > > > > * javax/swing/JComponent.java > > (paintChildren): If a child component is invisible, skip it. > > Handle the (rare) case when no clip is set as if it's set to the > > child component's bounds. These fixes should make Swing working > > again as before. > > [...] > > Rectangle bounds = children[i].getBounds(); > > Rectangle oldClip = g.getClipBounds(); > > + if (oldClip == null) > > + oldClip = bounds; > > And later you do: > > g.setClip(oldClip); > > Even when oldClip was originally null.
This is 100% ok. Handling of Graphics objects should be symetrically: 1. If you get a Graphics as parameter and set a clip, then the clip should be reset to the orignal state when the method leaves, setting it to null should be ok here. 2. When a Graphics object is aquired via Component.getGraphics or Image.getGraphics, then it should be disposed in the same method after all drawing is completed 3. #1 also applies for all other Graphics state like Color, Font, Translation, etc /Roman
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
