This fixes a small repaint problem in java.awt.Component. The rectangle
calculation in reshape() was wrong, it calculated rectangle relative to
the parent's parent, which should only be relative to the parent.
2005-10-12 Roman Kennke [EMAIL PROTECTED]
* java/awt/Component.java
(reshape): Fixed calculation of newBounds and oldBounds to create
rectangles relative to the parent, and not to the parent's
parent.
Solves a painting problem in an app here.
/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 - 1.79
+++ java/awt/Component.java 12 Oct 2005 15:23:03 -
@@ -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
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches