X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjssun%2Fawt%2Fimage%2FOffScreenImageSource.js;fp=site%2Fj2s%2Fjssun%2Fawt%2Fimage%2FOffScreenImageSource.js;h=41468963dbc7cbbbaf62507c690a172868622f70;hp=03760e84122be92328144d49b17a2b6e7620a760;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/jssun/awt/image/OffScreenImageSource.js b/site/j2s/jssun/awt/image/OffScreenImageSource.js index 03760e8..4146896 100644 --- a/site/j2s/jssun/awt/image/OffScreenImageSource.js +++ b/site/j2s/jssun/awt/image/OffScreenImageSource.js @@ -1,66 +1,66 @@ -Clazz.declarePackage ("jssun.awt.image"); -Clazz.load (["java.awt.image.ImageProducer"], "jssun.awt.image.OffScreenImageSource", ["java.util.Hashtable"], function () { -c$ = Clazz.decorateAsClass (function () { -this.image = null; -this.width = 0; -this.height = 0; -this.properties = null; -this.theConsumer = null; -Clazz.instantialize (this, arguments); -}, jssun.awt.image, "OffScreenImageSource", null, java.awt.image.ImageProducer); -Clazz.makeConstructor (c$, -function (image, properties) { -this.image = image; -if (properties != null) { -this.properties = properties; -} else { -this.properties = new java.util.Hashtable (); -}this.width = image.getWidth (); -this.height = image.getHeight (); -}, "java.awt.image.BufferedImage,java.util.Hashtable"); -Clazz.makeConstructor (c$, -function (image) { -this.construct (image, null); -}, "java.awt.image.BufferedImage"); -Clazz.overrideMethod (c$, "addConsumer", -function (ic) { -this.theConsumer = ic; -this.produce (); -}, "java.awt.image.ImageConsumer"); -Clazz.overrideMethod (c$, "isConsumer", -function (ic) { -return (ic === this.theConsumer); -}, "java.awt.image.ImageConsumer"); -Clazz.overrideMethod (c$, "removeConsumer", -function (ic) { -if (this.theConsumer === ic) { -this.theConsumer = null; -}}, "java.awt.image.ImageConsumer"); -Clazz.overrideMethod (c$, "startProduction", -function (ic) { -this.addConsumer (ic); -}, "java.awt.image.ImageConsumer"); -Clazz.overrideMethod (c$, "requestTopDownLeftRightResend", -function (ic) { -}, "java.awt.image.ImageConsumer"); -Clazz.defineMethod (c$, "sendPixels", - function () { -var cm = this.image.getColorModel (); -}); -Clazz.defineMethod (c$, "produce", - function () { -try { -this.theConsumer.setDimensions (this.image.getWidth (), this.image.getHeight ()); -this.theConsumer.setProperties (this.properties); -this.sendPixels (); -this.theConsumer.imageComplete (2); -} catch (e) { -if (Clazz.exceptionOf (e, NullPointerException)) { -if (this.theConsumer != null) { -this.theConsumer.imageComplete (1); -}} else { -throw e; -} -} -}); -}); +Clazz.declarePackage ("jssun.awt.image"); +Clazz.load (["java.awt.image.ImageProducer"], "jssun.awt.image.OffScreenImageSource", ["java.util.Hashtable"], function () { +c$ = Clazz.decorateAsClass (function () { +this.image = null; +this.width = 0; +this.height = 0; +this.properties = null; +this.theConsumer = null; +Clazz.instantialize (this, arguments); +}, jssun.awt.image, "OffScreenImageSource", null, java.awt.image.ImageProducer); +Clazz.makeConstructor (c$, +function (image, properties) { +this.image = image; +if (properties != null) { +this.properties = properties; +} else { +this.properties = new java.util.Hashtable (); +}this.width = image.getWidth (); +this.height = image.getHeight (); +}, "java.awt.image.BufferedImage,java.util.Hashtable"); +Clazz.makeConstructor (c$, +function (image) { +this.construct (image, null); +}, "java.awt.image.BufferedImage"); +Clazz.overrideMethod (c$, "addConsumer", +function (ic) { +this.theConsumer = ic; +this.produce (); +}, "java.awt.image.ImageConsumer"); +Clazz.overrideMethod (c$, "isConsumer", +function (ic) { +return (ic === this.theConsumer); +}, "java.awt.image.ImageConsumer"); +Clazz.overrideMethod (c$, "removeConsumer", +function (ic) { +if (this.theConsumer === ic) { +this.theConsumer = null; +}}, "java.awt.image.ImageConsumer"); +Clazz.overrideMethod (c$, "startProduction", +function (ic) { +this.addConsumer (ic); +}, "java.awt.image.ImageConsumer"); +Clazz.overrideMethod (c$, "requestTopDownLeftRightResend", +function (ic) { +}, "java.awt.image.ImageConsumer"); +Clazz.defineMethod (c$, "sendPixels", + function () { +var cm = this.image.getColorModel (); +}); +Clazz.defineMethod (c$, "produce", + function () { +try { +this.theConsumer.setDimensions (this.image.getWidth (), this.image.getHeight ()); +this.theConsumer.setProperties (this.properties); +this.sendPixels (); +this.theConsumer.imageComplete (2); +} catch (e) { +if (Clazz.exceptionOf (e, NullPointerException)) { +if (this.theConsumer != null) { +this.theConsumer.imageComplete (1); +}} else { +throw e; +} +} +}); +});