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
This commit is contained in:
Tom Tromey 2002-11-09 23:23:32 +00:00 committed by Tom Tromey
parent 9f689d92c0
commit ad980a7b82
3 changed files with 23 additions and 7 deletions

View 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>

View 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);
}
/*************************************************************************/

View 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;
}
}