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

📄 caret.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="install(javax.swing.text.JTextComponent)"><!-- --></A><H3>install</H3><PRE>public void <B>install</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c)</PRE><DL><DD>Called when the UI is being installed into the interface of a JTextComponent.  This can be used to gain access to the model that is being navigated by the implementation of this interface.<DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the JTextComponent</DL></DD></DL><HR><A NAME="deinstall(javax.swing.text.JTextComponent)"><!-- --></A><H3>deinstall</H3><PRE>public void <B>deinstall</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c)</PRE><DL><DD>Called when the UI is being removed from the interface of a JTextComponent.  This is used to  unregister any listeners that were attached.<DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the JTextComponent</DL></DD></DL><HR><A NAME="paint(java.awt.Graphics)"><!-- --></A><H3>paint</H3><PRE>public void <B>paint</B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</PRE><DL><DD>Renders the caret.<DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics context</DL></DD></DL><HR><A NAME="addChangeListener(javax.swing.event.ChangeListener)"><!-- --></A><H3>addChangeListener</H3><PRE>public void <B>addChangeListener</B>(<A HREF="../../../javax/swing/event/ChangeListener.html">ChangeListener</A>&nbsp;l)</PRE><DL><DD>Adds a listener to track whenever the caret position has been changed.<DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the change listener</DL></DD></DL><HR><A NAME="removeChangeListener(javax.swing.event.ChangeListener)"><!-- --></A><H3>removeChangeListener</H3><PRE>public void <B>removeChangeListener</B>(<A HREF="../../../javax/swing/event/ChangeListener.html">ChangeListener</A>&nbsp;l)</PRE><DL><DD>Removes a listener that was tracking caret position changes.<DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the change listener</DL></DD></DL><HR><A NAME="isVisible()"><!-- --></A><H3>isVisible</H3><PRE>public boolean <B>isVisible</B>()</PRE><DL><DD>Determines if the caret is currently visible.<DD><DL><DT><B>Returns:</B><DD>true if the caret is visible else false</DL></DD></DL><HR><A NAME="setVisible(boolean)"><!-- --></A><H3>setVisible</H3><PRE>public void <B>setVisible</B>(boolean&nbsp;v)</PRE><DL><DD>Sets the visibility of the caret.<DD><DL><DT><B>Parameters:</B><DD><CODE>v</CODE> - true if the caret should be shown,  and false if the caret should be hidden</DL></DD></DL><HR><A NAME="isSelectionVisible()"><!-- --></A><H3>isSelectionVisible</H3><PRE>public boolean <B>isSelectionVisible</B>()</PRE><DL><DD>Determines if the selection is currently visible.<DD><DL><DT><B>Returns:</B><DD>true if the caret is visible else false</DL></DD></DL><HR><A NAME="setSelectionVisible(boolean)"><!-- --></A><H3>setSelectionVisible</H3><PRE>public void <B>setSelectionVisible</B>(boolean&nbsp;v)</PRE><DL><DD>Sets the visibility of the selection<DD><DL><DT><B>Parameters:</B><DD><CODE>v</CODE> - true if the caret should be shown,  and false if the caret should be hidden</DL></DD></DL><HR><A NAME="setMagicCaretPosition(java.awt.Point)"><!-- --></A><H3>setMagicCaretPosition</H3><PRE>public void <B>setMagicCaretPosition</B>(<A HREF="../../../java/awt/Point.html">Point</A>&nbsp;p)</PRE><DL><DD>Set the current caret visual location.  This can be used when  moving between lines that have uneven end positions (such as when caret up or down actions occur).  If text flows left-to-right or right-to-left the x-coordinate will indicate the desired navigation location for vertical movement.  If the text flow is top-to-bottom, the y-coordinate will indicate the desired navigation location for horizontal movement.<DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the Point to use for the saved position.  This   can be null to indicate there is no visual location.</DL></DD></DL><HR><A NAME="getMagicCaretPosition()"><!-- --></A><H3>getMagicCaretPosition</H3><PRE>public <A HREF="../../../java/awt/Point.html">Point</A> <B>getMagicCaretPosition</B>()</PRE><DL><DD>Gets the current caret visual location.<DD><DL><DT><B>Returns:</B><DD>the visual position.<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setMagicCaretPosition(java.awt.Point)"><CODE>setMagicCaretPosition(java.awt.Point)</CODE></A></DL></DD></DL><HR><A NAME="setBlinkRate(int)"><!-- --></A><H3>setBlinkRate</H3><PRE>public void <B>setBlinkRate</B>(int&nbsp;rate)</PRE><DL><DD>Sets the blink rate of the caret.  This determines if and how fast the caret blinks, commonly used as one way to attract attention to the caret.<DD><DL><DT><B>Parameters:</B><DD><CODE>rate</CODE> - the delay in milliseconds >= 0.  If this is  zero the caret will not blink.</DL></DD></DL><HR><A NAME="getBlinkRate()"><!-- --></A><H3>getBlinkRate</H3><PRE>public int <B>getBlinkRate</B>()</PRE><DL><DD>Gets the blink rate of the caret.  This determines if and how fast the caret blinks, commonly used as one way to attract attention to the caret.</DL><HR><A NAME="getDot()"><!-- --></A><H3>getDot</H3><PRE>public int <B>getDot</B>()</PRE><DL><DD>Fetches the current position of the caret.<DD><DL><DT><B>Returns:</B><DD>the position >= 0</DL></DD></DL><HR><A NAME="getMark()"><!-- --></A><H3>getMark</H3><PRE>public int <B>getMark</B>()</PRE><DL><DD>Fetches the current position of the mark.  If there is a selection, the mark will not be the same as the dot.<DD><DL><DT><B>Returns:</B><DD>the position >= 0</DL></DD></DL><HR><A NAME="setDot(int)"><!-- --></A><H3>setDot</H3><PRE>public void <B>setDot</B>(int&nbsp;dot)</PRE><DL><DD>Sets the caret position to some position.  This causes the mark to become the same as the dot, effectively setting the selection range to zero.<DD><DL><DT><B>Parameters:</B><DD><CODE>dot</CODE> - the new position to set the caret to >= 0</DL></DD></DL><HR><A NAME="moveDot(int)"><!-- --></A><H3>moveDot</H3><PRE>public void <B>moveDot</B>(int&nbsp;dot)</PRE><DL><DD>Moves the caret position (dot) to some other position, leaving behind the mark.  This is useful for making selections.<DD><DL><DT><B>Parameters:</B><DD><CODE>dot</CODE> - the new position to move the caret to >= 0</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Caret.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.ParagraphAttribute.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/swing/text/Document.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>  &nbsp;&nbsp;<A HREF="Caret.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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 + -