提交 9e1a201c 编写于 作者: L leonidr

8014264: The applet pathguy_TimeDead throws java.lang.NullPointerException in...

8014264: The applet pathguy_TimeDead throws java.lang.NullPointerException in java console once click drop-down check box.
Reviewed-by: art, anthony, serb
上级 53a41cde
/*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -904,11 +904,12 @@ abstract public class XBaseMenuWindow extends XWindow {
*/
public void dispose() {
setDisposed(true);
EventQueue.invokeLater(new Runnable() {
InvocationEvent ev = new InvocationEvent(target, new Runnable() {
public void run() {
doDispose();
}
});
super.postEvent(ev);
}
/**
......@@ -933,11 +934,12 @@ abstract public class XBaseMenuWindow extends XWindow {
* so events can not be processed using standart means
*/
void postEvent(final AWTEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
handleEvent(event);
}
});
InvocationEvent ev = new InvocationEvent(event.getSource(), new Runnable() {
public void run() {
handleEvent(event);
}
});
super.postEvent(ev);
}
/**
......
/*
* Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -1033,15 +1033,17 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
//fix 6252982: PIT: Keyboard FocusTraversal not working when choice's drop-down is visible, on XToolkit
if (e instanceof KeyEvent){
// notify XWindow that this event had been already handled and no need to post it again
EventQueue.invokeLater(new Runnable() {
public void run() {
if(target.isFocusable() &&
getParentTopLevel().isFocusableWindow() )
{
handleJavaKeyEvent((KeyEvent)e);
}
InvocationEvent ev = new InvocationEvent(target, new Runnable() {
public void run() {
if(target.isFocusable() &&
getParentTopLevel().isFocusableWindow() )
{
handleJavaKeyEvent((KeyEvent)e);
}
});
}
});
postEvent(ev);
return true;
} else {
if (e instanceof MouseEvent){
......@@ -1083,11 +1085,13 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
//convenient method
//do not generate this kind of Events
public boolean handleMouseEventByChoice(final MouseEvent me){
EventQueue.invokeLater(new Runnable() {
public void run() {
handleJavaMouseEvent(me);
}
});
InvocationEvent ev = new InvocationEvent(target, new Runnable() {
public void run() {
handleJavaMouseEvent(me);
}
});
postEvent(ev);
return true;
}
......
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -1669,11 +1669,12 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
* Do handleJavaMouseEvent on EDT
*/
void handleJavaMouseEventOnEDT(final MouseEvent me){
EventQueue.invokeLater(new Runnable() {
public void run() {
handleJavaMouseEvent(me);
}
});
InvocationEvent ev = new InvocationEvent(target, new Runnable() {
public void run() {
handleJavaMouseEvent(me);
}
});
postEvent(ev);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册