| sun.awt.X11InputMethod
All known Subclasses: sun.awt.X11.XInputMethod, sun.awt.motif.MInputMethod,
X11InputMethod | abstract public class X11InputMethod extends InputMethodAdapter (Code) | | Input Method Adapter for XIM
author: JavaSoft International |
Constructor Summary | |
public | X11InputMethod() Constructs an X11InputMethod instance. |
Method Summary | |
public synchronized void | activate() Activate input method. | abstract protected void | awtLock() | abstract protected void | awtUnlock() | abstract protected boolean | createXIC() | public synchronized void | deactivate(boolean isTemporary) Deactivate input method. | public void | disableInputMethod() Explicitly disable the native IME. | void | dispatchCommittedText(String str, long when) Dispatches committed text from XIM to the awt event queue. | void | dispatchComposedText(String chgText, int chgStyles, int chgOffset, int chgLength, int caretPosition, long when) Updates composed text with XIM preedit information and
posts composed text to the awt event queue. | public void | dispatchEvent(AWTEvent e) Dispatch event to input method. | final public void | dispose() Frees all X Window resources associated with this object. | protected synchronized void | disposeImpl() | public void | endComposition() Ends any input composition that may currently be going on in this
context. | protected void | finalize() | void | flushText() Flushes composed and committed text held in this context. | public Object | getControlObject() Returns null. | public Locale | getLocale() Returns current input locale. | public String | getNativeInputMethodInfo() Returns a string with information about the current input method server, or null.
On both Linux & SunOS, the value of environment variable XMODIFIERS is
returned if set. | abstract protected Container | getParent(Component client) | abstract protected ComponentPeer | getPeer(Component client) Returns peer of the given client component. | public void | hideWindows() | public boolean | isCompositionEnabled() | protected boolean | isDisposed() | public static Map | mapInputMethodHighlight(InputMethodHighlight highlight) | abstract protected boolean | openXIM() | public synchronized void | removeNotify() | native protected String | resetXIC() | final protected void | resetXICifneeded() | protected void | setAWTFocussedComponent(Component component) | public void | setCharacterSubsets(Subset[] subsets) Does nothing - XIM doesn't let you specify which characters you expect. | public void | setCompositionEnabled(boolean enable) | public void | setInputMethodContext(InputMethodContext context) Does nothing - this adapter doesn't use the input method context. | public boolean | setLocale(Locale lang) Set locale to input. | abstract protected void | setXICFocus(ComponentPeer peer, boolean value, boolean active) | protected void | stopListening() |
X11InputMethod | public X11InputMethod() throws AWTException(Code) | | Constructs an X11InputMethod instance. It initializes the XIM
environment if it's not done yet.
exception: AWTException - if XOpenIM() failed. |
activate | public synchronized void activate()(Code) | | Activate input method.
|
awtLock | abstract protected void awtLock()(Code) | | Used to protect preedit data
|
awtUnlock | abstract protected void awtUnlock()(Code) | | |
createXIC | abstract protected boolean createXIC()(Code) | | |
deactivate | public synchronized void deactivate(boolean isTemporary)(Code) | | Deactivate input method.
|
disableInputMethod | public void disableInputMethod()(Code) | | Explicitly disable the native IME. Native IME is not disabled when
deactivate is called.
|
dispatchCommittedText | void dispatchCommittedText(String str, long when)(Code) | | Dispatches committed text from XIM to the awt event queue. This
method is invoked from the event handler in canvas.c in the
AWT Toolkit thread context and thus inside the AWT Lock.
Parameters: str - committed text long when |
dispatchComposedText | void dispatchComposedText(String chgText, int chgStyles, int chgOffset, int chgLength, int caretPosition, long when)(Code) | | Updates composed text with XIM preedit information and
posts composed text to the awt event queue. The args of
this method correspond to the XIM preedit callback
information. The XIM highlight attributes are translated via
fixed mapping (i.e., independent from any underlying input
method engine). This method is invoked in the AWT Toolkit
(X event loop) thread context and thus inside the AWT Lock.
|
dispatchEvent | public void dispatchEvent(AWTEvent e)(Code) | | Dispatch event to input method. InputContext dispatch event with this
method. Input method set consume flag if event is consumed in
input method.
Parameters: e - event |
disposeImpl | protected synchronized void disposeImpl()(Code) | | |
endComposition | public void endComposition()(Code) | | Ends any input composition that may currently be going on in this
context. Depending on the platform and possibly user preferences,
this may commit or delete uncommitted text. Any changes to the text
are communicated to the active component using an input method event.
A text editing component may call this in a variety of situations,
for example, when the user moves the insertion point within the text
(but outside the composed text), or when the component's text is
saved to a file or copied to the clipboard.
|
flushText | void flushText()(Code) | | Flushes composed and committed text held in this context.
This method is invoked in the AWT Toolkit (X event loop) thread context
and thus inside the AWT Lock.
|
getLocale | public Locale getLocale()(Code) | | Returns current input locale.
|
getNativeInputMethodInfo | public String getNativeInputMethodInfo()(Code) | | Returns a string with information about the current input method server, or null.
On both Linux & SunOS, the value of environment variable XMODIFIERS is
returned if set. Otherwise, on SunOS, $HOME/.dtprofile will be parsed
to find out the language service engine (atok or wnn) since there is
no API in Xlib which returns the information of native
IM server or language service and we want to try our best to return as much
information as possible.
Note: This method could return null on Linux if XMODIFIERS is not set properly or
if any IOException is thrown.
See man page of XSetLocaleModifiers(3X11) for the usgae of XMODIFIERS,
atok12setup(1) and wnn6setup(1) for the information written to
$HOME/.dtprofile when you run these two commands.
|
getPeer | abstract protected ComponentPeer getPeer(Component client)(Code) | | Returns peer of the given client component. If the given client component
doesn't have peer, peer of the native container of the client is returned.
|
hideWindows | public void hideWindows()(Code) | | |
isDisposed | protected boolean isDisposed()(Code) | | |
openXIM | abstract protected boolean openXIM()(Code) | | |
resetXICifneeded | final protected void resetXICifneeded()(Code) | | |
setAWTFocussedComponent | protected void setAWTFocussedComponent(Component component)(Code) | | See Also: sun.awt.im.InputMethodAdapter.setAWTFocussedComponent |
setLocale | public boolean setLocale(Locale lang)(Code) | | Set locale to input. If input method doesn't support specified locale,
false will be returned and its behavior is not changed.
Parameters: lang - locale to input the true is returned when specified locale is supported. |
setXICFocus | abstract protected void setXICFocus(ComponentPeer peer, boolean value, boolean active)(Code) | | |
stopListening | protected void stopListening()(Code) | | See Also: sun.awt.im.InputMethodAdapter.stopListening |
|
|