home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / TextEvent.java < prev    next >
Text File  |  1997-05-20  |  2KB  |  85 lines

  1. /*
  2.  * @(#)TextEvent.java    1.4 97/01/27
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.1_beta
  20.  * 
  21.  */
  22.  
  23. package java.awt.event;
  24.  
  25. import java.awt.AWTEvent;
  26. import java.awt.Event;
  27.  
  28. /**
  29.  * The text event emitted by TextComponents.
  30.  * @see java.awt.TextComponent
  31.  * @see TextEventListener
  32.  *
  33.  * @version 1.4 01/27/97
  34.  * @author Georges Saab
  35.  */
  36.  
  37. public class TextEvent extends AWTEvent {
  38.  
  39.     /**
  40.      * Marks the first integer id for the range of adjustment event ids.
  41.      */
  42.     public static final int TEXT_FIRST     = 900;
  43.  
  44.     /**
  45.      * Marks the last integer id for the range of adjustment event ids.
  46.      */
  47.     public static final int TEXT_LAST     = 900;
  48.  
  49.     /**
  50.      * The adjustment value changed event.
  51.      */
  52.     public static final int TEXT_VALUE_CHANGED    = TEXT_FIRST;
  53.  
  54.     /*
  55.      * JDK 1.1 serialVersionUID 
  56.      */
  57.     private static final long serialVersionUID = 6269902291250941179L;
  58.  
  59.     /**
  60.      * Constructs a TextEvent object with the specified TextComponent source,
  61.      * and type.
  62.      * @param source the TextComponent where the event originated
  63.      * @id the event type
  64.      * @type the textEvent type 
  65.      */
  66.     public TextEvent(Object source, int id) {
  67.         super(source, id);
  68.     }
  69.  
  70.  
  71.     public String paramString() {
  72.         String typeStr;
  73.         switch(id) {
  74.           case TEXT_VALUE_CHANGED:
  75.               typeStr = "TEXT_VALUE_CHANGED";
  76.               break;
  77.           default:
  78.               typeStr = "unknown type";
  79.         }
  80.         return typeStr;
  81.     }
  82. }
  83.  
  84.  
  85.