Package java.awt.image

Examples of java.awt.image.ImageConsumer


            return;
        }

        src.lockDecoder(this);

        ImageConsumer ic = null;

        for (Iterator<ImageConsumer> i = consumers.iterator(); i.hasNext();) {
            try {
                ic = i.next();
            } catch (ConcurrentModificationException e) {
                i = consumers.iterator();
                continue;
            }
            ic.imageComplete(status);
        }
    }
View Full Code Here


        if (!checkConnection()) { // No permission for this consumer
            ic.imageComplete(ImageConsumer.IMAGEERROR);
            return;
        }

        ImageConsumer cons = findConsumer(consumers, ic);

        if (cons == null) { // Try to look in the decoders
            ImageDecoder d = null;

            // Check for all existing decoders
View Full Code Here

     * Static implementation of removeConsumer method
     * @param consumersList - list of consumers
     * @param ic - consumer to be removed
     */
    private static void removeConsumer(List<ImageConsumer> consumersList, ImageConsumer ic) {
        ImageConsumer cons = null;

        for (Iterator<ImageConsumer> i = consumersList.iterator(); i.hasNext();) {
            cons = i.next();
            if (cons.equals(ic)) {
                i.remove();
            }
        }
    }
View Full Code Here

     * @param consumersList - list of consumers
     * @param ic - consumer
     * @return consumer if found, null otherwise
     */
    private static ImageConsumer findConsumer(List<ImageConsumer> consumersList, ImageConsumer ic) {
        ImageConsumer res = null;

        for (Iterator<ImageConsumer> i = consumersList.iterator(); i.hasNext();) {
            res = i.next();
            if (res.equals(ic)) {
                return res;
            }
        }

        return null;
View Full Code Here

        if (!checkConnection()) { // No permission for this consumer
            ic.imageComplete(ImageConsumer.IMAGEERROR);
            return;
        }

        ImageConsumer cons = findConsumer(consumers, ic);

        if (cons == null) { // Try to look in the decoders
            ImageDecoder d = null;

            // Check for all existing decoders
View Full Code Here

     * Static implementation of removeConsumer method
     * @param consumersList - list of consumers
     * @param ic - consumer to be removed
     */
    private static void removeConsumer(List<ImageConsumer> consumersList, ImageConsumer ic) {
        ImageConsumer cons = null;

        for (Iterator<ImageConsumer> i = consumersList.iterator(); i.hasNext();) {
            cons = i.next();
            if (cons.equals(ic)) {
                i.remove();
            }
        }
    }
View Full Code Here

     * @param consumersList - list of consumers
     * @param ic - consumer
     * @return consumer if found, null otherwise
     */
    private static ImageConsumer findConsumer(List<ImageConsumer> consumersList, ImageConsumer ic) {
        ImageConsumer res = null;

        for (Iterator<ImageConsumer> i = consumersList.iterator(); i.hasNext();) {
            res = i.next();
            if (res.equals(ic)) {
                return res;
            }
        }

        return null;
View Full Code Here

/* 73 */     int[] pixels = new int[scansize];
/*    */
/* 75 */     Rectangle rect = new Rectangle(minX, minY, width, 1);
/*    */
/* 77 */     for (int i = 0; i < numConsumers; i++) {
/* 78 */       ImageConsumer ic = (ImageConsumer)this.consumers.elementAt(i);
/* 79 */       ic.setHints(22);
/*    */     }
/*    */
/* 84 */     for (int y = minY; y < minY + height; y++) {
/* 85 */       rect.y = y;
/* 86 */       Raster row = this.im.getData(rect);
/* 87 */       row.getPixels(minX, y, width, 1, pixels);
/*    */
/* 89 */       for (int i = 0; i < numConsumers; i++) {
/* 90 */         ImageConsumer ic = (ImageConsumer)this.consumers.elementAt(i);
/* 91 */         ic.setPixels(0, y - minY, width, 1, colorModel, pixels, 0, scansize);
/*    */       }
/*    */
/*    */     }
/*    */
/* 96 */     for (int i = 0; i < numConsumers; i++) {
/* 97 */       ImageConsumer ic = (ImageConsumer)this.consumers.elementAt(i);
/* 98 */       ic.imageComplete(3);
/*    */     }
/*    */   }
View Full Code Here

/* 339 */       m = this.size.height;
/*     */     }
/*     */
/* 343 */     Object localObject = this.consumers.elements();
/* 344 */     while (((Enumeration)localObject).hasMoreElements()) {
/* 345 */       ImageConsumer localImageConsumer = (ImageConsumer)((Enumeration)localObject).nextElement();
/* 346 */       localImageConsumer.setPixels(i, j, k, m, this.cm, this.pixels, 0, this.rowInts);
/*     */
/* 349 */       if (isConsumer(localImageConsumer))
/* 350 */         localImageConsumer.imageComplete(2);
/*     */     }
/*     */   }
View Full Code Here

/* 341 */       m = this.size.height;
/*     */     }
/*     */
/* 345 */     Object localObject = this.consumers.elements();
/* 346 */     while (((Enumeration)localObject).hasMoreElements()) {
/* 347 */       ImageConsumer localImageConsumer = (ImageConsumer)((Enumeration)localObject).nextElement();
/* 348 */       localImageConsumer.setPixels(i, j, k, m, this.cm, this.pixels, 0, this.rowInts);
/*     */
/* 351 */       if (isConsumer(localImageConsumer)) {
/* 352 */         localImageConsumer.imageComplete(2);
/*     */       }
/*     */     }
/*     */
/* 356 */     this.pixels[0] = 0;
/*     */   }
View Full Code Here

TOP

Related Classes of java.awt.image.ImageConsumer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.