inputmethod.html
来自「API資料大全」· HTML 代码 · 共 674 行 · 第 1/3 页
HTML
674 行
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><DD><DL><DT><B>Parameters:</B><DD><CODE>bounds</CODE> - client window's <A HREF="../../../../java/awt/Component.html#getBounds()"><CODE>bounds</CODE></A> on the screen; or null if the client window is iconified or invisible</DL></DD></DL><HR><A NAME="activate()"><!-- --></A><H3>activate</H3><PRE>public void <B>activate</B>()</PRE><DL><DD>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 <A HREF="../../../../java/awt/im/InputContext.html#dispatchEvent(java.awt.AWTEvent)"><CODE>InputContext.dispatchEvent</CODE></A> 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 <A HREF="../../../../java/awt/im/InputContext.html#selectInputMethod(java.util.Locale)"><CODE>InputContext.selectInputMethod</CODE></A>. </ul> The method is only called when the input method is inactive. A newly instantiated input method is assumed to be inactive.</DL><HR><A NAME="deactivate(boolean)"><!-- --></A><H3>deactivate</H3><PRE>public void <B>deactivate</B>(boolean isTemporary)</PRE><DL><DD>Deactivates the input method. The isTemporary argument has the same meaning as in <A HREF="../../../../java/awt/event/FocusEvent.html#isTemporary()"><CODE>FocusEvent.isTemporary</CODE></A>. <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, <A HREF="../../../../java/awt/im/spi/InputMethod.html#hideWindows()"><CODE>hideWindows()</CODE></A> is called on the current input method. <p> This method is called <ul> <li>by <A HREF="../../../../java/awt/im/InputContext.html#dispatchEvent(java.awt.AWTEvent)"><CODE>InputContext.dispatchEvent</CODE></A> 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 <A HREF="../../../../java/awt/im/InputContext.html#selectInputMethod(java.util.Locale)"><CODE>InputContext.selectInputMethod</CODE></A>, <li>before <A HREF="../../../../java/awt/im/spi/InputMethod.html#removeNotify()"><CODE>removeNotify</CODE></A> if the current client component is removed. </ul> The method is only called when the input method is active.<DD><DL><DT><B>Parameters:</B><DD><CODE>isTemporary</CODE> - whether the focus change is temporary</DL></DD></DL><HR><A NAME="hideWindows()"><!-- --></A><H3>hideWindows</H3><PRE>public void <B>hideWindows</B>()</PRE><DL><DD>Closes or hides all windows opened by this input method instance or its class. <p> This method is called <ul> <li>before calling <A HREF="../../../../java/awt/im/spi/InputMethod.html#activate()"><CODE>activate</CODE></A> on an instance of a different input method class, <li>before calling <A HREF="../../../../java/awt/im/spi/InputMethod.html#dispose()"><CODE>dispose</CODE></A> on this input method. </ul> The method is only called when the input method is inactive.</DL><HR><A NAME="removeNotify()"><!-- --></A><H3>removeNotify</H3><PRE>public void <B>removeNotify</B>()</PRE><DL><DD>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 <A HREF="../../../../java/awt/im/InputContext.html#removeNotify(java.awt.Component)"><CODE>InputContext.removeNotify</CODE></A>. <p> The method is only called when the input method is inactive.</DL><HR><A NAME="endComposition()"><!-- --></A><H3>endComposition</H3><PRE>public void <B>endComposition</B>()</PRE><DL><DD>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 <A HREF="../../../../java/awt/im/InputContext.html#endComposition()"><CODE>InputContext.endComposition</CODE></A>, <li>by <A HREF="../../../../java/awt/im/InputContext.html#dispatchEvent(java.awt.AWTEvent)"><CODE>InputContext.dispatchEvent</CODE></A> when switching to a different client component <li>when switching from this input method to a different one using the user interface or <A HREF="../../../../java/awt/im/InputContext.html#selectInputMethod(java.util.Locale)"><CODE>InputContext.selectInputMethod</CODE></A>. </ul></DL><HR><A NAME="dispose()"><!-- --></A><H3>dispose</H3><PRE>public void <B>dispose</B>()</PRE><DL><DD>Disposes of the input method and releases the resources used by it. In particular, the input method should dispose windows and close files that are no longer needed. <p> This method is called by <A HREF="../../../../java/awt/im/InputContext.html#dispose()"><CODE>InputContext.dispose</CODE></A>. <p> The method is only called when the input method is inactive. No method of this interface is called on this instance after dispose.</DL><HR><A NAME="getControlObject()"><!-- --></A><H3>getControlObject</H3><PRE>public <A HREF="../../../../java/lang/Object.html">Object</A> <B>getControlObject</B>()</PRE><DL><DD>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 <A HREF="../../../../java/awt/im/InputContext.html#getInputMethodControlObject()"><CODE>InputContext.getInputMethodControlObject</CODE></A>.<DD><DL><DT><B>Returns:</B><DD>a control object from this input method, or null</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/InputMethod.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../../java/awt/im/spi/InputMethodContext.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="InputMethod.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?