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