APIdia Launch Partner
Top Description Fields Constructors Methods
sun.awt

public abstract Class X11InputMethod

extends X11InputMethodBase
Class Inheritance
Known Direct Subclasses
sun.awt.X11.XInputMethod
Imports
java.awt.AWTException, java.awt.event.InputMethodEvent, java.awt.font.TextAttribute, .TextHitInfo, java.awt.peer.ComponentPeer, java.text.AttributedString, sun.util.logging.PlatformLogger

Input Method Adapter for XIM
Author
JavaSoft International

Field Summary

Inherited from sun.awt.X11InputMethodBase:
awtFocussedComponentclientComponentWindowcommittedTextcomposedTextcompositionEnableSupporteddisposedINITIAL_SIZEisActiveisLastTemporaryisLastXICActivelastXICFocussedComponentlogneedResetXICpDatarawFeedbackssavedCompositionStateXIMVisibleCenterXIMVisibleMaskXIMVisibleToBackwardXIMVisibleToForward

Constructor Summary

AccessConstructor and Description
public
X11InputMethod()

Constructs an X11InputMethod instance.

Method Summary

Modifier and TypeMethod and Description
public synchronized void
activate()

Implements abstract sun.awt.X11InputMethodBase.activate.

Implements java.awt.im.spi.InputMethod.activate.

Activate input method.

public synchronized void
deactivate(boolean isTemporary)

Implements abstract sun.awt.X11InputMethodBase.deactivate.

Implements java.awt.im.spi.InputMethod.deactivate.

Deactivate input method.

pack-priv void
dispatchComposedText(String chgText, int[] chgStyles, int chgOffset, int chgLength, int caretPosition, long when)

Implements abstract sun.awt.X11InputMethodBase.dispatchComposedText.

Updates composed text with XIM preedit information and posts composed text to the awt event queue.

protected synchronized void
public void
hideWindows()

Implements abstract sun.awt.X11InputMethodBase.hideWindows.

Implements java.awt.im.spi.InputMethod.hideWindows.

Closes or hides all windows opened by this input method instance or its class.

protected void
resetCompositionState()

Implements abstract sun.awt.X11InputMethodBase.resetCompositionState.

Reset the composition state to the current composition state.

public void
setCompositionEnabled(boolean enable)

Implements abstract sun.awt.X11InputMethodBase.setCompositionEnabled.

Implements java.awt.im.spi.InputMethod.setCompositionEnabled.

Enables or disables this input method for composition, depending on the value of the parameter enable.

Inherited from sun.awt.X11InputMethodBase:
awtLockawtUnlockconvertVisualFeedbackToHighlightcreateXICdisableInputMethoddispatchCommittedTextdispatchEventdisposedisposeXICendCompositionflushTextgetClientComponentWindowgetCompositionStategetControlObjectgetLocalegetNativeInputMethodInfogetParentgetPeerisCompositionEnabledisDisposedmapInputMethodHighlightopenXIMpostInputMethodEventremoveNotifyresetXICifneededsetAWTFocussedComponentsetCharacterSubsetssetCompositionEnabledNativesetInputMethodContextsetLocalesetXICFocusstopListeningturnoffStatusWindow

Constructor Detail

X11InputMethodback to summary
public X11InputMethod() throws AWTException

Constructs an X11InputMethod instance. It initializes the XIM environment if it's not done yet.

Exceptions
AWTException:
if XOpenIM() failed.

Method Detail

activateback to summary
public synchronized void activate()

Implements abstract sun.awt.X11InputMethodBase.activate.

Implements java.awt.im.spi.InputMethod.activate.

Activate input method.

Annotations
@Override
deactivateback to summary
public synchronized void deactivate(boolean isTemporary)

Implements abstract sun.awt.X11InputMethodBase.deactivate.

Implements java.awt.im.spi.InputMethod.deactivate.

Deactivate input method.

Annotations
@Override
dispatchComposedTextback to summary
pack-priv void dispatchComposedText(String chgText, int[] chgStyles, int chgOffset, int chgLength, int caretPosition, long when)

Implements abstract sun.awt.X11InputMethodBase.dispatchComposedText.

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.

Annotations
@Override
disposeImplback to summary
protected synchronized void disposeImpl()

Implements abstract sun.awt.X11InputMethodBase.disposeImpl.

Annotations
@Override
hideWindowsback to summary
public void hideWindows()

Implements abstract sun.awt.X11InputMethodBase.hideWindows.

Implements java.awt.im.spi.InputMethod.hideWindows.

Doc from java.awt.im.spi.InputMethod.hideWindows.

Closes or hides all windows opened by this input method instance or its class.

This method is called

  • before calling activate on an instance of a different input method class,
  • before calling dispose on this input method.
The method is only called when the input method is inactive.
Annotations
@Override
resetCompositionStateback to summary
protected void resetCompositionState()

Implements abstract sun.awt.X11InputMethodBase.resetCompositionState.

Reset the composition state to the current composition state.

Annotations
@Override
setCompositionEnabledback to summary
public void setCompositionEnabled(boolean enable)

Implements abstract sun.awt.X11InputMethodBase.setCompositionEnabled.

Implements java.awt.im.spi.InputMethod.setCompositionEnabled.

Doc from java.awt.im.spi.InputMethod.setCompositionEnabled.

Enables or disables this input method for composition, depending on the value of the parameter enable.

An input method that is enabled for composition interprets incoming events for both composition and control purposes, while a disabled input method does not interpret events for composition. Note however that events are passed on to the input method regardless whether it is enabled or not, and that an input method that is disabled for composition may still interpret events for control purposes, including to enable or disable itself for composition.

For input methods provided by host operating systems, it is not always possible to determine whether this operation is supported. For example, an input method may enable composition only for some locales, and do nothing for other locales. For such input methods, it is possible that this method does not throw UnsupportedOperationException, but also does not affect whether composition is enabled.

This method is called

Annotations
@Override
See Also
java.awt.im.spi.InputMethod#setCompositionEnabled(boolean)