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