public interface InputMethodDescriptor
Modifier and Type | Method and Description |
---|---|
InputMethod |
createInputMethod()
创建相应的输入法的一个新实例。
|
Locale[] |
getAvailableLocales()
返回由相应的输入法支持的区域设置。
|
String |
getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage)
返回在该名称将显示的语言中给定的输入区域设置的相应输入法的用户可见名称。
|
Image |
getInputMethodIcon(Locale inputLocale)
返回相应的输入法的图标。
|
boolean |
hasDynamicLocaleList()
返回是否可用语言列表可以在运行时改变。
|
Locale[] getAvailableLocales() throws AWTException
InputContext.selectInputMethod(Locale)
)。它也可以用于在输入方法的用户可见列表中的区域设置对输入方法进行排序。
只有输入法的主要场所应退还。例如,如果一个日本的输入法也有一个通过模式为罗马字符,通常仍然只有日本将返回。因此,返回的地点列表通常是一个子集的场所,InputMethod.setLocale(java.util.Locale)
相应输入法的实现返回true。
如果hasDynamicLocaleList()
返回true,这种方法被称为每一次所需的信息。这给输入方法依赖于网络资源的机会来添加或删除场所资源可用或不可用。
AWTException
-如果可以确定,输入法是无法使用的,例如,由于不完全安装。
boolean hasDynamicLocaleList()
String getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage)
的inputlocale参数指定区域设置为文本输入。这个参数只能从这个描述符的getAvailableLocales()
法或空值。如果它为空,则返回输入法的输入区域设置独立的名称。
如果所需的显示语言的名称不可用,则该方法可能会返回到其他语言。
inputLocale
-区域设置为文本输入支持,或空
displayLanguage
-语言中的名称将显示
Image getInputMethodIcon(Locale inputLocale)
的inputlocale参数指定区域设置为文本输入。这个参数只能从这个描述符的getAvailableLocales()
法或空值。如果它为空,则应返回输入法的输入区域设置独立的图标。
该图标的大小应为16像素16像素。
inputLocale
-区域设置为文本输入支持,或空
InputMethod createInputMethod() throws 异常
异常
-可能在创建输入法实例发生任何异常
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.