Commit ad980a7b by Tom Tromey Committed by Tom Tromey

List.java (processEvent): Added missing `else's.

	* java/awt/List.java (processEvent): Added missing `else's.

	* java/awt/Window.java (show): validate() before showing.  Make
	parent displayable.
	(isDisplayable): New method.

From-SVN: r58961
parent 9f689d92
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> 2002-11-07 Mark Wielaard <mark@klomp.org>
Merge Orp RMI patches from Wu Gansha <gansha.wu@intel.com> Merge Orp RMI patches from Wu Gansha <gansha.wu@intel.com>
......
...@@ -947,10 +947,10 @@ processEvent(AWTEvent event) ...@@ -947,10 +947,10 @@ processEvent(AWTEvent event)
{ {
if (event instanceof ActionEvent) if (event instanceof ActionEvent)
processActionEvent((ActionEvent)event); processActionEvent((ActionEvent)event);
if (event instanceof ItemEvent) else if (event instanceof ItemEvent)
processItemEvent((ItemEvent)event); processItemEvent((ItemEvent)event);
else
super.processEvent(event); super.processEvent(event);
} }
/*************************************************************************/ /*************************************************************************/
......
...@@ -158,14 +158,13 @@ public class Window extends Container ...@@ -158,14 +158,13 @@ public class Window extends Container
*/ */
public void pack() public void pack()
{ {
if (parent != null if (parent != null && !parent.isDisplayable())
&& !parent.isDisplayable())
parent.addNotify(); parent.addNotify();
if (peer == null) if (peer == null)
addNotify(); addNotify();
setSize(getPreferredSize()); setSize(getPreferredSize());
validate(); validate();
} }
...@@ -174,9 +173,12 @@ public class Window extends Container ...@@ -174,9 +173,12 @@ public class Window extends Container
*/ */
public void show() public void show()
{ {
if (parent != null && !parent.isDisplayable())
parent.addNotify();
if (peer == null) if (peer == null)
addNotify(); addNotify();
validate();
super.show(); super.show();
toFront(); toFront();
} }
...@@ -187,6 +189,13 @@ public class Window extends Container ...@@ -187,6 +189,13 @@ public class Window extends Container
super.hide(); super.hide();
} }
public boolean isDisplayable()
{
if (super.isDisplayable())
return true;
return peer != null;
}
/** /**
* Called to free any resource associated with this window. * Called to free any resource associated with this window.
*/ */
...@@ -479,5 +488,4 @@ public class Window extends Container ...@@ -479,5 +488,4 @@ public class Window extends Container
if (peer != null) return peer.getGraphicsConfiguration(); if (peer != null) return peer.getGraphicsConfiguration();
return null; return null;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment