* java/awt/List.java (processEvent): Added missing `else's.
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Nov 2002 23:23:32 +0000 (23:23 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Nov 2002 23:23:32 +0000 (23:23 +0000)
* java/awt/Window.java (show): validate() before showing.  Make
parent displayable.
(isDisplayable): New method.

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

libjava/ChangeLog
libjava/java/awt/List.java
libjava/java/awt/Window.java

index 11ec52e..ce373cd 100644 (file)
@@ -1,3 +1,11 @@
+2002-11-09  Tom Tromey  <tromey@redhat.com>
+
+       * java/awt/List.java (processEvent): Added missing `else's.
+
+       * java/awt/Window.java (show): validate() before showing.  Make
+       parent displayable.
+       (isDisplayable): New method.
+
 2002-11-07  Mark Wielaard  <mark@klomp.org>
 
         Merge Orp RMI patches from Wu Gansha <gansha.wu@intel.com>
index c171b8f..f2c6d07 100644 (file)
@@ -947,10 +947,10 @@ processEvent(AWTEvent event)
 {
   if (event instanceof ActionEvent)
     processActionEvent((ActionEvent)event);
-  if (event instanceof ItemEvent)
+  else if (event instanceof ItemEvent)
     processItemEvent((ItemEvent)event);
-
-  super.processEvent(event);
+  else
+    super.processEvent(event);
 }
 
 /*************************************************************************/
index 7064511..b8befaf 100644 (file)
@@ -158,14 +158,13 @@ public class Window extends Container
    */
   public void pack()
   {
-    if (parent != null
-        && !parent.isDisplayable())
+    if (parent != null && !parent.isDisplayable())
       parent.addNotify();
     if (peer == null)
       addNotify();
 
     setSize(getPreferredSize());
-    
+
     validate();
   }
 
@@ -174,9 +173,12 @@ public class Window extends Container
    */
   public void show()
   {
+    if (parent != null && !parent.isDisplayable())
+      parent.addNotify();
     if (peer == null)
       addNotify();
 
+    validate();
     super.show();
     toFront();
   }
@@ -187,6 +189,13 @@ public class Window extends Container
     super.hide();
   }
 
+  public boolean isDisplayable()
+  {
+    if (super.isDisplayable())
+      return true;
+    return peer != null;
+  }
+
   /**
    * Called to free any resource associated with this window.
    */
@@ -479,5 +488,4 @@ public class Window extends Container
     if (peer != null) return peer.getGraphicsConfiguration();
     return null;
   }
-
 }