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

📄 defaultcaret.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#adjustVisibility(java.awt.Rectangle)">adjustVisibility</A></B>(<A HREF="../../../java/awt/Rectangle.html">Rectangle</A>&nbsp;nloc)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scrolls the associated view (if necessary) to make the caret visible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#damage(java.awt.Rectangle)">damage</A></B>(<A HREF="../../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Damages the area surrounding the caret to cause it to be repainted in a new location.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#deinstall(javax.swing.text.JTextComponent)">deinstall</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the UI is being removed from the interface of a JTextComponent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares this object to the specifed object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#fireStateChanged()">fireStateChanged</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#focusGained(java.awt.event.FocusEvent)">focusGained</A></B>(<A HREF="../../../java/awt/event/FocusEvent.html">FocusEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the component containing the caret gains focus.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#focusLost(java.awt.event.FocusEvent)">focusLost</A></B>(<A HREF="../../../java/awt/event/FocusEvent.html">FocusEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the component containing the caret loses focus.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#getBlinkRate()">getBlinkRate</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the caret blink rate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#getComponent()">getComponent</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the text editor component that this caret is  is bound to.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#getDot()">getDot</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the current position of the caret.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/util/EventListener.html">EventListener</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#getListeners(java.lang.Class)">getListeners</A></B>(<A HREF="../../../java/lang/Class.html">Class</A>&nbsp;listenerType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an array of all the listeners of the given type that  were added to this model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Point.html">Point</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#getMagicCaretPosition()">getMagicCaretPosition</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the saved caret position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#getMark()">getMark</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the current position of the mark.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../javax/swing/text/Highlighter.HighlightPainter.html">Highlighter.HighlightPainter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#getSelectionPainter()">getSelectionPainter</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the painter for the Highlighter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#install(javax.swing.text.JTextComponent)">install</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the UI is being installed into the interface of a JTextComponent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#isSelectionVisible()">isSelectionVisible</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether the current selection is visible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#isVisible()">isVisible</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines if the caret is currently visible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#mouseClicked(java.awt.event.MouseEvent)">mouseClicked</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the mouse is clicked.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#mouseDragged(java.awt.event.MouseEvent)">mouseDragged</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the caret position  according to the mouse pointer's current location.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#mouseEntered(java.awt.event.MouseEvent)">mouseEntered</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the mouse enters a region.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#mouseExited(java.awt.event.MouseEvent)">mouseExited</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the mouse exits a region.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#mouseMoved(java.awt.event.MouseEvent)">mouseMoved</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the mouse is moved.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#mousePressed(java.awt.event.MouseEvent)">mousePressed</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If button 1 is pressed, this is implemented to request focus on the associated text component,  and to set the caret position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#mouseReleased(java.awt.event.MouseEvent)">mouseReleased</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the mouse is released.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#moveCaret(java.awt.event.MouseEvent)">moveCaret</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tries to move the position of the caret from the coordinates of a mouse event, using viewToModel().</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#moveDot(int)">moveDot</A></B>(int&nbsp;dot)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the caret position to some other position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#paint(java.awt.Graphics)">paint</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders the caret as a vertical line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#positionCaret(java.awt.event.MouseEvent)">positionCaret</A></B>(<A HREF="../../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tries to set the position of the caret from the coordinates of a mouse event, using viewToModel().</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#removeChangeListener(javax.swing.event.ChangeListener)">removeChangeListener</A></B>(<A HREF="../../../javax/swing/event/ChangeListener.html">ChangeListener</A>&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a listener that was tracking caret position changes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">

⌨️ 快捷键说明

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