1. /*
  2. * @(#)CaretEvent.java 1.9 00/02/02
  3. *
  4. * Copyright 1998-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package javax.swing.event;
  11. import java.util.EventObject;
  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 appropriate
  19. * for short term storage or RMI between applications running the same
  20. * version of Swing. A future release of Swing will provide support for
  21. * long term persistence.
  22. *
  23. * @version 1.9 02/02/00
  24. * @author Timothy Prinzing
  25. */
  26. public abstract class CaretEvent extends EventObject {
  27. /**
  28. * Creates a new CaretEvent object.
  29. *
  30. * @param source the object responsible for the event
  31. */
  32. public CaretEvent(Object source) {
  33. super(source);
  34. }
  35. /**
  36. * Fetches the location of the caret.
  37. *
  38. * @return the dot >= 0
  39. */
  40. public abstract int getDot();
  41. /**
  42. * Fetches the location of other end of a logical
  43. * selection. If there is no selection, this
  44. * will be the same as dot.
  45. *
  46. * @return the mark >= 0
  47. */
  48. public abstract int getMark();
  49. }