< prev index next >

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

Print this page




  71      * <ul>
  72      * <li>it floats above all document windows and dialogs
  73      * <li>it and all components that it contains do not receive the focus
  74      * <li>it has lightweight decorations, such as a reduced drag region without title
  75      * </ul>
  76      * However, the actual behavior with respect to these three items is platform dependent.
  77      * <p>
  78      * The title may or may not be displayed, depending on the actual type of window created.
  79      * <p>
  80      * If attachToInputContext is true, the new window will share the input context that
  81      * corresponds to this input method context, so that events for components in the window
  82      * are automatically dispatched to the input method.
  83      * Also, when the window is opened using setVisible(true), the input context will prevent
  84      * deactivate and activate calls to the input method that might otherwise be caused.
  85      * <p>
  86      * Input methods must call {@link java.awt.Window#dispose() Window.dispose} on the
  87      * returned input method window when it is no longer needed.
  88      *
  89      * @param title the title to be displayed in the window's title bar,
  90      *              if there is such a title bar.
  91      *              A <code>null</code> value is treated as an empty string, "".
  92      * @param attachToInputContext whether this window should share the input context
  93      *              that corresponds to this input method context
  94      * @return a window with special characteristics for use by input methods
  95      * @exception HeadlessException if <code>GraphicsEnvironment.isHeadless
  96      *              </code> returns <code>true</code>
  97      */
  98     public Window createInputMethodWindow(String title, boolean attachToInputContext);
  99 
 100     /**
 101      * Creates a top-level Swing JFrame for use by the input method.
 102      * The intended behavior of this window is:
 103      * <ul>
 104      * <li>it floats above all document windows and dialogs
 105      * <li>it and all components that it contains do not receive the focus
 106      * <li>it has lightweight decorations, such as a reduced drag region without title
 107      * </ul>
 108      * However, the actual behavior with respect to these three items is platform dependent.
 109      * <p>
 110      * The title may or may not be displayed, depending on the actual type of window created.
 111      * <p>
 112      * If attachToInputContext is true, the new window will share the input context that
 113      * corresponds to this input method context, so that events for components in the window
 114      * are automatically dispatched to the input method.
 115      * Also, when the window is opened using setVisible(true), the input context will prevent
 116      * deactivate and activate calls to the input method that might otherwise be caused.
 117      * <p>
 118      * Input methods must call {@link java.awt.Window#dispose() Window.dispose} on the
 119      * returned input method window when it is no longer needed.
 120      *
 121      * @param title the title to be displayed in the window's title bar,
 122      *              if there is such a title bar.
 123      *              A <code>null</code> value is treated as an empty string, "".
 124      * @param attachToInputContext whether this window should share the input context
 125      *              that corresponds to this input method context
 126      * @return a JFrame with special characteristics for use by input methods
 127      * @exception HeadlessException if <code>GraphicsEnvironment.isHeadless
 128      *              </code> returns <code>true</code>
 129      *
 130      * @since 1.4
 131      */
 132     public JFrame createInputMethodJFrame(String title, boolean attachToInputContext);
 133 
 134     /**
 135      * Enables or disables notification of the current client window's
 136      * location and state for the specified input method. When
 137      * notification is enabled, the input method's {@link
 138      * java.awt.im.spi.InputMethod#notifyClientWindowChange
 139      * notifyClientWindowChange} method is called as described in that
 140      * method's specification. Notification is automatically disabled
 141      * when the input method is disposed.
 142      *
 143      * @param inputMethod the input method for which notifications are
 144      * enabled or disabled
 145      * @param enable true to enable, false to disable
 146      */
 147     public void enableClientWindowNotification(InputMethod inputMethod, boolean enable);
 148 }


  71      * <ul>
  72      * <li>it floats above all document windows and dialogs
  73      * <li>it and all components that it contains do not receive the focus
  74      * <li>it has lightweight decorations, such as a reduced drag region without title
  75      * </ul>
  76      * However, the actual behavior with respect to these three items is platform dependent.
  77      * <p>
  78      * The title may or may not be displayed, depending on the actual type of window created.
  79      * <p>
  80      * If attachToInputContext is true, the new window will share the input context that
  81      * corresponds to this input method context, so that events for components in the window
  82      * are automatically dispatched to the input method.
  83      * Also, when the window is opened using setVisible(true), the input context will prevent
  84      * deactivate and activate calls to the input method that might otherwise be caused.
  85      * <p>
  86      * Input methods must call {@link java.awt.Window#dispose() Window.dispose} on the
  87      * returned input method window when it is no longer needed.
  88      *
  89      * @param title the title to be displayed in the window's title bar,
  90      *              if there is such a title bar.
  91      *              A {@code null} value is treated as an empty string, "".
  92      * @param attachToInputContext whether this window should share the input context
  93      *              that corresponds to this input method context
  94      * @return a window with special characteristics for use by input methods
  95      * @exception HeadlessException if {@code GraphicsEnvironment.isHeadless}
  96      *            returns {@code true}
  97      */
  98     public Window createInputMethodWindow(String title, boolean attachToInputContext);
  99 
 100     /**
 101      * Creates a top-level Swing JFrame for use by the input method.
 102      * The intended behavior of this window is:
 103      * <ul>
 104      * <li>it floats above all document windows and dialogs
 105      * <li>it and all components that it contains do not receive the focus
 106      * <li>it has lightweight decorations, such as a reduced drag region without title
 107      * </ul>
 108      * However, the actual behavior with respect to these three items is platform dependent.
 109      * <p>
 110      * The title may or may not be displayed, depending on the actual type of window created.
 111      * <p>
 112      * If attachToInputContext is true, the new window will share the input context that
 113      * corresponds to this input method context, so that events for components in the window
 114      * are automatically dispatched to the input method.
 115      * Also, when the window is opened using setVisible(true), the input context will prevent
 116      * deactivate and activate calls to the input method that might otherwise be caused.
 117      * <p>
 118      * Input methods must call {@link java.awt.Window#dispose() Window.dispose} on the
 119      * returned input method window when it is no longer needed.
 120      *
 121      * @param title the title to be displayed in the window's title bar,
 122      *              if there is such a title bar.
 123      *              A {@code null} value is treated as an empty string, "".
 124      * @param attachToInputContext whether this window should share the input context
 125      *              that corresponds to this input method context
 126      * @return a JFrame with special characteristics for use by input methods
 127      * @exception HeadlessException if {@code GraphicsEnvironment.isHeadless}
 128      *            returns {@code true}
 129      *
 130      * @since 1.4
 131      */
 132     public JFrame createInputMethodJFrame(String title, boolean attachToInputContext);
 133 
 134     /**
 135      * Enables or disables notification of the current client window's
 136      * location and state for the specified input method. When
 137      * notification is enabled, the input method's {@link
 138      * java.awt.im.spi.InputMethod#notifyClientWindowChange
 139      * notifyClientWindowChange} method is called as described in that
 140      * method's specification. Notification is automatically disabled
 141      * when the input method is disposed.
 142      *
 143      * @param inputMethod the input method for which notifications are
 144      * enabled or disabled
 145      * @param enable true to enable, false to disable
 146      */
 147     public void enableClientWindowNotification(InputMethod inputMethod, boolean enable);
 148 }
< prev index next >