KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > event > CaretEvent


1 /*
2  * @(#)CaretEvent.java 1.13 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package javax.swing.event;
8
9 import java.util.EventObject JavaDoc;
10
11
12 /**
13  * CaretEvent is used to notify interested parties that
14  * the text caret has changed in the event source.
15  * <p>
16  * <strong>Warning:</strong>
17  * Serialized objects of this class will not be compatible with
18  * future Swing releases. The current serialization support is
19  * appropriate for short term storage or RMI between applications running
20  * the same version of Swing. As of 1.4, support for long term storage
21  * of all JavaBeans<sup><font size="-2">TM</font></sup>
22  * has been added to the <code>java.beans</code> package.
23  * Please see {@link java.beans.XMLEncoder}.
24  *
25  * @version 1.13 12/19/03
26  * @author Timothy Prinzing
27  */

28 public abstract class CaretEvent extends EventObject JavaDoc {
29
30     /**
31      * Creates a new CaretEvent object.
32      *
33      * @param source the object responsible for the event
34      */

35     public CaretEvent(Object JavaDoc source) {
36         super(source);
37     }
38
39     /**
40      * Fetches the location of the caret.
41      *
42      * @return the dot >= 0
43      */

44     public abstract int getDot();
45
46     /**
47      * Fetches the location of other end of a logical
48      * selection. If there is no selection, this
49      * will be the same as dot.
50      *
51      * @return the mark >= 0
52      */

53     public abstract int getMark();
54 }
55
56
Popular Tags