< prev index next >

src/java.desktop/unix/classes/sun/awt/X11InputMethod.java

Print this page




  38  * Input Method Adapter for XIM
  39  *
  40  * @author JavaSoft International
  41  */
  42 public abstract class X11InputMethod extends X11InputMethodBase {
  43 
  44     /**
  45      * Constructs an X11InputMethod instance. It initializes the XIM
  46      * environment if it's not done yet.
  47      *
  48      * @exception AWTException if XOpenIM() failed.
  49      */
  50     public X11InputMethod() throws AWTException {
  51         super();
  52     }
  53 
  54     /**
  55      * Reset the composition state to the current composition state.
  56      */
  57     protected void resetCompositionState() {
  58         if (compositionEnableSupported) {
  59             try {
  60                 /* Restore the composition mode to the last saved composition
  61                    mode. */
  62                 setCompositionEnabled(savedCompositionState);
  63             } catch (UnsupportedOperationException e) {
  64                 compositionEnableSupported = false;
  65             }
  66         }
  67     }
  68 
  69     /**
  70      * Activate input method.
  71      */
  72     public synchronized void activate() {
  73         clientComponentWindow = getClientComponentWindow();
  74         if (clientComponentWindow == null)
  75             return;
  76 
  77         if (lastXICFocussedComponent != null) {
  78             if (log.isLoggable(PlatformLogger.Level.FINE)) {




  38  * Input Method Adapter for XIM
  39  *
  40  * @author JavaSoft International
  41  */
  42 public abstract class X11InputMethod extends X11InputMethodBase {
  43 
  44     /**
  45      * Constructs an X11InputMethod instance. It initializes the XIM
  46      * environment if it's not done yet.
  47      *
  48      * @exception AWTException if XOpenIM() failed.
  49      */
  50     public X11InputMethod() throws AWTException {
  51         super();
  52     }
  53 
  54     /**
  55      * Reset the composition state to the current composition state.
  56      */
  57     protected void resetCompositionState() {
  58         if (compositionEnableSupported && haveActiveClient()) {
  59             try {
  60                 /* Restore the composition mode to the last saved composition
  61                    mode. */
  62                 setCompositionEnabled(savedCompositionState);
  63             } catch (UnsupportedOperationException e) {
  64                 compositionEnableSupported = false;
  65             }
  66         }
  67     }
  68 
  69     /**
  70      * Activate input method.
  71      */
  72     public synchronized void activate() {
  73         clientComponentWindow = getClientComponentWindow();
  74         if (clientComponentWindow == null)
  75             return;
  76 
  77         if (lastXICFocussedComponent != null) {
  78             if (log.isLoggable(PlatformLogger.Level.FINE)) {


< prev index next >