I have thought again about my clipping patch for ComponentUI from
2005-10-12 and came to the conclusion that this is not right. It works
in most cases, but when the clipping is a little weird, this method can
be destructive (on the GUI).

If there are still clipping problems, then most likely in another area.

2005-10-19  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/plaf/ComponentUI.java
        Filled empty blocks with comments.
        (update): Reverted my patch from 2005-10-12. This is wrong. If
there
        are still clipping problems, then certainly in another area.

/Roman
Index: java/awt/Component.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Component.java,v
retrieving revision 1.79
diff -u -r1.79 Component.java
--- java/awt/Component.java	4 Oct 2005 14:05:56 -0000	1.79
+++ java/awt/Component.java	12 Oct 2005 15:23:03 -0000
@@ -1402,17 +1402,14 @@
       peer.setBounds (x, y, width, height);
 
     // Erase old bounds and repaint new bounds for lightweights.
-    if (isLightweight() && isShowing ())
+    if (isLightweight() && isShowing())
       {
         if (parent != null)
           {
             Rectangle parentBounds = parent.getBounds();
-            Rectangle oldBounds = new Rectangle(parent.getX() + oldx,
-                                                parent.getY() + oldy,
-                                                oldwidth, oldheight);
-            Rectangle newBounds = new Rectangle(parent.getX() + x,
-                                                parent.getY() + y,
-                                                width, height);
+            Rectangle oldBounds = new Rectangle(oldx, oldy, oldwidth,
+                                                oldheight);
+            Rectangle newBounds = new Rectangle(x, y, width, height);
             Rectangle destroyed = oldBounds.union(newBounds);
             if (!destroyed.isEmpty())
               parent.repaint(0, destroyed.x, destroyed.y, destroyed.width,
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to