1 Clazz.declarePackage ("jssun.awt.image");
2 Clazz.load (["java.awt.image.ImageProducer"], "jssun.awt.image.OffScreenImageSource", ["java.util.Hashtable"], function () {
3 c$ = Clazz.decorateAsClass (function () {
7 this.properties = null;
8 this.theConsumer = null;
9 Clazz.instantialize (this, arguments);
10 }, jssun.awt.image, "OffScreenImageSource", null, java.awt.image.ImageProducer);
11 Clazz.makeConstructor (c$,
12 function (image, properties) {
14 if (properties != null) {
15 this.properties = properties;
17 this.properties = new java.util.Hashtable ();
18 }this.width = image.getWidth ();
19 this.height = image.getHeight ();
20 }, "java.awt.image.BufferedImage,java.util.Hashtable");
21 Clazz.makeConstructor (c$,
23 this.construct (image, null);
24 }, "java.awt.image.BufferedImage");
25 Clazz.overrideMethod (c$, "addConsumer",
27 this.theConsumer = ic;
29 }, "java.awt.image.ImageConsumer");
30 Clazz.overrideMethod (c$, "isConsumer",
32 return (ic === this.theConsumer);
33 }, "java.awt.image.ImageConsumer");
34 Clazz.overrideMethod (c$, "removeConsumer",
36 if (this.theConsumer === ic) {
37 this.theConsumer = null;
38 }}, "java.awt.image.ImageConsumer");
39 Clazz.overrideMethod (c$, "startProduction",
41 this.addConsumer (ic);
42 }, "java.awt.image.ImageConsumer");
43 Clazz.overrideMethod (c$, "requestTopDownLeftRightResend",
45 }, "java.awt.image.ImageConsumer");
46 Clazz.defineMethod (c$, "sendPixels",
48 var cm = this.image.getColorModel ();
50 Clazz.defineMethod (c$, "produce",
53 this.theConsumer.setDimensions (this.image.getWidth (), this.image.getHeight ());
54 this.theConsumer.setProperties (this.properties);
56 this.theConsumer.imageComplete (2);
58 if (Clazz.exceptionOf (e, NullPointerException)) {
59 if (this.theConsumer != null) {
60 this.theConsumer.imageComplete (1);