01: /*
02: * @(#)TextEvent.java 1.14 06/10/10
03: *
04: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: *
26: */
27:
28: package java.awt.event;
29:
30: import java.awt.AWTEvent;
31:
32: /**
33: * The text event emitted by TextComponents.
34: * @see java.awt.TextComponent
35: * @see TextEventListener
36: *
37: * @version 1.10 08/19/02
38: * @author Georges Saab
39: */
40:
41: public class TextEvent extends AWTEvent {
42: /**
43: * Marks the first integer id for the range of adjustment event ids.
44: */
45: public static final int TEXT_FIRST = 900;
46: /**
47: * Marks the last integer id for the range of adjustment event ids.
48: */
49: public static final int TEXT_LAST = 900;
50: /**
51: * The adjustment value changed event.
52: */
53: public static final int TEXT_VALUE_CHANGED = TEXT_FIRST;
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: public String paramString() {
71: String typeStr;
72: switch (id) {
73: case TEXT_VALUE_CHANGED:
74: typeStr = "TEXT_VALUE_CHANGED";
75: break;
76:
77: default:
78: typeStr = "unknown type";
79: }
80: return typeStr;
81: }
82: }
|