<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 06:01:06 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Class  DefaultCaret
</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" ID="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/DefaultCaret.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/swing/text/CompositeView.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/DefaultEditorKit.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="DefaultCaret.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.swing.text</FONT>
<BR>
Class  DefaultCaret</H2>
<PRE>
java.lang.Object
  |
  +--java.awt.Rectangle
        |
        +--<B>javax.swing.text.DefaultCaret</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/swing/plaf/basic/BasicTextUI.BasicCaret.html">BasicTextUI.BasicCaret</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>DefaultCaret</B><DT>extends java.awt.Rectangle<DT>implements <A HREF="../../../javax/swing/text/Caret.html">Caret</A>, java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener</DL>

<P>
A default implementation of Caret.  The caret is rendered as
 a vertical line in the color specified by the CaretColor property 
 of the associated JTextComponent.  It can blink at the rate specified
 by the BlinkRate property.
 <p>
 This implementation expects two sources of asynchronous notification.
 The timer thread fires asynchronously, and causes the caret to simply
 repaint the most recent bounding box.  The caret also tracks change
 as the document is modified.  Typically this will happen on the
 event thread as a result of some mouse or keyboard event.  Updates
 can also occur from some other thread mutating the document.  There
 is a property <code>AsynchronousMovement</code> that determines if
 the caret will move on asynchronous updates.  The default behavior
 is to <em>not</em> update on asynchronous updates.  If asynchronous
 updates are allowed, the update thread will fire the caret position 
 change to listeners asynchronously.  The repaint of the new caret 
 location will occur on the event thread in any case, as calls to
 <code>modelToView</code> are only safe on the event thread.
 <p>
 The caret acts as a mouse and focus listener on the text component
 it has been installed in, and defines the caret semantics based upon
 those events.  The listener methods can be reimplemented to change the 
 semantics.
 By default, the first mouse button will be used to set focus and caret
 position.  Dragging the mouse pointer with the first mouse button will
 sweep out a selection that is contiguous in the model.  If the associated
 text component is editable, the caret will become visible when focus
 is gained, and invisible when focus is lost.
 <p>
 The Highlighter bound to the associated text component is used to 
 render the selection by default.  
 Selection appearance can be customized by supplying a
 painter to use for the highlights.  By default a painter is used that
 will render a solid color as specified in the associated text component
 in the <code>SelectionColor</code> property.  This can easily be changed
 by reimplementing the 
 <a href="#getSelectionHighlighter">getSelectionHighlighter</a>
 method.
 <p>
 A customized caret appearance can be achieved by reimplementing
 the paint method.  If the paint method is changed, the damage method
 should also be reimplemented to cause a repaint for the area needed
 to render the caret.  The caret extends the Rectangle class which
 is used to hold the bounding box for where the caret was last rendered.
 This enables the caret to repaint in a thread-safe manner when the
 caret moves without making a call to modelToView which is unstable
 between model updates and view repair (i.e. the order of delivery 
 to DocumentListeners is not guaranteed).
 <p>
 <strong>Warning:</strong>
 Serialized objects of this class will not be compatible with 
 future Swing releases.  The current serialization support is appropriate
 for short term storage or RMI between applications running the same
 version of Swing.  A future release of Swing will provide support for
 long term persistence.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html"><CODE>Caret</CODE></A>, <A HREF="../../../serialized-form.html#javax.swing.text.DefaultCaret">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../javax/swing/event/ChangeEvent.html">ChangeEvent</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#changeEvent">changeEvent</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The change event for the model.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../javax/swing/event/EventListenerList.html">EventListenerList</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#listenerList">listenerList</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The event listener list.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_java.awt.Rectangle"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Fields inherited from class java.awt.Rectangle</B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE>height,  
width,  
x,  
y</CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#DefaultCaret()">DefaultCaret</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a default caret.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="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#addChangeListener(javax.swing.event.ChangeListener)">addChangeListener</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;Adds a listener to track whenever the caret position has
 been changed.</TD>
