⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inputmethod.java

📁 java1.6众多例子参考
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     * they are dispatched to the component's methods or event listeners.     * The input method decides whether it needs to handle the event. If it     * does, it also calls the event's <code>consume</code> method; this     * causes the event to not get dispatched to the component's event     * processing methods or event listeners.     * <p>     * Events are dispatched if they are instances of InputEvent or its     * subclasses.     * This includes instances of the AWT classes KeyEvent and MouseEvent.     * <p>     * This method is called by {@link java.awt.im.InputContext#dispatchEvent InputContext.dispatchEvent}.     *     * @param event the event being dispatched to the input method     * @exception NullPointerException if <code>event</code> is null     */    public void dispatchEvent(AWTEvent event);    /**     * Notifies this input method of changes in the client window     * location or state. This method is called while this input     * method is the current input method of its input context and     * notifications for it are enabled (see {@link     * InputMethodContext#enableClientWindowNotification     * InputMethodContext.enableClientWindowNotification}). Calls     * to this method are temporarily suspended if the input context's     * {@link java.awt.im.InputContext#removeNotify removeNotify}     * method is called, and resume when the input method is activated     * for a new client component. It is called in the following     * situations:     * <ul>     * <li>     * when the window containing the current client component changes     * in location, size, visibility, iconification state, or when the     * window is closed.</li>     * <li>     * from <code> enableClientWindowNotification(inputMethod,     * true)</code> if the current client component exists,</li>     * <li>     * when activating the input method for the first time after it     * called     * <code>enableClientWindowNotification(inputMethod,     * true)</code> if during the call no current client component was     * available,</li>     * <li>     * when activating the input method for a new client component     * after the input context's removeNotify method has been     * called.</li>     * </ul>     * @param bounds client window's {@link     * java.awt.Component#getBounds bounds} on the screen; or null if     * the client window is iconified or invisible     */    public void notifyClientWindowChange(Rectangle bounds);    /**     * Activates the input method for immediate input processing.     * <p>     * If an input method provides its own windows, it should make sure     * at this point that all necessary windows are open and visible.     * <p>     * This method is called     * <ul>     * <li>by {@link java.awt.im.InputContext#dispatchEvent InputContext.dispatchEvent}     *     when a client component receives a FOCUS_GAINED event,     * <li>when switching to this input method from a different one using the     *     user interface or     *     {@link java.awt.im.InputContext#selectInputMethod InputContext.selectInputMethod}.     * </ul>     * The method is only called when the input method is inactive.     * A newly instantiated input method is assumed to be inactive.     */    public void activate();    /**     * Deactivates the input method.     * The isTemporary argument has the same meaning as in     * {@link java.awt.event.FocusEvent#isTemporary FocusEvent.isTemporary}.     * <p>     * If an input method provides its own windows, only windows that relate     * to the current composition (such as a lookup choice window) should be     * closed at this point.     * It is possible that the input method will be immediately activated again     * for a different client component, and closing and reopening more     * persistent windows (such as a control panel) would create unnecessary     * screen flicker.     * Before an instance of a different input method class is activated,     * {@link #hideWindows} is called on the current input method.     * <p>     * This method is called     * <ul>     * <li>by {@link java.awt.im.InputContext#dispatchEvent InputContext.dispatchEvent}     *     when a client component receives a FOCUS_LOST event,     * <li>when switching from this input method to a different one using the     *     user interface or     *     {@link java.awt.im.InputContext#selectInputMethod InputContext.selectInputMethod},     * <li>before {@link #removeNotify removeNotify} if the current client component is     *     removed.     * </ul>     * The method is only called when the input method is active.     *     * @param isTemporary whether the focus change is temporary     */    public void deactivate(boolean isTemporary);    /**     * Closes or hides all windows opened by this input method instance or     * its class.     * <p>     * This method is called     * <ul>     * <li>before calling {@link #activate activate} on an instance of a different input     *     method class,     * <li>before calling {@link #dispose dispose} on this input method.     * </ul>     * The method is only called when the input method is inactive.     */    public void hideWindows();      /**     * Notifies the input method that a client component has been     * removed from its containment hierarchy, or that input method     * support has been disabled for the component.     * <p>     * This method is called by {@link java.awt.im.InputContext#removeNotify InputContext.removeNotify}.     * <p>     * The method is only called when the input method is inactive.     */    public void removeNotify();    /**     * 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.     *     * <p>     * 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.     * <p>     * This method is called     * <ul>     * <li>by {@link java.awt.im.InputContext#endComposition InputContext.endComposition},     * <li>by {@link java.awt.im.InputContext#dispatchEvent InputContext.dispatchEvent}     *     when switching to a different client component     * <li>when switching from this input method to a different one using the     *     user interface or     *     {@link java.awt.im.InputContext#selectInputMethod InputContext.selectInputMethod}.     * </ul>     */    public void endComposition();    /**     * Releases the resources used by this input method.     * In particular, the input method should dispose windows and close files that are no     * longer needed.     * <p>     * This method is called by {@link java.awt.im.InputContext#dispose InputContext.dispose}.     * <p>     * The method is only called when the input method is inactive.     * No method of this interface is called on this instance after dispose.     */    public void dispose();    /**     * Returns a control object from this input method, or null. A     * control object provides methods that control the behavior of the     * input method or obtain information from the input method. The type     * of the object is an input method specific class. Clients have to     * compare the result against known input method control object     * classes and cast to the appropriate class to invoke the methods     * provided.     * <p>     * This method is called by     * {@link java.awt.im.InputContext#getInputMethodControlObject InputContext.getInputMethodControlObject}.     *     * @return a control object from this input method, or null     */    public Object getControlObject();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -