Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / awt / image / MemoryImageSource.js
index 25835c7..ec8ea4f 100644 (file)
-Clazz.declarePackage ("java.awt.image");\r
-Clazz.load (["java.awt.image.ImageProducer", "java.util.Vector"], "java.awt.image.MemoryImageSource", ["java.util.Hashtable", "java.awt.image.ColorModel"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.width = 0;\r
-this.height = 0;\r
-this.model = null;\r
-this.pixels = null;\r
-this.pixeloffset = 0;\r
-this.pixelscan = 0;\r
-this.properties = null;\r
-this.theConsumers = null;\r
-this.animating = false;\r
-this.fullbuffers = false;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt.image, "MemoryImageSource", null, java.awt.image.ImageProducer);\r
-Clazz.prepareFields (c$, function () {\r
-this.theConsumers =  new java.util.Vector ();\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (w, h, cm, pix, off, scan) {\r
-this.initialize (w, h, cm, pix, off, scan, null);\r
-}, "~N,~N,java.awt.image.ColorModel,~A,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (w, h, cm, pix, off, scan, props) {\r
-this.initialize (w, h, cm, pix, off, scan, props);\r
-}, "~N,~N,java.awt.image.ColorModel,~A,~N,~N,java.util.Hashtable");\r
-Clazz.makeConstructor (c$, \r
-function (w, h, cm, pix, off, scan) {\r
-this.initialize (w, h, cm, pix, off, scan, null);\r
-}, "~N,~N,java.awt.image.ColorModel,~A,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (w, h, cm, pix, off, scan, props) {\r
-this.initialize (w, h, cm, pix, off, scan, props);\r
-}, "~N,~N,java.awt.image.ColorModel,~A,~N,~N,java.util.Hashtable");\r
-Clazz.defineMethod (c$, "initialize", \r
- function (w, h, cm, pix, off, scan, props) {\r
-this.width = w;\r
-this.height = h;\r
-this.model = cm;\r
-this.pixels = pix;\r
-this.pixeloffset = off;\r
-this.pixelscan = scan;\r
-if (props == null) {\r
-props =  new java.util.Hashtable ();\r
-}this.properties = props;\r
-}, "~N,~N,java.awt.image.ColorModel,~O,~N,~N,java.util.Hashtable");\r
-Clazz.makeConstructor (c$, \r
-function (w, h, pix, off, scan) {\r
-this.initialize (w, h, java.awt.image.ColorModel.getRGBdefault (), pix, off, scan, null);\r
-}, "~N,~N,~A,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (w, h, pix, off, scan, props) {\r
-this.initialize (w, h, java.awt.image.ColorModel.getRGBdefault (), pix, off, scan, props);\r
-}, "~N,~N,~A,~N,~N,java.util.Hashtable");\r
-Clazz.overrideMethod (c$, "addConsumer", \r
-function (ic) {\r
-if (this.theConsumers.contains (ic)) {\r
-return;\r
-}this.theConsumers.addElement (ic);\r
-try {\r
-this.initConsumer (ic);\r
-this.sendPixels (ic, 0, 0, this.width, this.height);\r
-if (this.isConsumer (ic)) {\r
-ic.imageComplete (this.animating ? 2 : 3);\r
-if (!this.animating && this.isConsumer (ic)) {\r
-ic.imageComplete (1);\r
-this.removeConsumer (ic);\r
-}}} catch (e) {\r
-if (Clazz.exceptionOf (e, Exception)) {\r
-if (this.isConsumer (ic)) {\r
-ic.imageComplete (1);\r
-}} else {\r
-throw e;\r
-}\r
-}\r
-}, "java.awt.image.ImageConsumer");\r
-Clazz.overrideMethod (c$, "isConsumer", \r
-function (ic) {\r
-return this.theConsumers.contains (ic);\r
-}, "java.awt.image.ImageConsumer");\r
-Clazz.overrideMethod (c$, "removeConsumer", \r
-function (ic) {\r
-this.theConsumers.removeElement (ic);\r
-}, "java.awt.image.ImageConsumer");\r
-Clazz.overrideMethod (c$, "startProduction", \r
-function (ic) {\r
-this.addConsumer (ic);\r
-}, "java.awt.image.ImageConsumer");\r
-Clazz.overrideMethod (c$, "requestTopDownLeftRightResend", \r
-function (ic) {\r
-}, "java.awt.image.ImageConsumer");\r
-Clazz.defineMethod (c$, "setAnimated", \r
-function (animated) {\r
-this.animating = animated;\r
-if (!this.animating) {\r
-var enum_ = this.theConsumers.elements ();\r
-while (enum_.hasMoreElements ()) {\r
-var ic = enum_.nextElement ();\r
-ic.imageComplete (3);\r
-if (this.isConsumer (ic)) {\r
-ic.imageComplete (1);\r
-}}\r
-this.theConsumers.removeAllElements ();\r
-}}, "~B");\r
-Clazz.defineMethod (c$, "setFullBufferUpdates", \r
-function (fullbuffers) {\r
-if (this.fullbuffers == fullbuffers) {\r
-return;\r
-}this.fullbuffers = fullbuffers;\r
-if (this.animating) {\r
-var enum_ = this.theConsumers.elements ();\r
-while (enum_.hasMoreElements ()) {\r
-var ic = enum_.nextElement ();\r
-ic.setHints (fullbuffers ? (6) : 1);\r
-}\r
-}}, "~B");\r
-Clazz.defineMethod (c$, "newPixels", \r
-function () {\r
-this.newPixels (0, 0, this.width, this.height, true);\r
-});\r
-Clazz.defineMethod (c$, "newPixels", \r
-function (x, y, w, h) {\r
-this.newPixels (x, y, w, h, true);\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "newPixels", \r
-function (x, y, w, h, framenotify) {\r
-if (this.animating) {\r
-if (this.fullbuffers) {\r
-x = y = 0;\r
-w = this.width;\r
-h = this.height;\r
-} else {\r
-if (x < 0) {\r
-w += x;\r
-x = 0;\r
-}if (x + w > this.width) {\r
-w = this.width - x;\r
-}if (y < 0) {\r
-h += y;\r
-y = 0;\r
-}if (y + h > this.height) {\r
-h = this.height - y;\r
-}}if ((w <= 0 || h <= 0) && !framenotify) {\r
-return;\r
-}var enum_ = this.theConsumers.elements ();\r
-while (enum_.hasMoreElements ()) {\r
-var ic = enum_.nextElement ();\r
-if (w > 0 && h > 0) {\r
-this.sendPixels (ic, x, y, w, h);\r
-}if (framenotify && this.isConsumer (ic)) {\r
-ic.imageComplete (2);\r
-}}\r
-}}, "~N,~N,~N,~N,~B");\r
-Clazz.defineMethod (c$, "newPixels", \r
-function (newpix, newmodel, offset, scansize) {\r
-this.pixels = newpix;\r
-this.model = newmodel;\r
-this.pixeloffset = offset;\r
-this.pixelscan = scansize;\r
-this.newPixels ();\r
-}, "~A,java.awt.image.ColorModel,~N,~N");\r
-Clazz.defineMethod (c$, "newPixels", \r
-function (newpix, newmodel, offset, scansize) {\r
-this.pixels = newpix;\r
-this.model = newmodel;\r
-this.pixeloffset = offset;\r
-this.pixelscan = scansize;\r
-this.newPixels ();\r
-}, "~A,java.awt.image.ColorModel,~N,~N");\r
-Clazz.defineMethod (c$, "initConsumer", \r
- function (ic) {\r
-if (this.isConsumer (ic)) {\r
-ic.setDimensions (this.width, this.height);\r
-}if (this.isConsumer (ic)) {\r
-ic.setProperties (this.properties);\r
-}if (this.isConsumer (ic)) {\r
-ic.setColorModel (this.model);\r
-}if (this.isConsumer (ic)) {\r
-ic.setHints (this.animating ? (this.fullbuffers ? (6) : 1) : (30));\r
-}}, "java.awt.image.ImageConsumer");\r
-Clazz.defineMethod (c$, "sendPixels", \r
- function (ic, x, y, w, h) {\r
-var off = this.pixeloffset + this.pixelscan * y + x;\r
-if (this.isConsumer (ic)) {\r
-if (Clazz.instanceOf (this.pixels, Array)) {\r
-ic.setPixels (x, y, w, h, this.model, (this.pixels), off, this.pixelscan);\r
-} else {\r
-ic.setPixels (x, y, w, h, this.model, (this.pixels), off, this.pixelscan);\r
-}}}, "java.awt.image.ImageConsumer,~N,~N,~N,~N");\r
-});\r
+Clazz.declarePackage ("java.awt.image");
+Clazz.load (["java.awt.image.ImageProducer", "java.util.Vector"], "java.awt.image.MemoryImageSource", ["java.util.Hashtable", "java.awt.image.ColorModel"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.width = 0;
+this.height = 0;
+this.model = null;
+this.pixels = null;
+this.pixeloffset = 0;
+this.pixelscan = 0;
+this.properties = null;
+this.theConsumers = null;
+this.animating = false;
+this.fullbuffers = false;
+Clazz.instantialize (this, arguments);
+}, java.awt.image, "MemoryImageSource", null, java.awt.image.ImageProducer);
+Clazz.prepareFields (c$, function () {
+this.theConsumers =  new java.util.Vector ();
+});
+Clazz.makeConstructor (c$, 
+function (w, h, cm, pix, off, scan) {
+this.initialize (w, h, cm, pix, off, scan, null);
+}, "~N,~N,java.awt.image.ColorModel,~A,~N,~N");
+Clazz.makeConstructor (c$, 
+function (w, h, cm, pix, off, scan, props) {
+this.initialize (w, h, cm, pix, off, scan, props);
+}, "~N,~N,java.awt.image.ColorModel,~A,~N,~N,java.util.Hashtable");
+Clazz.makeConstructor (c$, 
+function (w, h, cm, pix, off, scan) {
+this.initialize (w, h, cm, pix, off, scan, null);
+}, "~N,~N,java.awt.image.ColorModel,~A,~N,~N");
+Clazz.makeConstructor (c$, 
+function (w, h, cm, pix, off, scan, props) {
+this.initialize (w, h, cm, pix, off, scan, props);
+}, "~N,~N,java.awt.image.ColorModel,~A,~N,~N,java.util.Hashtable");
+Clazz.defineMethod (c$, "initialize", 
+ function (w, h, cm, pix, off, scan, props) {
+this.width = w;
+this.height = h;
+this.model = cm;
+this.pixels = pix;
+this.pixeloffset = off;
+this.pixelscan = scan;
+if (props == null) {
+props =  new java.util.Hashtable ();
+}this.properties = props;
+}, "~N,~N,java.awt.image.ColorModel,~O,~N,~N,java.util.Hashtable");
+Clazz.makeConstructor (c$, 
+function (w, h, pix, off, scan) {
+this.initialize (w, h, java.awt.image.ColorModel.getRGBdefault (), pix, off, scan, null);
+}, "~N,~N,~A,~N,~N");
+Clazz.makeConstructor (c$, 
+function (w, h, pix, off, scan, props) {
+this.initialize (w, h, java.awt.image.ColorModel.getRGBdefault (), pix, off, scan, props);
+}, "~N,~N,~A,~N,~N,java.util.Hashtable");
+Clazz.overrideMethod (c$, "addConsumer", 
+function (ic) {
+if (this.theConsumers.contains (ic)) {
+return;
+}this.theConsumers.addElement (ic);
+try {
+this.initConsumer (ic);
+this.sendPixels (ic, 0, 0, this.width, this.height);
+if (this.isConsumer (ic)) {
+ic.imageComplete (this.animating ? 2 : 3);
+if (!this.animating && this.isConsumer (ic)) {
+ic.imageComplete (1);
+this.removeConsumer (ic);
+}}} catch (e) {
+if (Clazz.exceptionOf (e, Exception)) {
+if (this.isConsumer (ic)) {
+ic.imageComplete (1);
+}} else {
+throw e;
+}
+}
+}, "java.awt.image.ImageConsumer");
+Clazz.overrideMethod (c$, "isConsumer", 
+function (ic) {
+return this.theConsumers.contains (ic);
+}, "java.awt.image.ImageConsumer");
+Clazz.overrideMethod (c$, "removeConsumer", 
+function (ic) {
+this.theConsumers.removeElement (ic);
+}, "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$, "setAnimated", 
+function (animated) {
+this.animating = animated;
+if (!this.animating) {
+var enum_ = this.theConsumers.elements ();
+while (enum_.hasMoreElements ()) {
+var ic = enum_.nextElement ();
+ic.imageComplete (3);
+if (this.isConsumer (ic)) {
+ic.imageComplete (1);
+}}
+this.theConsumers.removeAllElements ();
+}}, "~B");
+Clazz.defineMethod (c$, "setFullBufferUpdates", 
+function (fullbuffers) {
+if (this.fullbuffers == fullbuffers) {
+return;
+}this.fullbuffers = fullbuffers;
+if (this.animating) {
+var enum_ = this.theConsumers.elements ();
+while (enum_.hasMoreElements ()) {
+var ic = enum_.nextElement ();
+ic.setHints (fullbuffers ? (6) : 1);
+}
+}}, "~B");
+Clazz.defineMethod (c$, "newPixels", 
+function () {
+this.newPixels (0, 0, this.width, this.height, true);
+});
+Clazz.defineMethod (c$, "newPixels", 
+function (x, y, w, h) {
+this.newPixels (x, y, w, h, true);
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "newPixels", 
+function (x, y, w, h, framenotify) {
+if (this.animating) {
+if (this.fullbuffers) {
+x = y = 0;
+w = this.width;
+h = this.height;
+} else {
+if (x < 0) {
+w += x;
+x = 0;
+}if (x + w > this.width) {
+w = this.width - x;
+}if (y < 0) {
+h += y;
+y = 0;
+}if (y + h > this.height) {
+h = this.height - y;
+}}if ((w <= 0 || h <= 0) && !framenotify) {
+return;
+}var enum_ = this.theConsumers.elements ();
+while (enum_.hasMoreElements ()) {
+var ic = enum_.nextElement ();
+if (w > 0 && h > 0) {
+this.sendPixels (ic, x, y, w, h);
+}if (framenotify && this.isConsumer (ic)) {
+ic.imageComplete (2);
+}}
+}}, "~N,~N,~N,~N,~B");
+Clazz.defineMethod (c$, "newPixels", 
+function (newpix, newmodel, offset, scansize) {
+this.pixels = newpix;
+this.model = newmodel;
+this.pixeloffset = offset;
+this.pixelscan = scansize;
+this.newPixels ();
+}, "~A,java.awt.image.ColorModel,~N,~N");
+Clazz.defineMethod (c$, "newPixels", 
+function (newpix, newmodel, offset, scansize) {
+this.pixels = newpix;
+this.model = newmodel;
+this.pixeloffset = offset;
+this.pixelscan = scansize;
+this.newPixels ();
+}, "~A,java.awt.image.ColorModel,~N,~N");
+Clazz.defineMethod (c$, "initConsumer", 
+ function (ic) {
+if (this.isConsumer (ic)) {
+ic.setDimensions (this.width, this.height);
+}if (this.isConsumer (ic)) {
+ic.setProperties (this.properties);
+}if (this.isConsumer (ic)) {
+ic.setColorModel (this.model);
+}if (this.isConsumer (ic)) {
+ic.setHints (this.animating ? (this.fullbuffers ? (6) : 1) : (30));
+}}, "java.awt.image.ImageConsumer");
+Clazz.defineMethod (c$, "sendPixels", 
+ function (ic, x, y, w, h) {
+var off = this.pixeloffset + this.pixelscan * y + x;
+if (this.isConsumer (ic)) {
+if (Clazz.instanceOf (this.pixels, Array)) {
+ic.setPixels (x, y, w, h, this.model, (this.pixels), off, this.pixelscan);
+} else {
+ic.setPixels (x, y, w, h, this.model, (this.pixels), off, this.pixelscan);
+}}}, "java.awt.image.ImageConsumer,~N,~N,~N,~N");
+});