📄 jtextcomponent.accessiblejtextcomponent.html
字号:
getCharCount</H3><PRE>public int <B>getCharCount</B>()</PRE><DL><DD>Returns the number of characters (valid indicies)<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getCharCount()">getCharCount</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of characters >= 0</DL></DD></DL><HR><A NAME="getCaretPosition()"><!-- --></A><H3>getCaretPosition</H3><PRE>public int <B>getCaretPosition</B>()</PRE><DL><DD>Returns the zero-based offset of the caret. Note: The character to the right of the caret will have the same index value as the offset (the caret is between two characters).<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getCaretPosition()">getCaretPosition</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the zero-based offset of the caret.</DL></DD></DL><HR><A NAME="getCharacterAttribute(int)"><!-- --></A><H3>getCharacterAttribute</H3><PRE>public <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>getCharacterAttribute</B>(int i)</PRE><DL><DD>Returns the AttributeSet for a given character (at a given index).<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getCharacterAttribute(int)">getCharacterAttribute</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the zero-based index into the text<DT><B>Returns:</B><DD>the AttributeSet of the character</DL></DD></DL><HR><A NAME="getSelectionStart()"><!-- --></A><H3>getSelectionStart</H3><PRE>public int <B>getSelectionStart</B>()</PRE><DL><DD>Returns the start offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same. Return 0 if the text is empty, or the caret position if no selection.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getSelectionStart()">getSelectionStart</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the index into the text of the start of the selection >= 0</DL></DD></DL><HR><A NAME="getSelectionEnd()"><!-- --></A><H3>getSelectionEnd</H3><PRE>public int <B>getSelectionEnd</B>()</PRE><DL><DD>Returns the end offset within the selected text. If there is no selection, but there is a caret, the start and end offsets will be the same. Return 0 if the text is empty, or the caret position if no selection.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getSelectionEnd()">getSelectionEnd</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the index into teh text of the end of the selection >= 0</DL></DD></DL><HR><A NAME="getSelectedText()"><!-- --></A><H3>getSelectedText</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getSelectedText</B>()</PRE><DL><DD>Returns the portion of the text that is selected.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getSelectedText()">getSelectedText</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the text, null if no selection</DL></DD></DL><HR><A NAME="getAtIndex(int, int)"><!-- --></A><H3>getAtIndex</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getAtIndex</B>(int part, int index)</PRE><DL><DD>Returns the String at a given index.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getAtIndex(int, int)">getAtIndex</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>part</CODE> - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve<DD><CODE>index</CODE> - an index within the text >= 0<DT><B>Returns:</B><DD>the letter, word, or sentence, null for an invalid index or part</DL></DD></DL><HR><A NAME="getAfterIndex(int, int)"><!-- --></A><H3>getAfterIndex</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getAfterIndex</B>(int part, int index)</PRE><DL><DD>Returns the String after a given index.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getAfterIndex(int, int)">getAfterIndex</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>part</CODE> - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve<DD><CODE>index</CODE> - an index within the text >= 0<DT><B>Returns:</B><DD>the letter, word, or sentence, null for an invalid index or part</DL></DD></DL><HR><A NAME="getBeforeIndex(int, int)"><!-- --></A><H3>getBeforeIndex</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getBeforeIndex</B>(int part, int index)</PRE><DL><DD>Returns the String before a given index.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/accessibility/AccessibleText.html#getBeforeIndex(int, int)">getBeforeIndex</A></CODE> in interface <CODE><A HREF="../../../javax/accessibility/AccessibleText.html">AccessibleText</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>part</CODE> - the AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCE to retrieve<DD><CODE>index</CODE> - an index within the text >= 0<DT><B>Returns:</B><DD>the letter, word, or sentence, null for an invalid index or part</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/JTextComponent.AccessibleJTextComponent.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"> <A HREF="../../../javax/swing/text/JTextComponent.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/swing/text/JTextComponent.KeyBinding.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="JTextComponent.AccessibleJTextComponent.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_classes_inherited_from_class_javax.swing.JComponent.AccessibleJComponent">INNER</A> | <A HREF="#fields_inherited_from_class_javax.swing.JComponent.AccessibleJComponent">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -