X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fswingjs%2Fj2s%2Fswingjs%2FJSGraphicsEnvironment.js;fp=site%2Fswingjs%2Fj2s%2Fswingjs%2FJSGraphicsEnvironment.js;h=5344425fb34e9523d61351691c1001d081f641e1;hp=994597ccaf8dc3edc77d46326379b18f5ce5b657;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/swingjs/j2s/swingjs/JSGraphicsEnvironment.js b/site/swingjs/j2s/swingjs/JSGraphicsEnvironment.js index 994597c..5344425 100644 --- a/site/swingjs/j2s/swingjs/JSGraphicsEnvironment.js +++ b/site/swingjs/j2s/swingjs/JSGraphicsEnvironment.js @@ -1,48 +1,48 @@ -Clazz.declarePackage ("swingjs"); -Clazz.load (["java.awt.GraphicsEnvironment"], "swingjs.JSGraphicsEnvironment", ["swingjs.JSGraphics2D", "$.JSToolkit", "swingjs.api.DOMNode"], function () { -c$ = Clazz.declareType (swingjs, "JSGraphicsEnvironment", java.awt.GraphicsEnvironment); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, swingjs.JSGraphicsEnvironment, []); -System.out.println ("JSGraphicsEnvironment initialized"); -}); -Clazz.overrideMethod (c$, "createGraphics", -function (img) { -return this.createGraphicsSized (img, img.getWidth (), img.getHeight ()); -}, "java.awt.image.BufferedImage"); -Clazz.defineMethod (c$, "createGraphicsSized", -function (img, width, height) { -var g = null; -{ -g = img._g; -}if (g == null) { -var canvas = swingjs.api.DOMNode.createElement ("canvas", "img" + System.currentTimeMillis ()); -{ -canvas.width = width; -canvas.height = height; -img._canvas = canvas; -}g = new swingjs.JSGraphics2D (canvas); -{ -img._g = g; -}}return g; -}, "~O,~N,~N"); -Clazz.overrideMethod (c$, "getAllFonts", -function () { -return null; -}); -Clazz.defineMethod (c$, "getAvailableFontFamilyNames", -function () { -return null; -}); -Clazz.defineMethod (c$, "getAvailableFontFamilyNames", -function (l) { -return null; -}, "java.util.Locale"); -Clazz.overrideMethod (c$, "getDefaultScreenDevice", -function () { -if (swingjs.JSGraphicsEnvironment.device == null) swingjs.JSGraphicsEnvironment.device = swingjs.JSToolkit.getInstance ("swingjs.JSScreenDevice"); -return swingjs.JSGraphicsEnvironment.device; -}); -Clazz.defineStatics (c$, -"device", null); -}); +Clazz.declarePackage ("swingjs"); +Clazz.load (["java.awt.GraphicsEnvironment"], "swingjs.JSGraphicsEnvironment", ["swingjs.JSGraphics2D", "$.JSToolkit", "swingjs.api.DOMNode"], function () { +c$ = Clazz.declareType (swingjs, "JSGraphicsEnvironment", java.awt.GraphicsEnvironment); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, swingjs.JSGraphicsEnvironment, []); +System.out.println ("JSGraphicsEnvironment initialized"); +}); +Clazz.overrideMethod (c$, "createGraphics", +function (img) { +return this.createGraphicsSized (img, img.getWidth (), img.getHeight ()); +}, "java.awt.image.BufferedImage"); +Clazz.defineMethod (c$, "createGraphicsSized", +function (img, width, height) { +var g = null; +{ +g = img._g; +}if (g == null) { +var canvas = swingjs.api.DOMNode.createElement ("canvas", "img" + System.currentTimeMillis ()); +{ +canvas.width = width; +canvas.height = height; +img._canvas = canvas; +}g = new swingjs.JSGraphics2D (canvas); +{ +img._g = g; +}}return g; +}, "~O,~N,~N"); +Clazz.overrideMethod (c$, "getAllFonts", +function () { +return null; +}); +Clazz.defineMethod (c$, "getAvailableFontFamilyNames", +function () { +return null; +}); +Clazz.defineMethod (c$, "getAvailableFontFamilyNames", +function (l) { +return null; +}, "java.util.Locale"); +Clazz.overrideMethod (c$, "getDefaultScreenDevice", +function () { +if (swingjs.JSGraphicsEnvironment.device == null) swingjs.JSGraphicsEnvironment.device = swingjs.JSToolkit.getInstance ("swingjs.JSScreenDevice"); +return swingjs.JSGraphicsEnvironment.device; +}); +Clazz.defineStatics (c$, +"device", null); +});