X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fswingjs%2FJSGraphicsConfiguration.js;fp=site%2Fj2s%2Fswingjs%2FJSGraphicsConfiguration.js;h=1bfba4eb540c7ec3476ccf7d018cd256a96a7d9a;hp=484e787bf9d3fc6dd0a39202bd0dd9a119dee674;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/swingjs/JSGraphicsConfiguration.js b/site/j2s/swingjs/JSGraphicsConfiguration.js index 484e787..1bfba4e 100644 --- a/site/j2s/swingjs/JSGraphicsConfiguration.js +++ b/site/j2s/swingjs/JSGraphicsConfiguration.js @@ -1,43 +1,43 @@ -Clazz.declarePackage ("swingjs"); -Clazz.load (["java.awt.GraphicsConfiguration"], "swingjs.JSGraphicsConfiguration", ["java.awt.GraphicsEnvironment", "$.Rectangle", "java.awt.geom.AffineTransform", "java.awt.image.BufferedImage", "$.ColorModel", "swingjs.JSToolkit"], function () { -c$ = Clazz.declareType (swingjs, "JSGraphicsConfiguration", java.awt.GraphicsConfiguration); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, swingjs.JSGraphicsConfiguration, []); -System.out.println ("JSGraphicsConfiguration initialized"); -}); -Clazz.overrideMethod (c$, "getDevice", -function () { -return java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getDefaultScreenDevice (); -}); -Clazz.defineMethod (c$, "createCompatibleImage", -function (width, height) { -var cm = this.getColorModel (); -var wr = cm.createCompatibleWritableRaster (width, height); -return new java.awt.image.BufferedImage (cm, wr, false, null); -}, "~N,~N"); -Clazz.defineMethod (c$, "getColorModel", -function () { -return java.awt.image.ColorModel.getRGBdefault (); -}); -Clazz.defineMethod (c$, "getColorModel", -function (transparency) { -return java.awt.image.ColorModel.getRGBdefault (); -}, "~N"); -Clazz.overrideMethod (c$, "getDefaultTransform", -function () { -return new java.awt.geom.AffineTransform (); -}); -Clazz.overrideMethod (c$, "getNormalizingTransform", -function () { -return new java.awt.geom.AffineTransform (); -}); -Clazz.overrideMethod (c$, "getBounds", -function () { -var doc = null; -{ -doc = document; -}var d = swingjs.JSToolkit.getJQuery ().$ (doc); -return new java.awt.Rectangle (d.width (), d.height ()); -}); -}); +Clazz.declarePackage ("swingjs"); +Clazz.load (["java.awt.GraphicsConfiguration"], "swingjs.JSGraphicsConfiguration", ["java.awt.GraphicsEnvironment", "$.Rectangle", "java.awt.geom.AffineTransform", "java.awt.image.BufferedImage", "$.ColorModel", "swingjs.JSToolkit"], function () { +c$ = Clazz.declareType (swingjs, "JSGraphicsConfiguration", java.awt.GraphicsConfiguration); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, swingjs.JSGraphicsConfiguration, []); +System.out.println ("JSGraphicsConfiguration initialized"); +}); +Clazz.overrideMethod (c$, "getDevice", +function () { +return java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getDefaultScreenDevice (); +}); +Clazz.defineMethod (c$, "createCompatibleImage", +function (width, height) { +var cm = this.getColorModel (); +var wr = cm.createCompatibleWritableRaster (width, height); +return new java.awt.image.BufferedImage (cm, wr, false, null); +}, "~N,~N"); +Clazz.defineMethod (c$, "getColorModel", +function () { +return java.awt.image.ColorModel.getRGBdefault (); +}); +Clazz.defineMethod (c$, "getColorModel", +function (transparency) { +return java.awt.image.ColorModel.getRGBdefault (); +}, "~N"); +Clazz.overrideMethod (c$, "getDefaultTransform", +function () { +return new java.awt.geom.AffineTransform (); +}); +Clazz.overrideMethod (c$, "getNormalizingTransform", +function () { +return new java.awt.geom.AffineTransform (); +}); +Clazz.overrideMethod (c$, "getBounds", +function () { +var doc = null; +{ +doc = document; +}var d = swingjs.JSToolkit.getJQuery ().$ (doc); +return new java.awt.Rectangle (d.width (), d.height ()); +}); +});