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>
Merge Orp RMI patches from Wu Gansha <gansha.wu@intel.com>
......
......@@ -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);
}
/*************************************************************************/
......
......@@ -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;
}
}
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