Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
cc366666
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看板
提交
cc366666
编写于
4月 27, 2011
作者:
D
dav
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6979551: closed/javax/swing/plaf/basic/BasicLabelUI/4798542/bug4798542.java fails
Reviewed-by: art, yan, alexp
上级
525bb9da
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
77 addition
and
1 deletion
+77
-1
src/share/classes/sun/awt/ExtendedKeyCodes.java
src/share/classes/sun/awt/ExtendedKeyCodes.java
+16
-1
test/java/awt/keyboard/EqualKeyCode/EqualKeyCode.java
test/java/awt/keyboard/EqualKeyCode/EqualKeyCode.java
+61
-0
未找到文件。
src/share/classes/sun/awt/ExtendedKeyCodes.java
浏览文件 @
cc366666
...
@@ -13,7 +13,7 @@ public class ExtendedKeyCodes {
...
@@ -13,7 +13,7 @@ public class ExtendedKeyCodes {
*/
*/
// Keycodes declared in KeyEvent.java with corresponding Unicode values.
// Keycodes declared in KeyEvent.java with corresponding Unicode values.
private
final
static
HashMap
<
Integer
,
Integer
>
regularKeyCodesMap
=
private
final
static
HashMap
<
Integer
,
Integer
>
regularKeyCodesMap
=
new
HashMap
<
Integer
,
Integer
>(
83
,
1.0f
);
new
HashMap
<
Integer
,
Integer
>(
98
,
1.0f
);
// Keycodes derived from Unicode values. Here should be collected codes
// Keycodes derived from Unicode values. Here should be collected codes
// for characters appearing on the primary layer of at least one
// for characters appearing on the primary layer of at least one
...
@@ -108,6 +108,21 @@ public class ExtendedKeyCodes {
...
@@ -108,6 +108,21 @@ public class ExtendedKeyCodes {
regularKeyCodesMap
.
put
(
0x5E
,
KeyEvent
.
VK_CIRCUMFLEX
);
regularKeyCodesMap
.
put
(
0x5E
,
KeyEvent
.
VK_CIRCUMFLEX
);
regularKeyCodesMap
.
put
(
0x5F
,
KeyEvent
.
VK_UNDERSCORE
);
regularKeyCodesMap
.
put
(
0x5F
,
KeyEvent
.
VK_UNDERSCORE
);
regularKeyCodesMap
.
put
(
0x60
,
KeyEvent
.
VK_BACK_QUOTE
);
regularKeyCodesMap
.
put
(
0x60
,
KeyEvent
.
VK_BACK_QUOTE
);
regularKeyCodesMap
.
put
(
0x61
,
KeyEvent
.
VK_A
);
regularKeyCodesMap
.
put
(
0x62
,
KeyEvent
.
VK_B
);
regularKeyCodesMap
.
put
(
0x63
,
KeyEvent
.
VK_C
);
regularKeyCodesMap
.
put
(
0x64
,
KeyEvent
.
VK_D
);
regularKeyCodesMap
.
put
(
0x65
,
KeyEvent
.
VK_E
);
regularKeyCodesMap
.
put
(
0x66
,
KeyEvent
.
VK_F
);
regularKeyCodesMap
.
put
(
0x67
,
KeyEvent
.
VK_G
);
regularKeyCodesMap
.
put
(
0x68
,
KeyEvent
.
VK_H
);
regularKeyCodesMap
.
put
(
0x69
,
KeyEvent
.
VK_I
);
regularKeyCodesMap
.
put
(
0x6A
,
KeyEvent
.
VK_J
);
regularKeyCodesMap
.
put
(
0x6B
,
KeyEvent
.
VK_K
);
regularKeyCodesMap
.
put
(
0x6C
,
KeyEvent
.
VK_L
);
regularKeyCodesMap
.
put
(
0x6D
,
KeyEvent
.
VK_M
);
regularKeyCodesMap
.
put
(
0x6E
,
KeyEvent
.
VK_N
);
regularKeyCodesMap
.
put
(
0x6F
,
KeyEvent
.
VK_O
);
regularKeyCodesMap
.
put
(
0x70
,
KeyEvent
.
VK_P
);
regularKeyCodesMap
.
put
(
0x70
,
KeyEvent
.
VK_P
);
regularKeyCodesMap
.
put
(
0x71
,
KeyEvent
.
VK_Q
);
regularKeyCodesMap
.
put
(
0x71
,
KeyEvent
.
VK_Q
);
regularKeyCodesMap
.
put
(
0x72
,
KeyEvent
.
VK_R
);
regularKeyCodesMap
.
put
(
0x72
,
KeyEvent
.
VK_R
);
...
...
test/java/awt/keyboard/EqualKeyCode/EqualKeyCode.java
0 → 100644
浏览文件 @
cc366666
/*
* Copyright (c) 2011, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 6799551
@library ../../regtesthelpers
@build Util Sysout
@summary Extended key codes for small letters undefined
@author Andrei Dmitriev: area=awt.keyboard
@run main EqualKeyCode
*/
import
sun.awt.*
;
import
java.awt.*
;
import
test.java.awt.regtesthelpers.Util
;
import
test.java.awt.regtesthelpers.Sysout
;
public
class
EqualKeyCode
{
final
static
String
LETTERS
=
"abcdefghijklmnopqrstuvwxyz"
;
public
static
void
main
(
String
[]
s
)
{
for
(
int
i
=
0
;
i
<
LETTERS
.
length
();
i
++){
char
cSmall
=
LETTERS
.
charAt
(
i
);
char
cLarge
=
Character
.
toUpperCase
(
cSmall
);
int
iSmall
=
ExtendedKeyCodes
.
getExtendedKeyCodeForChar
(
cSmall
);
int
iLarge
=
ExtendedKeyCodes
.
getExtendedKeyCodeForChar
(
cLarge
);
System
.
out
.
print
(
" "
+
cSmall
+
":"
+
iSmall
+
" ---- "
);
System
.
out
.
println
(
" "
+
cLarge
+
" : "
+
iLarge
);
if
(
ExtendedKeyCodes
.
getExtendedKeyCodeForChar
(
cSmall
)
!=
ExtendedKeyCodes
.
getExtendedKeyCodeForChar
(
cLarge
))
{
throw
new
RuntimeException
(
"ExtendedKeyCode doesn't exist or doesn't match between capital and small letters."
);
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录