1 11 package org.eclipse.swt.widgets; 12 13 14 import org.eclipse.swt.graphics.*; 15 16 29 30 public class Event { 31 32 37 public Display display; 38 39 42 public Widget widget; 43 44 50 public int type; 51 52 58 public int detail; 59 60 63 public Widget item; 64 65 70 public int index; 71 72 78 public GC gc; 79 80 86 public int x; 87 88 94 public int y; 95 96 100 public int width; 101 102 106 public int height; 107 108 114 public int count; 115 116 123 public int time; 124 125 130 public int button; 131 132 141 public char character; 142 143 154 public int keyCode; 155 156 162 public int stateMask; 163 164 168 public int start, end; 169 170 175 public String text; 176 177 182 public boolean doit = true; 183 184 187 public Object data; 188 189 194 public Rectangle getBounds () { 195 return new Rectangle (x, y, width, height); 196 } 197 198 203 public void setBounds (Rectangle rect) { 204 this.x = rect.x; 205 this.y = rect.y; 206 this.width = rect.width; 207 this.height = rect.height; 208 } 209 210 216 public String toString () { 217 return "Event {type=" + type + " " + widget + " time=" + time + " data=" + data + " x=" + x + " y=" + y + " width=" + width + " height=" + height + " detail=" + detail + "}"; } 219 } 220 | Popular Tags |