Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
55f2f042
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看板
提交
55f2f042
编写于
12月 02, 2011
作者:
N
naoto
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7117465: Warning cleanup for IMF classes
Reviewed-by: okutsu
上级
b79c3ab0
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
30 addition
and
21 deletion
+30
-21
src/share/classes/java/awt/im/InputMethodHighlight.java
src/share/classes/java/awt/im/InputMethodHighlight.java
+1
-1
src/share/classes/sun/awt/im/CompositionArea.java
src/share/classes/sun/awt/im/CompositionArea.java
+3
-0
src/share/classes/sun/awt/im/CompositionAreaHandler.java
src/share/classes/sun/awt/im/CompositionAreaHandler.java
+1
-1
src/share/classes/sun/awt/im/InputContext.java
src/share/classes/sun/awt/im/InputContext.java
+12
-11
src/share/classes/sun/awt/im/InputMethodContext.java
src/share/classes/sun/awt/im/InputMethodContext.java
+2
-3
src/share/classes/sun/awt/im/InputMethodJFrame.java
src/share/classes/sun/awt/im/InputMethodJFrame.java
+3
-0
src/share/classes/sun/awt/im/InputMethodManager.java
src/share/classes/sun/awt/im/InputMethodManager.java
+5
-5
src/share/classes/sun/awt/im/SimpleInputMethodWindow.java
src/share/classes/sun/awt/im/SimpleInputMethodWindow.java
+3
-0
未找到文件。
src/share/classes/java/awt/im/InputMethodHighlight.java
浏览文件 @
55f2f042
...
...
@@ -190,6 +190,6 @@ public class InputMethodHighlight {
private
boolean
selected
;
private
int
state
;
private
int
variation
;
private
Map
style
;
private
Map
<
TextAttribute
,
?>
style
;
};
src/share/classes/sun/awt/im/CompositionArea.java
浏览文件 @
55f2f042
...
...
@@ -313,4 +313,7 @@ public final class CompositionArea extends JPanel implements InputMethodListener
compositionWindow
.
pack
();
}
// Proclaim serial compatibility with 1.7.0
private
static
final
long
serialVersionUID
=
-
1057247068746557444L
;
}
src/share/classes/sun/awt/im/CompositionAreaHandler.java
浏览文件 @
55f2f042
...
...
@@ -257,7 +257,7 @@ class CompositionAreaHandler implements InputMethodListener,
*/
InputMethodRequests
getClientInputMethodRequests
()
{
if
(
clientComponent
!=
null
)
{
return
(
InputMethodRequests
)
clientComponent
.
getInputMethodRequests
();
return
clientComponent
.
getInputMethodRequests
();
}
return
null
;
...
...
src/share/classes/sun/awt/im/InputContext.java
浏览文件 @
55f2f042
...
...
@@ -79,7 +79,7 @@ public class InputContext extends java.awt.im.InputContext
private
boolean
inputMethodCreationFailed
;
// holding bin for previously used input method instances, but not the current one
private
HashMap
usedInputMethods
;
private
HashMap
<
InputMethodLocator
,
InputMethod
>
usedInputMethods
;
// the current client component is kept until the user focusses on a different
// client component served by the same input context. When that happens, we call
...
...
@@ -106,7 +106,7 @@ public class InputContext extends java.awt.im.InputContext
// cache location notification
private
Rectangle
clientWindowLocation
=
null
;
// holding the state of clientWindowNotificationEnabled of only non-current input methods
private
HashMap
perInputMethodState
;
private
HashMap
<
InputMethod
,
Boolean
>
perInputMethodState
;
// Input Method selection hot key stuff
private
static
AWTKeyStroke
inputMethodSelectionKey
;
...
...
@@ -219,6 +219,7 @@ public class InputContext extends java.awt.im.InputContext
/**
* @see java.awt.im.InputContext#dispatchEvent
*/
@SuppressWarnings
(
"fallthrough"
)
public
void
dispatchEvent
(
AWTEvent
event
)
{
if
(
event
instanceof
InputMethodEvent
)
{
...
...
@@ -394,7 +395,7 @@ public class InputContext extends java.awt.im.InputContext
isInputMethodActive
=
true
;
if
(
perInputMethodState
!=
null
)
{
Boolean
state
=
(
Boolean
)
perInputMethodState
.
remove
(
inputMethod
);
Boolean
state
=
perInputMethodState
.
remove
(
inputMethod
);
if
(
state
!=
null
)
{
clientWindowNotificationEnabled
=
state
.
booleanValue
();
}
...
...
@@ -549,10 +550,10 @@ public class InputContext extends java.awt.im.InputContext
// keep the input method instance around for future use
if
(
usedInputMethods
==
null
)
{
usedInputMethods
=
new
HashMap
(
5
);
usedInputMethods
=
new
HashMap
<>
(
5
);
}
if
(
perInputMethodState
==
null
)
{
perInputMethodState
=
new
HashMap
(
5
);
perInputMethodState
=
new
HashMap
<>
(
5
);
}
usedInputMethods
.
put
(
inputMethodLocator
.
deriveLocator
(
null
),
inputMethod
);
perInputMethodState
.
put
(
inputMethod
,
...
...
@@ -689,10 +690,10 @@ public class InputContext extends java.awt.im.InputContext
}
inputMethodLocator
=
null
;
if
(
usedInputMethods
!=
null
&&
!
usedInputMethods
.
isEmpty
())
{
Iterator
iterator
=
usedInputMethods
.
values
().
iterator
();
Iterator
<
InputMethod
>
iterator
=
usedInputMethods
.
values
().
iterator
();
usedInputMethods
=
null
;
while
(
iterator
.
hasNext
())
{
((
InputMethod
)
iterator
.
next
()
).
dispose
();
iterator
.
next
(
).
dispose
();
}
}
...
...
@@ -830,13 +831,13 @@ public class InputContext extends java.awt.im.InputContext
// see whether we have a previously used input method
if
(
usedInputMethods
!=
null
)
{
inputMethodInstance
=
(
InputMethod
)
usedInputMethods
.
remove
(
locator
.
deriveLocator
(
null
));
inputMethodInstance
=
usedInputMethods
.
remove
(
locator
.
deriveLocator
(
null
));
if
(
inputMethodInstance
!=
null
)
{
if
(
locale
!=
null
)
{
inputMethodInstance
.
setLocale
(
locale
);
}
inputMethodInstance
.
setCharacterSubsets
(
characterSubsets
);
Boolean
state
=
(
Boolean
)
perInputMethodState
.
remove
(
inputMethodInstance
);
Boolean
state
=
perInputMethodState
.
remove
(
inputMethodInstance
);
if
(
state
!=
null
)
{
enableClientWindowNotification
(
inputMethodInstance
,
state
.
booleanValue
());
}
...
...
@@ -919,7 +920,7 @@ public class InputContext extends java.awt.im.InputContext
// method becomes the current one.
if
(
requester
!=
inputMethod
)
{
if
(
perInputMethodState
==
null
)
{
perInputMethodState
=
new
HashMap
(
5
);
perInputMethodState
=
new
HashMap
<>
(
5
);
}
perInputMethodState
.
put
(
requester
,
Boolean
.
valueOf
(
enable
));
return
;
...
...
@@ -1029,7 +1030,7 @@ public class InputContext extends java.awt.im.InputContext
* Initializes the input method selection key definition in preference trees
*/
private
void
initializeInputMethodSelectionKey
()
{
AccessController
.
doPrivileged
(
new
PrivilegedAction
()
{
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Object
>
()
{
public
Object
run
()
{
// Look in user's tree
Preferences
root
=
Preferences
.
userRoot
();
...
...
src/share/classes/sun/awt/im/InputMethodContext.java
浏览文件 @
55f2f042
...
...
@@ -72,12 +72,11 @@ public class InputMethodContext
static
{
// check whether we should use below-the-spot input
// get property from command line
String
inputStyle
=
(
String
)
AccessController
.
doPrivileged
String
inputStyle
=
AccessController
.
doPrivileged
(
new
GetPropertyAction
(
"java.awt.im.style"
,
null
));
// get property from awt.properties file
if
(
inputStyle
==
null
)
{
inputStyle
=
Toolkit
.
getDefaultToolkit
().
getProperty
(
"java.awt.im.style"
,
null
);
inputStyle
=
Toolkit
.
getProperty
(
"java.awt.im.style"
,
null
);
}
belowTheSpotInputRequested
=
"below-the-spot"
.
equals
(
inputStyle
);
}
...
...
src/share/classes/sun/awt/im/InputMethodJFrame.java
浏览文件 @
55f2f042
...
...
@@ -68,4 +68,7 @@ public class InputMethodJFrame
return
super
.
getInputContext
();
}
}
// Proclaim serial compatibility with 1.7.0
private
static
final
long
serialVersionUID
=
-
4705856747771842549L
;
}
src/share/classes/sun/awt/im/InputMethodManager.java
浏览文件 @
55f2f042
...
...
@@ -270,7 +270,7 @@ class ExecutableInputMethodManager extends InputMethodManager
// IM preference stuff
private
static
final
String
preferredIMNode
=
"/sun/awt/im/preferredInputMethod"
;
private
static
final
String
descriptorKey
=
"descriptor"
;
private
Hashtable
preferredLocatorCache
=
new
Hashtable
();
private
Hashtable
<
String
,
InputMethodLocator
>
preferredLocatorCache
=
new
Hashtable
<>
();
private
Preferences
userRoot
;
ExecutableInputMethodManager
()
{
...
...
@@ -430,7 +430,7 @@ class ExecutableInputMethodManager extends InputMethodManager
synchronized
(
javaInputMethodLocatorList
)
{
javaInputMethodLocatorList
.
clear
();
try
{
AccessController
.
doPrivileged
(
new
PrivilegedExceptionAction
()
{
AccessController
.
doPrivileged
(
new
PrivilegedExceptionAction
<
Object
>
()
{
public
Object
run
()
{
for
(
InputMethodDescriptor
descriptor
:
ServiceLoader
.
loadInstalled
(
InputMethodDescriptor
.
class
))
{
...
...
@@ -611,7 +611,7 @@ class ExecutableInputMethodManager extends InputMethodManager
}
// look for the cached preference first.
preferredLocator
=
(
InputMethodLocator
)
preferredLocatorCache
.
get
(
locale
.
toString
().
intern
());
preferredLocator
=
preferredLocatorCache
.
get
(
locale
.
toString
().
intern
());
if
(
preferredLocator
!=
null
)
{
return
preferredLocator
;
}
...
...
@@ -767,8 +767,8 @@ class ExecutableInputMethodManager extends InputMethodManager
}
private
Preferences
getUserRoot
()
{
return
(
Preferences
)
AccessController
.
doPrivileged
(
new
PrivilegedAction
()
{
public
Object
run
()
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Preferences
>
()
{
public
Preferences
run
()
{
return
Preferences
.
userRoot
();
}
});
...
...
src/share/classes/sun/awt/im/SimpleInputMethodWindow.java
浏览文件 @
55f2f042
...
...
@@ -61,4 +61,7 @@ public class SimpleInputMethodWindow
return
super
.
getInputContext
();
}
}
// Proclaim serial compatibility with 1.7.0
private
static
final
long
serialVersionUID
=
5093376647036461555L
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录