1 Clazz.declarePackage ("java.awt");
2 Clazz.load (null, "java.awt.DisplayMode", ["java.awt.Dimension"], function () {
3 c$ = Clazz.decorateAsClass (function () {
7 Clazz.instantialize (this, arguments);
8 }, java.awt, "DisplayMode");
9 Clazz.makeConstructor (c$,
10 function (width, height, bitDepth, refreshRate) {
11 this.size = new java.awt.Dimension (width, height);
12 this.bitDepth = bitDepth;
13 this.refreshRate = refreshRate;
15 Clazz.defineMethod (c$, "getHeight",
17 return this.size.height;
19 Clazz.defineMethod (c$, "getWidth",
21 return this.size.width;
23 Clazz.defineMethod (c$, "getBitDepth",
27 Clazz.defineMethod (c$, "getRefreshRate",
29 return this.refreshRate;
31 Clazz.defineMethod (c$, "equals",
35 }return (this.getHeight () == dm.getHeight () && this.getWidth () == dm.getWidth () && this.getBitDepth () == dm.getBitDepth () && this.getRefreshRate () == dm.getRefreshRate ());
36 }, "java.awt.DisplayMode");
37 Clazz.defineMethod (c$, "equals",
39 if (Clazz.instanceOf (dm, java.awt.DisplayMode)) {
40 return this.equals (dm);
44 Clazz.overrideMethod (c$, "hashCode",
46 return this.getWidth () + this.getHeight () + this.getBitDepth () * 7 + this.getRefreshRate () * 13;
48 Clazz.defineStatics (c$,
49 "BIT_DEPTH_MULTI", -1,
50 "REFRESH_RATE_UNKNOWN", 0);