1 11 package org.eclipse.swt.events; 12 13 14 import org.eclipse.swt.widgets.Event; 15 16 34 35 public class KeyEvent extends TypedEvent { 36 37 45 public char character; 46 47 57 public int keyCode; 58 59 66 public int stateMask; 67 68 72 public boolean doit; 73 74 static final long serialVersionUID = 3256442491011412789L; 75 76 82 public KeyEvent(Event e) { 83 super(e); 84 this.character = e.character; 85 this.keyCode = e.keyCode; 86 this.stateMask = e.stateMask; 87 this.doit = e.doit; 88 } 89 90 96 public String toString() { 97 String string = super.toString (); 98 return string.substring (0, string.length() - 1) + " character='" + ((character == 0) ? "\\0" : "" + character) + "'" 100 + " keyCode=" + keyCode 101 + " stateMask=" + stateMask 102 + " doit=" + doit 103 + "}"; 104 } 105 } 106 | Popular Tags |