home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / IFC_112 / netscape / application / TextViewOwner.java < prev    next >
Encoding:
Text File  |  1999-05-28  |  2.1 KB  |  60 lines  |  [TEXT/CWIE]

  1. // TextViewOwner.java
  2. // By Ned Etcode
  3. // Copyright 1996, 1997 Netscape Communications Corp.  All rights reserved.
  4.  
  5. package netscape.application;
  6.  
  7. import netscape.util.*;
  8.  
  9. /** Interface implemented by objects wanting information on important TextView
  10.   * events, such as when the selection has changed.  An object implementing
  11.   * this interface must make itself the TextView's owner using TextView's
  12.   * <b>setOwner()</b> method.
  13.   */
  14.  
  15. public interface TextViewOwner {
  16.  
  17.     /** Sent by <b>textView</b> upon entering edit mode.
  18.       */
  19.     public void textEditingDidBegin(TextView textView);
  20.  
  21.     /** Sent by <b>textView</b> when text editing has completed.
  22.       */
  23.     public void textEditingDidEnd(TextView textView);
  24.  
  25.     /** Sent by <b>textView</b> before <b>textView</b> replaces the characters
  26.       * defined by <b>aRange</b> with a different string.
  27.       */
  28.     public void textWillChange(TextView textView, Range aRange);
  29.  
  30.     /** Sent by <b>textView</b> after <b>textView</b> has replaced a range
  31.       * of characters with new characters. <b>aRange</b> represents the
  32.       * range of new characters.
  33.       */
  34.     public void textDidChange(TextView textView, Range aRange);
  35.  
  36.     /** Sent by <b>textView</b> before <b>textView</b> changes the attributes
  37.       * of characters within the range <b>aRange</b>.
  38.       */
  39.     public void attributesWillChange(TextView textView, Range aRange);
  40.  
  41.     /** Sent by <b>textView</b> after <b>textView</b> has changed the
  42.       * attributes of characters within the range <b>aRange</b>.
  43.       */
  44.     public void attributesDidChange(TextView textView,Range aRange);
  45.  
  46.    /** Sent by <b>textView</b> after the selection changes. Use
  47.      * <b>selectedRange()</b> to determine the current selection range.
  48.      */
  49.     public void selectionDidChange(TextView textView);
  50.  
  51.    /** Sent by <b>textView</b> when the user clicks an HTML link within the
  52.      * TextView. <b>linkRange</b> is the link's range within the TextView.
  53.      * <b>stringURL</b> contains the link's URL, which can be relative.
  54.      */
  55.     public void linkWasSelected(TextView sender, Range linkRange,
  56.                                 String stringURL);
  57. }
  58.  
  59.  
  60.