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