1 Clazz.declarePackage ("jssun.awt.image");
2 Clazz.load (null, "jssun.awt.image.ImageDecoder", ["java.lang.Thread", "jssun.awt.image.ImageConsumerQueue"], function () {
3 c$ = Clazz.decorateAsClass (function () {
11 Clazz.instantialize (this, arguments);
12 }, jssun.awt.image, "ImageDecoder");
13 Clazz.makeConstructor (c$,
17 this.feeder = Thread.currentThread ();
18 }, "jssun.awt.image.InputStreamImageSource,java.io.InputStream");
19 Clazz.defineMethod (c$, "isConsumer",
21 return jssun.awt.image.ImageConsumerQueue.isConsumer (this.queue, ic);
22 }, "java.awt.image.ImageConsumer");
23 Clazz.defineMethod (c$, "removeConsumer",
25 this.queue = jssun.awt.image.ImageConsumerQueue.removeConsumer (this.queue, ic, false);
26 if (!this.finished && this.queue == null) {
28 }}, "java.awt.image.ImageConsumer");
29 Clazz.defineMethod (c$, "nextConsumer",
34 }cq = ((cq == null) ? this.queue : cq.next);
41 }, "jssun.awt.image.ImageConsumerQueue");
42 Clazz.defineMethod (c$, "setDimensions",
46 while ((cq = this.nextConsumer (cq)) != null) {
47 cq.consumer.setDimensions (w, h);
52 Clazz.defineMethod (c$, "setProperties",
56 while ((cq = this.nextConsumer (cq)) != null) {
57 cq.consumer.setProperties (props);
61 }, "java.util.Hashtable");
62 Clazz.defineMethod (c$, "setColorModel",
66 while ((cq = this.nextConsumer (cq)) != null) {
67 cq.consumer.setColorModel (model);
71 }, "java.awt.image.ColorModel");
72 Clazz.defineMethod (c$, "setHints",
76 while ((cq = this.nextConsumer (cq)) != null) {
77 cq.consumer.setHints (hints);
82 Clazz.defineMethod (c$, "headerComplete",
84 this.feeder.setPriority (3);
86 Clazz.defineMethod (c$, "setPixels",
87 function (x, y, w, h, model, pix, off, scansize) {
88 this.source.latchConsumers (this);
91 while ((cq = this.nextConsumer (cq)) != null) {
92 cq.consumer.setPixels (x, y, w, h, model, pix, off, scansize);
96 }, "~N,~N,~N,~N,java.awt.image.ColorModel,~A,~N,~N");
97 Clazz.defineMethod (c$, "setPixels",
98 function (x, y, w, h, model, pix, off, scansize) {
99 this.source.latchConsumers (this);
102 while ((cq = this.nextConsumer (cq)) != null) {
103 cq.consumer.setPixels (x, y, w, h, model, pix, off, scansize);
107 }, "~N,~N,~N,~N,java.awt.image.ColorModel,~A,~N,~N");
108 Clazz.defineMethod (c$, "imageComplete",
109 function (status, done) {
110 this.source.latchConsumers (this);
112 this.finished = true;
113 this.source.doneDecoding (this);
116 while ((cq = this.nextConsumer (cq)) != null) {
117 cq.consumer.imageComplete (status);
122 Clazz.defineMethod (c$, "abort",
125 this.source.doneDecoding (this);
127 this.feeder.interrupt ();
129 Clazz.defineMethod (c$, "close",
131 if (this.input != null) {
135 if (Clazz.exceptionOf (e, java.io.IOException)) {