</TR>
<TR BGCOLOR="white" ID="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#adjustVisibility(java.awt.Rectangle)">adjustVisibility</A></B>(java.awt.Rectangle&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" ID="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>(java.awt.Rectangle&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" ID="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" ID="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" ID="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>(java.awt.event.FocusEvent&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" ID="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>(java.awt.event.FocusEvent&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" ID="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" ID="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" ID="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" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.Point</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" ID="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" ID="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" ID="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" ID="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" ID="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" ID="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>(java.awt.event.MouseEvent&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" ID="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>(java.awt.event.MouseEvent&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" ID="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>(java.awt.event.MouseEvent&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" ID="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>(java.awt.event.MouseEvent&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" ID="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>(java.awt.event.MouseEvent&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" ID="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>(java.awt.event.MouseEvent&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" ID="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>(java.awt.event.MouseEvent&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" ID="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>(java.awt.event.MouseEvent&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" ID="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" ID="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>(java.awt.Graphics&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" ID="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>(java.awt.event.MouseEvent&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" ID="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" ID="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#repaint()">repaint</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cause the caret to be painted.</TD>
</TR>
<TR BGCOLOR="white" ID="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#setBlinkRate(int)">setBlinkRate</A></B>(int&nbsp;rate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the caret blink rate.</TD>
</TR>
<TR BGCOLOR="white" ID="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#setDot(int)">setDot</A></B>(int&nbsp;dot)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the caret position and mark to some position.</TD>
</TR>
<TR BGCOLOR="white" ID="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#setMagicCaretPosition(java.awt.Point)">setMagicCaretPosition</A></B>(java.awt.Point&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the current caret position.</TD>
</TR>
<TR BGCOLOR="white" ID="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#setSelectionVisible(boolean)">setSelectionVisible</A></B>(boolean&nbsp;vis)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes the selection visibility.</TD>
</TR>
<TR BGCOLOR="white" ID="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#setVisible(boolean)">setVisible</A></B>(boolean&nbsp;e)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the caret visibility, and repaints the caret.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultCaret.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.awt.Rectangle"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class java.awt.Rectangle</B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE>add, 
add, 
add, 
contains, 
contains, 
equals, 
getBounds, 
getLocation, 
getSize, 
grow, 
hashCode, 
inside, 
intersection, 
intersects, 
isEmpty, 
move, 
reshape, 
resize, 
setBounds, 
setBounds, 
setLocation, 
setLocation, 
setSize, 
setSize, 
translate, 
union</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE>clone, 
finalize, 
getClass, 
notify, 
notifyAll, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="listenerList"><!-- --></A><H3>
listenerList</H3>
<PRE>
protected <A HREF="../../../javax/swing/event/EventListenerList.html">EventListenerList</A> <B>listenerList</B></PRE>
<DL>
<DD>The event listener list.</DL>
<HR>

<A NAME="changeEvent"><!-- --></A><H3>
changeEvent</H3>
<PRE>
protected transient <A HREF="../../../javax/swing/event/ChangeEvent.html">ChangeEvent</A> <B>changeEvent</B></PRE>
<DL>
<DD>The change event for the model.
 Only one ChangeEvent is needed per model instance since the
 event's only (read-only) state is the source property.  The source
 of events generated here is always "this".</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="DefaultCaret()"><!-- --></A><H3>
DefaultCaret</H3>
<PRE>
public <B>DefaultCaret</B>()</PRE>
<DL>
<DD>Constructs a default caret.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getComponent()"><!-- --></A><H3>
getComponent</H3>
<PRE>
protected final <A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> <B>getComponent</B>()</PRE>
<DL>
<DD>Gets the text editor component that this caret is 
 is bound to.<DD><DL>
<DT><B>Returns:</B><DD>the component</DL>
</DD>
</DL>
<HR>

<A NAME="repaint()"><!-- --></A><H3>
repaint</H3>
<PRE>
protected final void <B>repaint</B>()</PRE>
<DL>
<DD>Cause the caret to be painted.  The repaint
 area is the bounding box of the caret (i.e.
 the caret rectangle or <em>this</em>).
 <p>
 This method is thread safe, although most Swing methods
 are not. Please see 
 <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">
 Threads and Swing</A> for more information.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="damage(java.awt.Rectangle)"><!-- --></A><H3>
damage</H3>
<PRE>
protected void <B>damage</B>(java.awt.Rectangle&nbsp;r)</PRE>
<DL>
<DD>Damages the area surrounding the caret to cause
 it to be repainted in a new location.  If paint() 
 is reimplemented, this method should also be 
 reimplemented.  This method should update the 
 caret bounds (x, y, width, and height).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - the current location of the caret<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/DefaultCaret.html#paint(java.awt.Graphics)"><CODE>paint(java.awt.Graphics)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="adjustVisibility(java.awt.Rectangle)"><!-- --></A><H3>
adjustVisibility</H3>
<PRE>
protected void <B>adjustVisibility</B>(java.awt.Rectangle&nbsp;nloc)</PRE>
<DL>
<DD>Scrolls the associated view (if necessary) to make
 the caret visible.  Since how this should be done
 is somewhat of a policy, this method can be 
 reimplemented to change the behavior.  By default
 the scrollRectToVisible method is called on the
 associated component.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nloc</CODE> - the new position to scroll to</DL>
</DD>
</DL>
<HR>

<A NAME="getSelectionPainter()"><!-- --></A><H3>
getSelectionPainter</H3>
<PRE>
protected <A HREF="../../../javax/swing/text/Highlighter.HighlightPainter.html">Highlighter.HighlightPainter</A> <B>getSelectionPainter</B>()</PRE>
<DL>
<DD>Gets the painter for the Highlighter.<DD><DL>
<DT><B>Returns:</B><DD>the painter</DL>
</DD>
</DL>
<HR>

<A NAME="positionCaret(java.awt.event.MouseEvent)"><!-- --></A><H3>
positionCaret</H3>
<PRE>
protected void <B>positionCaret</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>Tries to set the position of the caret from
 the coordinates of a mouse event, using viewToModel().<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event</DL>
</DD>
</DL>
<HR>

<A NAME="moveCaret(java.awt.event.MouseEvent)"><!-- --></A><H3>
moveCaret</H3>
<PRE>
protected void <B>moveCaret</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>Tries to move the position of the caret from
 the coordinates of a mouse event, using viewToModel(). 
 This will cause a selection if the dot and mark
 are different.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event</DL>
</DD>
</DL>
<HR>

<A NAME="focusGained(java.awt.event.FocusEvent)"><!-- --></A><H3>
focusGained</H3>
<PRE>
public void <B>focusGained</B>(java.awt.event.FocusEvent&nbsp;e)</PRE>
<DL>
<DD>Called when the component containing the caret gains
 focus.  This is implemented to set the caret to visible
 if the component is editable.<DD><DL>
<DT><B>Specified by: </B><DD>focusGained in interface java.awt.event.FocusListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the focus event<DT><B>See Also: </B><DD><CODE>FocusListener.focusGained(java.awt.event.FocusEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="focusLost(java.awt.event.FocusEvent)"><!-- --></A><H3>
focusLost</H3>
<PRE>
public void <B>focusLost</B>(java.awt.event.FocusEvent&nbsp;e)</PRE>
<DL>
<DD>Called when the component containing the caret loses
 focus.  This is implemented to set the caret to visibility
 to false.<DD><DL>
<DT><B>Specified by: </B><DD>focusLost in interface java.awt.event.FocusListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the focus event<DT><B>See Also: </B><DD><CODE>FocusListener.focusLost(java.awt.event.FocusEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="mouseClicked(java.awt.event.MouseEvent)"><!-- --></A><H3>
mouseClicked</H3>
<PRE>
public void <B>mouseClicked</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>Called when the mouse is clicked.  If the click was generated
 from button1, a double click selects a word,
 and a triple click the current line.<DD><DL>
<DT><B>Specified by: </B><DD>mouseClicked in interface java.awt.event.MouseListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event<DT><B>See Also: </B><DD><CODE>MouseListener.mouseClicked(java.awt.event.MouseEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="mousePressed(java.awt.event.MouseEvent)"><!-- --></A><H3>
mousePressed</H3>
<PRE>
public void <B>mousePressed</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>If button 1 is pressed, this is implemented to
 request focus on the associated text component, 
 and to set the caret position.  If the component
 is not enabled, there will be no request for focus.<DD><DL>
<DT><B>Specified by: </B><DD>mousePressed in interface java.awt.event.MouseListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event<DT><B>See Also: </B><DD><CODE>MouseListener.mousePressed(java.awt.event.MouseEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="mouseReleased(java.awt.event.MouseEvent)"><!-- --></A><H3>
mouseReleased</H3>
<PRE>
public void <B>mouseReleased</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>Called when the mouse is released.<DD><DL>
<DT><B>Specified by: </B><DD>mouseReleased in interface java.awt.event.MouseListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event<DT><B>See Also: </B><DD><CODE>MouseListener.mouseReleased(java.awt.event.MouseEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="mouseEntered(java.awt.event.MouseEvent)"><!-- --></A><H3>
mouseEntered</H3>
<PRE>
public void <B>mouseEntered</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>Called when the mouse enters a region.<DD><DL>
<DT><B>Specified by: </B><DD>mouseEntered in interface java.awt.event.MouseListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event<DT><B>See Also: </B><DD><CODE>MouseListener.mouseEntered(java.awt.event.MouseEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="mouseExited(java.awt.event.MouseEvent)"><!-- --></A><H3>
mouseExited</H3>
<PRE>
public void <B>mouseExited</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>Called when the mouse exits a region.<DD><DL>
<DT><B>Specified by: </B><DD>mouseExited in interface java.awt.event.MouseListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event<DT><B>See Also: </B><DD><CODE>MouseListener.mouseExited(java.awt.event.MouseEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="mouseDragged(java.awt.event.MouseEvent)"><!-- --></A><H3>
mouseDragged</H3>
<PRE>
public void <B>mouseDragged</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>Moves the caret position 
 according to the mouse pointer's current
 location.  This effectively extends the
 selection.<DD><DL>
<DT><B>Specified by: </B><DD>mouseDragged in interface java.awt.event.MouseMotionListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event<DT><B>See Also: </B><DD><CODE>MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="mouseMoved(java.awt.event.MouseEvent)"><!-- --></A><H3>
mouseMoved</H3>
<PRE>
public void <B>mouseMoved</B>(java.awt.event.MouseEvent&nbsp;e)</PRE>
<DL>
<DD>Called when the mouse is moved.<DD><DL>
<DT><B>Specified by: </B><DD>mouseMoved in interface java.awt.event.MouseMotionListener<DT><B>Parameters:</B><DD><CODE>e</CODE> - the mouse event<DT><B>See Also: </B><DD><CODE>MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="paint(java.awt.Graphics)"><!-- --></A><H3>
paint</H3>
<PRE>
public void <B>paint</B>(java.awt.Graphics&nbsp;g)</PRE>
<DL>
<DD>Renders the caret as a vertical line.  If this is reimplemented
 the damage method should also be reimplemented as it assumes the
 shape of the caret is a vertical line.  Sets the caret color to
 the value returned by getCaretColor().
 <p>
 If there are multiple text directions present in the associated
 document, a flag indicating the caret bias will be rendered.
 This will occur only if the associated document is a subclass
 of AbstractDocument and there are multiple bidi levels present
 in the bidi element structure (i.e. the text has multiple
 directions associated with it).<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#paint(java.awt.Graphics)">paint</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics context<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/DefaultCaret.html#damage(java.awt.Rectangle)"><CODE>damage(java.awt.Rectangle)</CODE></A></DL>
</DD>
</DL>
<HR>

<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.  Sets the dot
 and mark to 0, and establishes document, property change,
 focus, mouse, and mouse motion listeners.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#install(javax.swing.text.JTextComponent)">install</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>c</CODE> - the component<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#install(javax.swing.text.JTextComponent)"><CODE>Caret.install(javax.swing.text.JTextComponent)</CODE></A></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>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#deinstall(javax.swing.text.JTextComponent)">deinstall</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>c</CODE> - the component<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#deinstall(javax.swing.text.JTextComponent)"><CODE>Caret.deinstall(javax.swing.text.JTextComponent)</CODE></A></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>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#addChangeListener(javax.swing.event.ChangeListener)">addChangeListener</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#addChangeListener(javax.swing.event.ChangeListener)"><CODE>Caret.addChangeListener(javax.swing.event.ChangeListener)</CODE></A></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>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#removeChangeListener(javax.swing.event.ChangeListener)">removeChangeListener</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#removeChangeListener(javax.swing.event.ChangeListener)"><CODE>Caret.removeChangeListener(javax.swing.event.ChangeListener)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="fireStateChanged()"><!-- --></A><H3>
fireStateChanged</H3>
<PRE>
protected void <B>fireStateChanged</B>()</PRE>
<DL>
<DD>Notifies all listeners that have registered interest for
 notification on this event type.  The event instance 
 is lazily created using the parameters passed into 
 the fire method.  The listener list is processed last to first.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/event/EventListenerList.html"><CODE>EventListenerList</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setSelectionVisible(boolean)"><!-- --></A><H3>
setSelectionVisible</H3>
<PRE>
public void <B>setSelectionVisible</B>(boolean&nbsp;vis)</PRE>
<DL>
<DD>Changes the selection visibility.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setSelectionVisible(boolean)">setSelectionVisible</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>vis</CODE> - the new visibility</DL>
</DD>
</DL>
<HR>

<A NAME="isSelectionVisible()"><!-- --></A><H3>
isSelectionVisible</H3>
<PRE>
public boolean <B>isSelectionVisible</B>()</PRE>
<DL>
<DD>Checks whether the current selection is visible.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#isSelectionVisible()">isSelectionVisible</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Returns:</B><DD>true if the selection is visible</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>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#isVisible()">isVisible</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Returns:</B><DD>true if visible else false<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#isVisible()"><CODE>Caret.isVisible()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setVisible(boolean)"><!-- --></A><H3>
setVisible</H3>
<PRE>
public void <B>setVisible</B>(boolean&nbsp;e)</PRE>
<DL>
<DD>Sets the caret visibility, and repaints the caret.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setVisible(boolean)">setVisible</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>e</CODE> - the visibility specifier<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setVisible(boolean)"><CODE>Caret.setVisible(boolean)</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 caret blink rate.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setBlinkRate(int)">setBlinkRate</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>rate</CODE> - the rate in milliseconds, 0 to stop blinking<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setBlinkRate(int)"><CODE>Caret.setBlinkRate(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getBlinkRate()"><!-- --></A><H3>
getBlinkRate</H3>
<PRE>
public int <B>getBlinkRate</B>()</PRE>
<DL>
<DD>Gets the caret blink rate.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#getBlinkRate()">getBlinkRate</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#getBlinkRate()"><CODE>Caret.getBlinkRate()</CODE></A></DL>
</DD>
</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>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#getDot()">getDot</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Returns:</B><DD>the position >= 0<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#getDot()"><CODE>Caret.getDot()</CODE></A></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 dot and mark will not be the same.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#getMark()">getMark</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Returns:</B><DD>the position >= 0<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#getMark()"><CODE>Caret.getMark()</CODE></A></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 and mark to some position.  This
 implicitly sets the selection range to zero.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setDot(int)">setDot</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>dot</CODE> - the position >= 0<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setDot(int)"><CODE>Caret.setDot(int)</CODE></A></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 to some other position.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#moveDot(int)">moveDot</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>dot</CODE> - the position >= 0<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Caret.html#moveDot(int)"><CODE>Caret.moveDot(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setMagicCaretPosition(java.awt.Point)"><!-- --></A><H3>
setMagicCaretPosition</H3>
<PRE>
public void <B>setMagicCaretPosition</B>(java.awt.Point&nbsp;p)</PRE>
<DL>
<DD>Saves the current caret position.  This is used when 
 caret up/down actions occur, moving between lines
 that have uneven end positions.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#setMagicCaretPosition(java.awt.Point)">setMagicCaretPosition</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Parameters:</B><DD><CODE>p</CODE> - the position<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/DefaultCaret.html#getMagicCaretPosition()"><CODE>getMagicCaretPosition()</CODE></A>, 
<CODE>UpAction</CODE>, 
<CODE>DownAction</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getMagicCaretPosition()"><!-- --></A><H3>
getMagicCaretPosition</H3>
<PRE>
public java.awt.Point <B>getMagicCaretPosition</B>()</PRE>
<DL>
<DD>Gets the saved caret position.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/Caret.html#getMagicCaretPosition()">getMagicCaretPosition</A> in interface <A HREF="../../../javax/swing/text/Caret.html">Caret</A><DT><B>Returns:</B><DD>the position
 see #setMagicCaretPosition</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD>toString in class java.awt.Rectangle</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" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/DefaultCaret.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/swing/text/CompositeView.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/DefaultEditorKit.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="DefaultCaret.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.<br>Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
