2004-01-07 David Jee <djee@redhat.com>
authordjee <djee@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jan 2004 21:20:01 +0000 (21:20 +0000)
committerdjee <djee@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jan 2004 21:20:01 +0000 (21:20 +0000)
    * java/awt/Container.java
    (update): Clear only the clipped region, instead of clearing the
    entire Container.
    (visitChildren): Visit children in descending order.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75517 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/awt/Container.java

index c9bf7d1..c97530e 100644 (file)
@@ -1,3 +1,10 @@
+2004-01-07  David Jee  <djee@redhat.com>
+
+       * java/awt/Container.java
+       (update): Clear only the clipped region, instead of clearing the
+       entire Container.
+       (visitChildren): Visit children in descending order.
+
 2004-01-07  Michael Koch  <konqueror@gmx.de>
 
        * java/lang/reflect/Array.java: Merged documentation with classpath.
index ad43ce4..763cfbb 100644 (file)
@@ -677,7 +677,11 @@ public class Container extends Component
    */
   public void update(Graphics g)
   {
-    g.clearRect(0, 0, width, height);
+    Rectangle clip = g.getClipBounds();
+    if (clip == null)
+      g.clearRect(0, 0, width, height);
+    else
+      g.clearRect(clip.x, clip.y, clip.width, clip.height);
     super.update(g);
   }
 
@@ -1196,7 +1200,7 @@ public class Container extends Component
   {
     synchronized (getTreeLock ())
       {
-        for (int i = 0; i < ncomponents; ++i)
+        for (int i = ncomponents - 1; i >= 0; --i)
           {
             Component comp = component[i];
             boolean applicable = comp.isVisible()