Java Code Examples for java.awt.image.ImageConsumer#IMAGEERROR
The following examples show how to use
java.awt.image.ImageConsumer#IMAGEERROR .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImageLoader.java From pumpernickel with MIT License | 6 votes |
/** * This blocks until the image has finished loading, an error occurs, or the * operation has been cancelled. * * @return the ARGB image represented in the original ImageProducer, or * <code>null</code> if the operation was cancelled. * @throws RuntimeException * if an error occurred while loading this image */ public BufferedImage getImage() { block(); if (cancellable != null && cancellable.isCancelled()) { producer.removeConsumer(consumer); if (finished) // extremely unlikely, but just in case: return dest; return null; } if (status == ImageConsumer.IMAGEERROR) throw new RuntimeException("An error occurred."); if (status == ImageConsumer.IMAGEABORTED) throw new RuntimeException("The operation was aborted."); return dest; }
Example 2
Source File: ToolkitImage.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 3
Source File: ToolkitImage.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 4
Source File: ToolkitImage.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 5
Source File: ToolkitImage.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 6
Source File: ToolkitImage.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 7
Source File: ToolkitImage.java From hottub with GNU General Public License v2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 8
Source File: ToolkitImage.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 9
Source File: ToolkitImage.java From Bytecoder with Apache License 2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 10
Source File: ToolkitImage.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
synchronized void infoDone(int status) { if (status == ImageConsumer.IMAGEERROR || ((~availinfo) & (ImageObserver.WIDTH | ImageObserver.HEIGHT)) != 0) { addInfo(ImageObserver.ERROR); } else if ((availinfo & ImageObserver.PROPERTIES) == 0) { setProperties(null); } }
Example 11
Source File: ImageRepresentation.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 12
Source File: ImageRepresentation.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 13
Source File: ImageRepresentation.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 14
Source File: ImageRepresentation.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 15
Source File: ImageRepresentation.java From Bytecoder with Apache License 2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 16
Source File: ImageRepresentation.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 17
Source File: ImageRepresentation.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 18
Source File: ImageRepresentation.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 19
Source File: ImageRepresentation.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }
Example 20
Source File: ImageRepresentation.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public void imageComplete(int status) { if (src != null) { src.checkSecurity(null, false); } boolean done; int info; switch (status) { default: case ImageConsumer.IMAGEABORTED: done = true; info = ImageObserver.ABORT; break; case ImageConsumer.IMAGEERROR: image.addInfo(ImageObserver.ERROR); done = true; info = ImageObserver.ERROR; dispose(); break; case ImageConsumer.STATICIMAGEDONE: done = true; info = ImageObserver.ALLBITS; break; case ImageConsumer.SINGLEFRAMEDONE: done = false; info = ImageObserver.FRAMEBITS; break; } synchronized (this) { if (done) { image.getSource().removeConsumer(this); consuming = false; newbits = null; if (bimage != null) { bimage = getOpaqueRGBImage(); } } availinfo |= info; notifyAll(); } newInfo(image, info, 0, 0, width, height); image.infoDone(status); }