Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
849cd7f4
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
849cd7f4
编写于
11月 26, 2013
作者:
M
mcherkas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8028271: Wrong alt processing during switching between windows.
Reviewed-by: serb, alexsch
上级
613b96eb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
18 deletion
+22
-18
test/javax/swing/plaf/windows/WindowsRootPaneUI/WrongAltProcessing/WrongAltProcessing.java
...dowsRootPaneUI/WrongAltProcessing/WrongAltProcessing.java
+22
-18
未找到文件。
test/javax/swing/plaf/windows/WindowsRootPaneUI/WrongAltProcessing/WrongAltProcessing.java
浏览文件 @
849cd7f4
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
*/
*/
/* @test
/* @test
@bug 8001633
@bug 8001633
8028271
@summary Wrong alt processing during switching between windows
@summary Wrong alt processing during switching between windows
@author mikhail.cherkasov@oracle.com
@author mikhail.cherkasov@oracle.com
@run main WrongAltProcessing
@run main WrongAltProcessing
...
@@ -44,16 +44,27 @@ public class WrongAltProcessing {
...
@@ -44,16 +44,27 @@ public class WrongAltProcessing {
private
static
JTextField
mainFrameTf2
;
private
static
JTextField
mainFrameTf2
;
private
static
JTextField
secondFrameTf
;
private
static
JTextField
secondFrameTf
;
public
static
void
main
(
String
[]
args
)
throws
AWT
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
try
{
try
{
UIManager
.
setLookAndFeel
(
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
);
UIManager
.
setLookAndFeel
(
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
;
// miss unsupported platforms.
return
;
// miss unsupported platforms.
}
}
createWindows
();
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
createWindows
();
}
});
sync
();
initRobot
();
initRobot
();
runScript
();
runScript
();
verify
();
SwingUtilities
.
invokeLater
(
new
Runnable
()
{
@Override
public
void
run
()
{
verify
();
}
});
}
}
private
static
void
verify
()
{
private
static
void
verify
()
{
...
@@ -76,7 +87,7 @@ public class WrongAltProcessing {
...
@@ -76,7 +87,7 @@ public class WrongAltProcessing {
private
static
void
clickWindowsTitle
(
JFrame
frame
)
{
private
static
void
clickWindowsTitle
(
JFrame
frame
)
{
Point
point
=
frame
.
getLocationOnScreen
();
Point
point
=
frame
.
getLocationOnScreen
();
robot
.
mouseMove
(
point
.
x
+
(
frame
.
getWidth
()
/
2
),
point
.
y
+
5
);
robot
.
mouseMove
(
point
.
x
+
(
frame
.
getWidth
()
/
2
),
point
.
y
+
frame
.
getInsets
().
top
/
2
);
robot
.
mousePress
(
InputEvent
.
BUTTON1_MASK
);
robot
.
mousePress
(
InputEvent
.
BUTTON1_MASK
);
robot
.
mouseRelease
(
InputEvent
.
BUTTON1_MASK
);
robot
.
mouseRelease
(
InputEvent
.
BUTTON1_MASK
);
}
}
...
@@ -112,6 +123,7 @@ public class WrongAltProcessing {
...
@@ -112,6 +123,7 @@ public class WrongAltProcessing {
public
static
void
createWindows
()
{
public
static
void
createWindows
()
{
firstFrame
=
new
JFrame
(
"Frame"
);
firstFrame
=
new
JFrame
(
"Frame"
);
firstFrame
.
setLayout
(
new
FlowLayout
());
firstFrame
.
setLayout
(
new
FlowLayout
());
firstFrame
.
setPreferredSize
(
new
Dimension
(
600
,
100
));
JMenuBar
bar
=
new
JMenuBar
();
JMenuBar
bar
=
new
JMenuBar
();
JMenu
menu
=
new
JMenu
(
"File"
);
JMenu
menu
=
new
JMenu
(
"File"
);
...
@@ -146,24 +158,16 @@ public class WrongAltProcessing {
...
@@ -146,24 +158,16 @@ public class WrongAltProcessing {
firstFrame
.
pack
();
firstFrame
.
pack
();
secondFrame
=
new
JFrame
(
"Frame 2"
);
secondFrame
=
new
JFrame
(
"Frame 2"
);
secondFrame
.
setPreferredSize
(
new
Dimension
(
600
,
100
));
secondFrame
.
setLocation
(
0
,
150
);
secondFrame
.
setLocation
(
0
,
150
);
secondFrameTf
=
new
JTextField
(
20
);
secondFrameTf
=
new
JTextField
(
20
);
secondFrame
.
add
(
secondFrameTf
);
secondFrame
.
add
(
secondFrameTf
);
secondFrame
.
pack
();
secondFrame
.
pack
();
SwingUtilities
.
invokeLater
(
new
Runnable
()
{
@Override
secondFrame
.
setVisible
(
true
);
public
void
run
()
{
secondFrame
.
setVisible
(
true
);
firstFrame
.
setVisible
(
true
);
}
});
SwingUtilities
.
invokeLater
(
new
Runnable
()
{
@Override
public
void
run
()
{
firstFrame
.
setVisible
(
true
);
}
});
mainFrameTf1
.
requestFocus
();
mainFrameTf1
.
requestFocus
();
sync
();
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录