diff options
author | David Jee <djee@redhat.com> | 2004-01-07 21:20:01 +0000 |
---|---|---|
committer | David Jee <djee@gcc.gnu.org> | 2004-01-07 21:20:01 +0000 |
commit | 627e4e5fc2e189846e59f0b1d44182b319afba3b (patch) | |
tree | bf4dc9ac47166982403d5296fc35fc995785565c /libjava/java/awt/Container.java | |
parent | 4752762407d8be79c092752d56a4dd88e8eab766 (diff) | |
download | gcc-627e4e5fc2e189846e59f0b1d44182b319afba3b.zip gcc-627e4e5fc2e189846e59f0b1d44182b319afba3b.tar.gz gcc-627e4e5fc2e189846e59f0b1d44182b319afba3b.tar.bz2 |
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.
From-SVN: r75517
Diffstat (limited to 'libjava/java/awt/Container.java')
-rw-r--r-- | libjava/java/awt/Container.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libjava/java/awt/Container.java b/libjava/java/awt/Container.java index ad43ce4..763cfbb 100644 --- a/libjava/java/awt/Container.java +++ b/libjava/java/awt/Container.java @@ -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() |