src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java

Print this page




  49 /**
  50  * The InputMethodContext class provides methods that input methods
  51  * can use to communicate with their client components.
  52  * It is a subclass of InputContext, which provides methods for use by
  53  * components.
  54  *
  55  * @author JavaSoft International
  56  */
  57 
  58 public class InputMethodContext
  59        extends sun.awt.im.InputContext
  60        implements java.awt.im.spi.InputMethodContext {
  61 
  62     private boolean dispatchingCommittedText;
  63 
  64     // Creation of the context's composition area handler is
  65     // delayed until we really need a composition area.
  66     private CompositionAreaHandler compositionAreaHandler;
  67     private Object compositionAreaHandlerLock = new Object();
  68 
  69     static private boolean belowTheSpotInputRequested;
  70     private boolean inputMethodSupportsBelowTheSpot;
  71 
  72     static {
  73         // check whether we should use below-the-spot input
  74         // get property from command line
  75         String inputStyle = AccessController.doPrivileged
  76                 (new GetPropertyAction("java.awt.im.style", null));
  77         // get property from awt.properties file
  78         if (inputStyle == null) {
  79             inputStyle = Toolkit.getProperty("java.awt.im.style", null);
  80         }
  81         belowTheSpotInputRequested = "below-the-spot".equals(inputStyle);
  82     }
  83 
  84     /**
  85      * Constructs an InputMethodContext.
  86      */
  87     public InputMethodContext() {
  88         super();
  89     }




  49 /**
  50  * The InputMethodContext class provides methods that input methods
  51  * can use to communicate with their client components.
  52  * It is a subclass of InputContext, which provides methods for use by
  53  * components.
  54  *
  55  * @author JavaSoft International
  56  */
  57 
  58 public class InputMethodContext
  59        extends sun.awt.im.InputContext
  60        implements java.awt.im.spi.InputMethodContext {
  61 
  62     private boolean dispatchingCommittedText;
  63 
  64     // Creation of the context's composition area handler is
  65     // delayed until we really need a composition area.
  66     private CompositionAreaHandler compositionAreaHandler;
  67     private Object compositionAreaHandlerLock = new Object();
  68 
  69     private static boolean belowTheSpotInputRequested;
  70     private boolean inputMethodSupportsBelowTheSpot;
  71 
  72     static {
  73         // check whether we should use below-the-spot input
  74         // get property from command line
  75         String inputStyle = AccessController.doPrivileged
  76                 (new GetPropertyAction("java.awt.im.style", null));
  77         // get property from awt.properties file
  78         if (inputStyle == null) {
  79             inputStyle = Toolkit.getProperty("java.awt.im.style", null);
  80         }
  81         belowTheSpotInputRequested = "below-the-spot".equals(inputStyle);
  82     }
  83 
  84     /**
  85      * Constructs an InputMethodContext.
  86      */
  87     public InputMethodContext() {
  88         super();
  89     }