1 Clazz.declarePackage ("java.awt");
2 c$ = Clazz.decorateAsClass (function () {
13 this.consumed = false;
14 Clazz.instantialize (this, arguments);
15 }, java.awt, "Event");
16 Clazz.makeConstructor (c$,
17 function (target, when, id, x, y, key, modifiers, arg) {
24 this.modifiers = modifiers;
46 }, "~O,~N,~N,~N,~N,~N,~N,~O");
47 Clazz.makeConstructor (c$,
48 function (target, when, id, x, y, key, modifiers) {
49 this.construct (target, when, id, x, y, key, modifiers, null);
50 }, "~O,~N,~N,~N,~N,~N,~N");
51 Clazz.makeConstructor (c$,
52 function (target, id, arg) {
53 this.construct (target, 0, id, 0, 0, 0, 0, arg);
55 Clazz.defineMethod (c$, "translate",
60 Clazz.defineMethod (c$, "shiftDown",
62 return (this.modifiers & 1) != 0;
64 Clazz.defineMethod (c$, "controlDown",
66 return (this.modifiers & 2) != 0;
68 Clazz.defineMethod (c$, "metaDown",
70 return (this.modifiers & 4) != 0;
72 Clazz.defineMethod (c$, "consume",
84 Clazz.defineMethod (c$, "isConsumed",
88 c$.getOldEventKey = Clazz.defineMethod (c$, "getOldEventKey",
90 var keyCode = e.getKeyCode ();
91 for (var i = 0; i < java.awt.Event.actionKeyCodes.length; i++) {
92 if (java.awt.Event.actionKeyCodes[i][0] == keyCode) {
93 return java.awt.Event.actionKeyCodes[i][1];
95 return e.getKeyChar ();
96 }, "java.awt.event.KeyEvent");
97 Clazz.defineMethod (c$, "getKeyEventChar",
99 for (var i = 0; i < java.awt.Event.actionKeyCodes.length; i++) {
100 if (java.awt.Event.actionKeyCodes[i][1] == this.key) {
103 return String.fromCharCode (this.key);
105 Clazz.defineMethod (c$, "paramString",
107 var str = "id=" + this.id + ",x=" + this.x + ",y=" + this.y;
109 str += ",key=" + this.key;
110 }if (this.shiftDown ()) {
112 }if (this.controlDown ()) {
114 }if (this.metaDown ()) {
116 }if (this.target != null) {
117 str += ",target=" + this.target;
118 }if (this.arg != null) {
119 str += ",arg=" + this.arg;
122 Clazz.overrideMethod (c$, "toString",
124 return this.getClass ().getName () + "[" + this.paramString () + "]";
126 Clazz.defineStatics (c$,
151 "PRINT_SCREEN", 1020,
163 "WINDOW_DESTROY", 201,
164 "WINDOW_EXPOSE", 202,
165 "WINDOW_ICONIFY", 203,
166 "WINDOW_DEICONIFY", 204,
172 "KEY_ACTION_RELEASE", 404,
181 "SCROLL_LINE_UP", 601,
182 "SCROLL_LINE_DOWN", 602,
183 "SCROLL_PAGE_UP", 603,
184 "SCROLL_PAGE_DOWN", 604,
185 "SCROLL_ABSOLUTE", 605,
190 "LIST_DESELECT", 702,
192 "ACTION_EVENT", 1001,
197 "actionKeyCodes", Clazz.newArray (-1, [ Clazz.newIntArray (-1, [36, 1000]), Clazz.newIntArray (-1, [35, 1001]), Clazz.newIntArray (-1, [33, 1002]), Clazz.newIntArray (-1, [34, 1003]), Clazz.newIntArray (-1, [38, 1004]), Clazz.newIntArray (-1, [40, 1005]), Clazz.newIntArray (-1, [37, 1006]), Clazz.newIntArray (-1, [39, 1007]), Clazz.newIntArray (-1, [112, 1008]), Clazz.newIntArray (-1, [113, 1009]), Clazz.newIntArray (-1, [114, 1010]), Clazz.newIntArray (-1, [115, 1011]), Clazz.newIntArray (-1, [116, 1012]), Clazz.newIntArray (-1, [117, 1013]), Clazz.newIntArray (-1, [118, 1014]), Clazz.newIntArray (-1, [119, 1015]), Clazz.newIntArray (-1, [120, 1016]), Clazz.newIntArray (-1, [121, 1017]), Clazz.newIntArray (-1, [122, 1018]), Clazz.newIntArray (-1, [123, 1019]), Clazz.newIntArray (-1, [154, 1020]), Clazz.newIntArray (-1, [145, 1021]), Clazz.newIntArray (-1, [20, 1022]), Clazz.newIntArray (-1, [144, 1023]), Clazz.newIntArray (-1, [19, 1024]), Clazz.newIntArray (-1, [155, 1025])]));