File size: 1,952 Bytes
233f6d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Clazz.declarePackage ("java.awt.event");
c$ = Clazz.decorateAsClass (function () {
this.when = 0;
this.modifiers = 0;
this.source = null;
this.id = 0;
this.consumed = false;
Clazz.instantialize (this, arguments);
}, java.awt.event, "InputEvent");
Clazz.makeConstructor (c$, 
function (source, id, when, modifiers) {
this.source = source;
this.id = id;
this.when = when;
this.modifiers = modifiers;
}, "~O,~N,~N,~N");
Clazz.defineMethod (c$, "isShiftDown", 
function () {
return (this.modifiers & 1) != 0;
});
Clazz.defineMethod (c$, "ibsControlDown", 
function () {
return (this.modifiers & 2) != 0;
});
Clazz.defineMethod (c$, "isMetaDown", 
function () {
return (this.modifiers & 4) != 0;
});
Clazz.defineMethod (c$, "isAltDown", 
function () {
return (this.modifiers & 8) != 0;
});
Clazz.defineMethod (c$, "isAltGraphDown", 
function () {
return (this.modifiers & 32) != 0;
});
Clazz.defineMethod (c$, "getWhen", 
function () {
return this.when;
});
Clazz.defineMethod (c$, "getModifiers", 
function () {
return this.modifiers & (-16321);
});
Clazz.defineMethod (c$, "getModifiersEx", 
function () {
return this.modifiers & -64;
});
Clazz.defineMethod (c$, "consume", 
function () {
this.consumed = true;
});
Clazz.defineMethod (c$, "isConsumed", 
function () {
return this.consumed;
});
c$.getModifiersExText = Clazz.defineMethod (c$, "getModifiersExText", 
function (modifiers) {
return "[" + modifiers + "]";
}, "~N");
Clazz.defineStatics (c$,
"SHIFT_MASK", 1,
"CTRL_MASK", 2,
"META_MASK", 4,
"ALT_MASK", 8,
"ALT_GRAPH_MASK", 32,
"BUTTON1_MASK", 16,
"BUTTON2_MASK", 8,
"BUTTON3_MASK", 4,
"SHIFT_DOWN_MASK", 64,
"CTRL_DOWN_MASK", 128,
"META_DOWN_MASK", 256,
"ALT_DOWN_MASK", 512,
"BUTTON1_DOWN_MASK", 1024,
"BUTTON2_DOWN_MASK", 2048,
"BUTTON3_DOWN_MASK", 4096,
"ALT_GRAPH_DOWN_MASK", 8192,
"FIRST_HIGH_BIT", 16384,
"JDK_1_3_MODIFIERS", 63,
"HIGH_MODIFIERS", -16384);