inputmethodrequests.html
来自「API資料大全」· HTML 代码 · 共 413 行 · 第 1/2 页
HTML
413 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:33:53 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Interface InputMethodRequests</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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/InputMethodRequests.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 NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="InputMethodRequests.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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.im</FONT><BR>Interface InputMethodRequests</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../java/awt/im/spi/InputMethodContext.html">InputMethodContext</A></DD></DL><HR><DL><DT>public interface <B>InputMethodRequests</B></DL><P>InputMethodRequests defines the requests that a text editing component has to handle in order to work with input methods. The component can implement this interface itself or use a separate object that implements it. The object implementing this interface must be returned from the component's getInputMethodRequests method. <p> The text editing component also has to provide an input method event listener. <p> The interface is designed to support one of two input user interfaces: <ul> <li><em>on-the-spot</em> input, where the composed text is displayed as part of the text component's text body. <li><em>below-the-spot</em> input, where the composed text is displayed in a separate composition window just below the insertion point where the text will be inserted when it is committed. Note that, if text is selected within the component's text body, this text will be replaced by the committed text upon commitment; therefore it is not considered part of the context that the text is input into. </ul><P><DL><DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../../java/awt/Component.html#getInputMethodRequests()"><CODE>Component.getInputMethodRequests()</CODE></A>, <A HREF="../../../java/awt/event/InputMethodListener.html"><CODE>InputMethodListener</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/text/AttributedCharacterIterator.html">AttributedCharacterIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/im/InputMethodRequests.html#cancelLatestCommittedText(java.text.AttributedCharacterIterator.Attribute[])">cancelLatestCommittedText</A></B>(<A HREF="../../../java/text/AttributedCharacterIterator.Attribute.html">AttributedCharacterIterator.Attribute</A>[] attributes)</CODE><BR> Gets the latest committed text from the text editing component and removes it from the component's text body.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/text/AttributedCharacterIterator.html">AttributedCharacterIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/im/InputMethodRequests.html#getCommittedText(int, int, java.text.AttributedCharacterIterator.Attribute[])">getCommittedText</A></B>(int beginIndex, int endIndex, <A HREF="../../../java/text/AttributedCharacterIterator.Attribute.html">AttributedCharacterIterator.Attribute</A>[] attributes)</CODE><BR> Gets an iterator providing access to the entire text and attributes contained in the text editing component except for uncommitted text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/im/InputMethodRequests.html#getCommittedTextLength()">getCommittedTextLength</A></B>()</CODE><BR> Gets the length of the entire text contained in the text editing component except for uncommitted (composed) text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/im/InputMethodRequests.html#getInsertPositionOffset()">getInsertPositionOffset</A></B>()</CODE><BR> Gets the offset of the insert position in the committed text contained in the text editing component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/im/InputMethodRequests.html#getLocationOffset(int, int)">getLocationOffset</A></B>(int x, int y)</CODE><BR> Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/text/AttributedCharacterIterator.html">AttributedCharacterIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/im/InputMethodRequests.html#getSelectedText(java.text.AttributedCharacterIterator.Attribute[])">getSelectedText</A></B>(<A HREF="../../../java/text/AttributedCharacterIterator.Attribute.html">AttributedCharacterIterator.Attribute</A>[] attributes)</CODE><BR> Gets the currently selected text from the text editing component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Rectangle.html">Rectangle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/im/InputMethodRequests.html#getTextLocation(java.awt.font.TextHitInfo)">getTextLocation</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> offset)</CODE><BR> Gets the location of a specified offset in the current composed text, or of the selection in committed text.</TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getTextLocation(java.awt.font.TextHitInfo)"><!-- --></A><H3>getTextLocation</H3><PRE>public <A HREF="../../../java/awt/Rectangle.html">Rectangle</A> <B>getTextLocation</B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> offset)</PRE><DL><DD>Gets the location of a specified offset in the current composed text,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?