X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=bin%2Fjavajs%2Fawt%2FColor.js;h=725aa3122b4a23a38635d4bc361601490ce4b743;hp=1f168d2b9e3c14f645f785b6a3db631cbf8b66fe;hb=7301a2415adab88038b291fc54caeeb3a5a47a44;hpb=6154cb57a6eac3bb1344b8342495f5bb701ee921 diff --git a/bin/javajs/awt/Color.js b/bin/javajs/awt/Color.js index 1f168d2..725aa31 100644 --- a/bin/javajs/awt/Color.js +++ b/bin/javajs/awt/Color.js @@ -1,43 +1,43 @@ -Clazz.declarePackage ("javajs.awt"); -Clazz.load (["javajs.api.GenericColor"], "javajs.awt.Color", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.argb = 0; -Clazz.instantialize (this, arguments); -}, javajs.awt, "Color", null, javajs.api.GenericColor); -Clazz.overrideMethod (c$, "getRGB", -function () { -return this.argb & 0x00FFFFFF; -}); -Clazz.overrideMethod (c$, "getOpacity255", -function () { -return ((this.argb >> 24) & 0xFF); -}); -Clazz.overrideMethod (c$, "setOpacity255", -function (a) { -this.argb = this.argb & 0xFFFFFF | ((a & 0xFF) << 24); -}, "~N"); -c$.get1 = Clazz.defineMethod (c$, "get1", -function (rgb) { -var c = new javajs.awt.Color (); -c.argb = rgb | 0xFF000000; -return c; -}, "~N"); -c$.get3 = Clazz.defineMethod (c$, "get3", -function (r, g, b) { -return new javajs.awt.Color ().set4 (r, g, b, 0xFF); -}, "~N,~N,~N"); -c$.get4 = Clazz.defineMethod (c$, "get4", -function (r, g, b, a) { -return new javajs.awt.Color ().set4 (r, g, b, a); -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "set4", -($fz = function (r, g, b, a) { -this.argb = ((a << 24) | (r << 16) | (g << 8) | b) & 0xFFFFFFFF; -return this; -}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N"); -Clazz.overrideMethod (c$, "toString", -function () { -var s = ("00000000" + Integer.toHexString (this.argb)); -return "[0x" + s.substring (s.length - 8, s.length) + "]"; -}); -}); +Clazz.declarePackage ("javajs.awt"); +Clazz.load (["javajs.api.GenericColor"], "javajs.awt.Color", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.argb = 0; +Clazz.instantialize (this, arguments); +}, javajs.awt, "Color", null, javajs.api.GenericColor); +Clazz.overrideMethod (c$, "getRGB", +function () { +return this.argb & 0x00FFFFFF; +}); +Clazz.overrideMethod (c$, "getOpacity255", +function () { +return ((this.argb >> 24) & 0xFF); +}); +Clazz.overrideMethod (c$, "setOpacity255", +function (a) { +this.argb = this.argb & 0xFFFFFF | ((a & 0xFF) << 24); +}, "~N"); +c$.get1 = Clazz.defineMethod (c$, "get1", +function (rgb) { +var c = new javajs.awt.Color (); +c.argb = rgb | 0xFF000000; +return c; +}, "~N"); +c$.get3 = Clazz.defineMethod (c$, "get3", +function (r, g, b) { +return new javajs.awt.Color ().set4 (r, g, b, 0xFF); +}, "~N,~N,~N"); +c$.get4 = Clazz.defineMethod (c$, "get4", +function (r, g, b, a) { +return new javajs.awt.Color ().set4 (r, g, b, a); +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "set4", +($fz = function (r, g, b, a) { +this.argb = ((a << 24) | (r << 16) | (g << 8) | b) & 0xFFFFFFFF; +return this; +}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N"); +Clazz.overrideMethod (c$, "toString", +function () { +var s = ("00000000" + Integer.toHexString (this.argb)); +return "[0x" + s.substring (s.length - 8, s.length) + "]"; +}); +});