Java Code Examples for java.awt.image.ImageObserver#ALLBITS
The following examples show how to use
java.awt.image.ImageObserver#ALLBITS .
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: LUTCompareTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public boolean imageUpdate(Image image, int info, int x, int y, int w, int h) { if (image == this.image) { System.out.println("Image status: " + dump(info)); synchronized(this) { isReady = (info & ImageObserver.ALLBITS) != 0; if (isReady) { synchronized(lock) { lock.notifyAll(); } } } return !isReady; } else { return true; } }
Example 2
Source File: LUTCompareTest.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public boolean imageUpdate(Image image, int info, int x, int y, int w, int h) { if (image == this.image) { System.out.println("Image status: " + dump(info)); synchronized(this) { isReady = (info & ImageObserver.ALLBITS) != 0; if (isReady) { synchronized(lock) { lock.notifyAll(); } } } return !isReady; } else { return true; } }
Example 3
Source File: ImageRepresentation.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
synchronized void abort() { image.getSource().removeConsumer(this); consuming = false; newbits = null; bimage = null; biRaster = null; cmodel = null; srcLUT = null; isDefaultBI = false; isSameCM = false; newInfo(image, ImageObserver.ABORT, -1, -1, -1, -1); availinfo &= ~(ImageObserver.SOMEBITS | ImageObserver.FRAMEBITS | ImageObserver.ALLBITS | ImageObserver.ERROR); }
Example 4
Source File: LUTCompareTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public boolean imageUpdate(Image image, int info, int x, int y, int w, int h) { if (image == this.image) { System.out.println("Image status: " + dump(info)); synchronized(this) { isReady = (info & ImageObserver.ALLBITS) != 0; if (isReady) { synchronized(lock) { lock.notifyAll(); } } } return !isReady; } else { return true; } }
Example 5
Source File: LUTCompareTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public boolean imageUpdate(Image image, int info, int x, int y, int w, int h) { if (image == this.image) { System.out.println("Image status: " + dump(info)); synchronized(this) { isReady = (info & ImageObserver.ALLBITS) != 0; if (isReady) { synchronized(lock) { lock.notifyAll(); } } } return !isReady; } else { return true; } }
Example 6
Source File: ImageRepresentation.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
synchronized void abort() { image.getSource().removeConsumer(this); consuming = false; newbits = null; bimage = null; biRaster = null; cmodel = null; srcLUT = null; isDefaultBI = false; isSameCM = false; newInfo(image, ImageObserver.ABORT, -1, -1, -1, -1); availinfo &= ~(ImageObserver.SOMEBITS | ImageObserver.FRAMEBITS | ImageObserver.ALLBITS | ImageObserver.ERROR); }
Example 7
Source File: ImageRepresentation.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
synchronized void abort() { image.getSource().removeConsumer(this); consuming = false; newbits = null; bimage = null; biRaster = null; cmodel = null; srcLUT = null; isDefaultBI = false; isSameCM = false; newInfo(image, ImageObserver.ABORT, -1, -1, -1, -1); availinfo &= ~(ImageObserver.SOMEBITS | ImageObserver.FRAMEBITS | ImageObserver.ALLBITS | ImageObserver.ERROR); }
Example 8
Source File: ImageRepresentation.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
synchronized void abort() { image.getSource().removeConsumer(this); consuming = false; newbits = null; bimage = null; biRaster = null; cmodel = null; srcLUT = null; isDefaultBI = false; isSameCM = false; newInfo(image, ImageObserver.ABORT, -1, -1, -1, -1); availinfo &= ~(ImageObserver.SOMEBITS | ImageObserver.FRAMEBITS | ImageObserver.ALLBITS | ImageObserver.ERROR); }
Example 9
Source File: ToolkitImage.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void preload(ImageObserver iw) { if (src != null) { src.checkSecurity(null, false); } if ((availinfo & ImageObserver.ALLBITS) == 0) { addWatcher(iw, true); } }
Example 10
Source File: SunToolkit.java From Bytecoder with Apache License 2.0 | 5 votes |
@Override public int checkImage(Image img, int w, int h, ImageObserver o) { if (!(img instanceof ToolkitImage)) { return ImageObserver.ALLBITS; } ToolkitImage tkimg = (ToolkitImage)img; int repbits; if (w == 0 || h == 0) { repbits = ImageObserver.ALLBITS; } else { repbits = tkimg.getImageRep().check(o); } return (tkimg.check(o) | repbits) & checkResolutionVariant(img, w, h, o); }
Example 11
Source File: ImageRepresentation.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public int check(ImageObserver iw) { if (src != null) { src.checkSecurity(null, false); } if ((availinfo & (ImageObserver.ERROR | ImageObserver.ALLBITS)) == 0) { addWatcher(iw); } return availinfo; }
Example 12
Source File: ImageRepresentation.java From Bytecoder with Apache License 2.0 | 5 votes |
private synchronized void checkConsumption() { if (isWatcherListEmpty() && numWaiters == 0 && ((availinfo & ImageObserver.ALLBITS) == 0)) { dispose(); } }
Example 13
Source File: ImageRepresentation.java From Bytecoder with Apache License 2.0 | 5 votes |
public boolean drawToBufImage(Graphics g, ToolkitImage img, int x, int y, int w, int h, Color bg, ImageObserver iw) { if (src != null) { src.checkSecurity(null, false); } if ((availinfo & ImageObserver.ERROR) != 0) { if (iw != null) { iw.imageUpdate(image, ImageObserver.ERROR|ImageObserver.ABORT, -1, -1, -1, -1); } return false; } boolean done = ((availinfo & ImageObserver.ALLBITS) != 0); boolean abort = ((availinfo & ImageObserver.ABORT) != 0); if (!done && !abort) { addWatcher(iw); startProduction(); // Some producers deliver image data synchronously done = ((availinfo & ImageObserver.ALLBITS) != 0); } if (done || (0 != (availinfo & ImageObserver.FRAMEBITS))) { g.drawImage (bimage, x, y, w, h, bg, null); } return done; }
Example 14
Source File: ToolkitImage.java From Bytecoder with Apache License 2.0 | 5 votes |
public void preload(ImageObserver iw) { if (src != null) { src.checkSecurity(null, false); } if ((availinfo & ImageObserver.ALLBITS) == 0) { addWatcher(iw, true); } }
Example 15
Source File: ImageRepresentation.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private synchronized void checkConsumption() { if (isWatcherListEmpty() && numWaiters == 0 && ((availinfo & ImageObserver.ALLBITS) == 0)) { dispose(); } }
Example 16
Source File: ImageRepresentation.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public boolean drawToBufImage(Graphics g, ToolkitImage img, int x, int y, int w, int h, Color bg, ImageObserver iw) { if (src != null) { src.checkSecurity(null, false); } if ((availinfo & ImageObserver.ERROR) != 0) { if (iw != null) { iw.imageUpdate(image, ImageObserver.ERROR|ImageObserver.ABORT, -1, -1, -1, -1); } return false; } boolean done = ((availinfo & ImageObserver.ALLBITS) != 0); boolean abort = ((availinfo & ImageObserver.ABORT) != 0); if (!done && !abort) { addWatcher(iw); startProduction(); // Some producers deliver image data synchronously done = ((availinfo & ImageObserver.ALLBITS) != 0); } if (done || (0 != (availinfo & ImageObserver.FRAMEBITS))) { g.drawImage (bimage, x, y, w, h, bg, null); } return done; }
Example 17
Source File: ImageRepresentation.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public int check(ImageObserver iw) { if (src != null) { src.checkSecurity(null, false); } if ((availinfo & (ImageObserver.ERROR | ImageObserver.ALLBITS)) == 0) { addWatcher(iw); } return availinfo; }
Example 18
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 19
Source File: MultiResolutionCachedImage.java From hottub with GNU General Public License v2.0 | 4 votes |
private void updateInfo(ImageObserver observer, int info) { availableInfo |= (observer == null) ? ImageObserver.ALLBITS : info; }
Example 20
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); }