1 Clazz.declarePackage ("java.awt");
2 Clazz.load (null, "java.awt.GraphicsConfiguration", ["java.lang.IllegalArgumentException", "java.awt.AWTException", "java.awt.image.BufferedImage", "jssun.awt.image.SunVolatileImage"], function () {
3 c$ = Clazz.declareType (java.awt, "GraphicsConfiguration");
4 Clazz.makeConstructor (c$,
7 Clazz.defineMethod (c$, "createCompatibleImage",
8 function (width, height, transparency) {
9 if (this.getColorModel ().getTransparency () == transparency) {
10 return this.createCompatibleImage (width, height);
11 }var cm = this.getColorModel (transparency);
13 throw new IllegalArgumentException ("Unknown transparency: " + transparency);
14 }var wr = cm.createCompatibleWritableRaster (width, height);
15 return new java.awt.image.BufferedImage (cm, wr, cm.isAlphaPremultiplied (), null);
17 Clazz.defineMethod (c$, "createCompatibleVolatileImage",
18 function (width, height) {
21 vi = this.createCompatibleVolatileImage (width, height, null, 1);
23 if (Clazz.exceptionOf (e, java.awt.AWTException)) {
30 Clazz.defineMethod (c$, "createCompatibleVolatileImage",
31 function (width, height, transparency) {
34 vi = this.createCompatibleVolatileImage (width, height, null, transparency);
36 if (Clazz.exceptionOf (e, java.awt.AWTException)) {
43 Clazz.defineMethod (c$, "createCompatibleVolatileImage",
44 function (width, height, caps, transparency) {
45 var vi = new jssun.awt.image.SunVolatileImage (this, width, height, transparency, caps);
46 if (caps != null && caps.isAccelerated () && !vi.getCapabilities ().isAccelerated ()) {
47 throw new java.awt.AWTException ("Supplied image capabilities could not be met by this graphics configuration.");
49 }, "~N,~N,java.awt.ImageCapabilities,~N");
50 Clazz.defineMethod (c$, "isTranslucencyCapable",