1 15 16 17 package swingwtx.swing.event; 18 19 import java.net.URL ; 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 url = null; 29 protected Object source = null; 30 protected String description = ""; 31 32 public HyperlinkEvent(Object source, EventType type, URL u) { 33 this.source = source; 34 this.type = type; 35 this.url = u; 36 } 37 38 public HyperlinkEvent(Object source, EventType type, URL u, String description) { 39 this.source = source; 40 this.type = type; 41 this.url = u; 42 this.description = description; 43 } 44 45 public URL getURL() { return url; } 46 public String getDescription() { return description; } 47 public EventType getEventType() { return type; } 48 49 public static final class EventType { 50 private EventType(String 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 toString() { 57 return typeString; 58 } 59 60 private String typeString; 61 } 62 63 } 64 | Popular Tags |