1 11 package org.eclipse.swt.events; 12 13 14 import org.eclipse.swt.widgets.*; 15 import org.eclipse.swt.internal.SWTEventObject; 16 17 24 public class TypedEvent extends SWTEventObject { 25 26 31 public Display display; 32 33 36 public Widget widget; 37 38 45 public int time; 46 47 50 public Object data; 51 52 static final long serialVersionUID = 3257285846578377524L; 53 54 59 public TypedEvent(Object object) { 60 super(object); 61 } 62 63 69 public TypedEvent(Event e) { 70 super(e.widget); 71 this.display = e.display; 72 this.widget = e.widget; 73 this.time = e.time; 74 this.data = e.data; 75 } 76 77 83 String getName () { 84 String string = getClass ().getName (); 85 int index = string.lastIndexOf ('.'); 86 if (index == -1) return string; 87 return string.substring (index + 1, string.length ()); 88 } 89 90 96 public String toString() { 97 return getName () 98 + "{" + widget 99 + " time=" + time 100 + " data=" + data 101 + "}"; 102 } 103 } 104 | Popular Tags |