@Override public boolean imageUpdate(final Image img, int infoflags, int x, int y, int w, int h) { if (infoflags == ALLBITS) { EventQueue.invokeLater(new Runnable() { public void run() { updateSize(img); } }); } return super.imageUpdate(img, infoflags, x, y, w, h); }
@Override public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) { // If FRAMEBITS is set, then new frame from a multi-frame image is ready // This indicates an animated image, which shouldn't be cached if ((flags & ImageObserver.FRAMEBITS) != 0) { animatedImages.add(img.hashCode()); } return super.imageUpdate(img, flags, x, y, w, h); }
@Override public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) { if (infoflags == ImageObserver.ALLBITS) { flush(); resize(); getParent().doLayout(); repaint(); } return super.imageUpdate(img, infoflags, x, y, w, h); }