KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwtx > swing > event > HyperlinkEvent


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: HyperlinkEvent.java,v $
11    Revision 1.3 2003/12/14 09:13:38 bobintetley
12    Added CVS log to source headers
13
14 */

15
16
17 package swingwtx.swing.event;
18
19 import java.net.URL JavaDoc;
20
21 public class HyperlinkEvent {
22     
23     public final static int ENTERED = 0;
24     public final static int EXITED = 0;
25     public final static int ACTIVATED = 0;
26     
27     protected EventType type = null;
28     protected URL JavaDoc url = null;
29     protected Object JavaDoc source = null;
30     protected String JavaDoc description = "";
31     
32     public HyperlinkEvent(Object JavaDoc source, EventType type, URL JavaDoc u) {
33         this.source = source;
34         this.type = type;
35         this.url = u;
36     }
37     
38     public HyperlinkEvent(Object JavaDoc source, EventType type, URL JavaDoc u, String JavaDoc description) {
39         this.source = source;
40         this.type = type;
41         this.url = u;
42         this.description = description;
43     }
44     
45     public URL JavaDoc getURL() { return url; }
46     public String JavaDoc getDescription() { return description; }
47     public EventType getEventType() { return type; }
48     
49     public static final class EventType {
50         private EventType(String JavaDoc s) {
51             typeString = s;
52         }
53         public static final EventType ENTERED = new EventType("ENTERED");
54         public static final EventType EXITED = new EventType("EXITED");
55         public static final EventType ACTIVATED = new EventType("ACTIVATED");
56         public String JavaDoc toString() {
57             return typeString;
58         }
59
60         private String JavaDoc typeString;
61     }
62     
63 }
64
Popular Tags