public interface InputMethodContext extends InputMethodRequests
InputMethod.setInputMethodContext(java.awt.im.spi.InputMethodContext)
实例方法。不应该有其他的用户或用户。
Modifier and Type | Method and Description |
---|---|
JFrame |
createInputMethodJFrame(String title, boolean attachToInputContext)
创建使用的输入法的顶级摇摆功能。
|
Window |
createInputMethodWindow(String title, boolean attachToInputContext)
通过输入方法创建一个顶级窗口。
|
void |
dispatchInputMethodEvent(int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
创建从给定的参数输入法事件分派到客户端组件。
|
void |
enableClientWindowNotification(InputMethod inputMethod, boolean enable)
启用或禁用当前客户端窗口的位置和状态的通知,用于指定的输入方法。
|
cancelLatestCommittedText, getCommittedText, getCommittedTextLength, getInsertPositionOffset, getLocationOffset, getSelectedText, getTextLocation
void dispatchInputMethodEvent(int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
InputMethodEvent.InputMethodEvent(java.awt.Component, int, java.awt.font.TextHitInfo, java.awt.font.TextHitInfo)
。
Window createInputMethodWindow(String title, boolean attachToInputContext)
标题可能或可能不显示,这取决于创建的窗口的实际类型。
如果attachtoinputcontext是真实的,新的窗口将对应于该输入法的输入上下文语境,使事件在窗口组件自动发送到输入法。另外,当窗口打开使用setVisible(true),输入上下文将防止失活和激活调用输入法,否则可能会引起。
输入方法必须调用Window.dispose
在返回输入法窗口时,它不再需要。
title
-标题是窗口标题栏中显示出来,如果有这样的一个标题栏。一个
null
值为空字符串“”。
attachToInputContext
——无论这个窗口应该分享对应于该输入法的输入上下文语境
HeadlessException
-如果
GraphicsEnvironment.isHeadless
返回
true
JFrame createInputMethodJFrame(String title, boolean attachToInputContext)
标题可能或可能不显示,这取决于创建的窗口的实际类型。
如果attachtoinputcontext是真实的,新的窗口将对应于该输入法的输入上下文语境,使事件在窗口组件自动发送到输入法。另外,当窗口打开使用setVisible(true),输入上下文将防止失活和激活调用输入法,否则可能会引起。
输入方法必须调用返回的输入法窗口Window.dispose
当不再需要它。
title
-标题是窗口标题栏中显示出来,如果有这样的一个标题栏。一个
null
值为空字符串“”。
attachToInputContext
——无论这个窗口应该分享对应于该输入法的输入上下文语境
HeadlessException
-如果
GraphicsEnvironment.isHeadless
返回
true
void enableClientWindowNotification(InputMethod inputMethod, boolean enable)
notifyClientWindowChange
方法称为该方法的描述。当输入方法处理时自动禁用通知。
inputMethod
-输入方法,通知启用或禁用
enable
真使,假禁用
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.