JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / java / awt / event / AdjustmentEvent.js
1 Clazz.declarePackage ("java.awt.event");\r
2 Clazz.load (["java.awt.AWTEvent"], "java.awt.event.AdjustmentEvent", null, function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.adjustable = null;\r
5 this.value = 0;\r
6 this.adjustmentType = 0;\r
7 this.isAdjusting = false;\r
8 Clazz.instantialize (this, arguments);\r
9 }, java.awt.event, "AdjustmentEvent", java.awt.AWTEvent);\r
10 Clazz.makeConstructor (c$, \r
11 function (source, id, type, value) {\r
12 this.construct (source, id, type, value, false);\r
13 }, "java.awt.Adjustable,~N,~N,~N");\r
14 Clazz.makeConstructor (c$, \r
15 function (source, id, type, value, isAdjusting) {\r
16 Clazz.superConstructor (this, java.awt.event.AdjustmentEvent, [source, id]);\r
17 this.adjustable = source;\r
18 this.adjustmentType = type;\r
19 this.value = value;\r
20 this.isAdjusting = isAdjusting;\r
21 }, "java.awt.Adjustable,~N,~N,~N,~B");\r
22 Clazz.defineMethod (c$, "getAdjustable", \r
23 function () {\r
24 return this.adjustable;\r
25 });\r
26 Clazz.defineMethod (c$, "getValue", \r
27 function () {\r
28 return this.value;\r
29 });\r
30 Clazz.defineMethod (c$, "getAdjustmentType", \r
31 function () {\r
32 return this.adjustmentType;\r
33 });\r
34 Clazz.defineMethod (c$, "getValueIsAdjusting", \r
35 function () {\r
36 return this.isAdjusting;\r
37 });\r
38 Clazz.overrideMethod (c$, "paramString", \r
39 function () {\r
40 var typeStr;\r
41 switch (this.id) {\r
42 case 601:\r
43 typeStr = "ADJUSTMENT_VALUE_CHANGED";\r
44 break;\r
45 default:\r
46 typeStr = "unknown type";\r
47 }\r
48 var adjTypeStr;\r
49 switch (this.adjustmentType) {\r
50 case 1:\r
51 adjTypeStr = "UNIT_INCREMENT";\r
52 break;\r
53 case 2:\r
54 adjTypeStr = "UNIT_DECREMENT";\r
55 break;\r
56 case 4:\r
57 adjTypeStr = "BLOCK_INCREMENT";\r
58 break;\r
59 case 3:\r
60 adjTypeStr = "BLOCK_DECREMENT";\r
61 break;\r
62 case 5:\r
63 adjTypeStr = "TRACK";\r
64 break;\r
65 default:\r
66 adjTypeStr = "unknown type";\r
67 }\r
68 return typeStr + ",adjType=" + adjTypeStr + ",value=" + this.value + ",isAdjusting=" + this.isAdjusting;\r
69 });\r
70 Clazz.defineStatics (c$,\r
71 "ADJUSTMENT_FIRST", 601,\r
72 "ADJUSTMENT_LAST", 601,\r
73 "ADJUSTMENT_VALUE_CHANGED", 601,\r
74 "UNIT_INCREMENT", 1,\r
75 "UNIT_DECREMENT", 2,\r
76 "BLOCK_DECREMENT", 3,\r
77 "BLOCK_INCREMENT", 4,\r
78 "TRACK", 5);\r
79 });\r