Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / awt / event / MouseWheelEvent.js
1 Clazz.declarePackage ("java.awt.event");
2 Clazz.load (["java.awt.event.MouseEvent"], "java.awt.event.MouseWheelEvent", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.scrollType = 0;
5 this.scrollAmount = 0;
6 this.wheelRotation = 0;
7 Clazz.instantialize (this, arguments);
8 }, java.awt.event, "MouseWheelEvent", java.awt.event.MouseEvent);
9 Clazz.makeConstructor (c$, 
10 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
11 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation);
12 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
13 Clazz.makeConstructor (c$, 
14 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
15 Clazz.superConstructor (this, java.awt.event.MouseWheelEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
16 this.scrollType = scrollType;
17 this.scrollAmount = scrollAmount;
18 this.wheelRotation = wheelRotation;
19 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
20 Clazz.defineMethod (c$, "getScrollType", 
21 function () {
22 return this.scrollType;
23 });
24 Clazz.defineMethod (c$, "getScrollAmount", 
25 function () {
26 return this.scrollAmount;
27 });
28 Clazz.defineMethod (c$, "getWheelRotation", 
29 function () {
30 return this.wheelRotation;
31 });
32 Clazz.defineMethod (c$, "getUnitsToScroll", 
33 function () {
34 return this.scrollAmount * this.wheelRotation;
35 });
36 Clazz.defineMethod (c$, "paramString", 
37 function () {
38 var scrollTypeStr = null;
39 if (this.getScrollType () == 0) {
40 scrollTypeStr = "WHEEL_UNIT_SCROLL";
41 } else if (this.getScrollType () == 1) {
42 scrollTypeStr = "WHEEL_BLOCK_SCROLL";
43 } else {
44 scrollTypeStr = "unknown scroll type";
45 }return Clazz.superCall (this, java.awt.event.MouseWheelEvent, "paramString", []) + ",scrollType=" + scrollTypeStr + ",scrollAmount=" + this.getScrollAmount () + ",wheelRotation=" + this.getWheelRotation ();
46 });
47 Clazz.defineStatics (c$,
48 "WHEEL_UNIT_SCROLL", 0,
49 "WHEEL_BLOCK_SCROLL", 1);
50 });