aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorScott Gilbertson <scottg@mantatest.com>2003-04-20 23:21:06 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-04-20 23:21:06 +0000
commitebf96c133bbd6eaa094682e4b44061c858814340 (patch)
tree7d0f4a7c0339837de0b0def87e3da925bb0e01a4 /libjava
parentb39b80844883d0de4d19d90c35f11d78887280fe (diff)
downloadgcc-ebf96c133bbd6eaa094682e4b44061c858814340.zip
gcc-ebf96c133bbd6eaa094682e4b44061c858814340.tar.gz
gcc-ebf96c133bbd6eaa094682e4b44061c858814340.tar.bz2
Container.java (addImpl): Enable paint events if adding a lightweight to a heavyweight.
2003-04-20 Scott Gilbertson <scottg@mantatest.com> * java/awt/Container.java (addImpl): Enable paint events if adding a lightweight to a heavyweight. (addNotify): Ensure that peer is created before addNotifyContainerChildren. (addNotifyContainerChildren): Enable paint events if a heavyweight container contains a lightweight. From-SVN: r65870
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog9
-rw-r--r--libjava/java/awt/Container.java20
2 files changed, 23 insertions, 6 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 319e3fb..956a317 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,12 @@
+2003-04-20 Scott Gilbertson <scottg@mantatest.com>
+
+ * java/awt/Container.java (addImpl): Enable paint events if adding
+ a lightweight to a heavyweight.
+ (addNotify): Ensure that peer is created before
+ addNotifyContainerChildren.
+ (addNotifyContainerChildren): Enable paint events if a heavyweight
+ container contains a lightweight.
+
2003-04-20 Tom Tromey <tromey@redhat.com>
* java/io/BufferedReader.java, java/io/BufferedWriter.java,
diff --git a/libjava/java/awt/Container.java b/libjava/java/awt/Container.java
index 9ef6add..9bad369 100644
--- a/libjava/java/awt/Container.java
+++ b/libjava/java/awt/Container.java
@@ -297,9 +297,13 @@ public class Container extends Component
if (peer != null)
{
comp.addNotify();
-
- if (comp.isLightweight())
- enableEvents(comp.eventMask);
+
+ if (comp.isLightweight ())
+ {
+ enableEvents (comp.eventMask);
+ if (!isLightweight ())
+ enableEvents (AWTEvent.PAINT_EVENT_MASK);
+ }
}
invalidate();
@@ -907,8 +911,8 @@ public class Container extends Component
*/
public void addNotify()
{
- addNotifyContainerChildren();
super.addNotify();
+ addNotifyContainerChildren();
}
/**
@@ -1288,8 +1292,12 @@ public class Container extends Component
for (int i = ncomponents; --i >= 0; )
{
component[i].addNotify();
- if (component[i].isLightweight())
- enableEvents(component[i].eventMask);
+ if (component[i].isLightweight ())
+ {
+ enableEvents(component[i].eventMask);
+ if (peer != null && !isLightweight ())
+ enableEvents (AWTEvent.PAINT_EVENT_MASK);
+ }
}
}
}