当前位置: 首页>>代码示例>>Java>>正文


Java ImageObserver.ERROR属性代码示例

本文整理汇总了Java中java.awt.image.ImageObserver.ERROR属性的典型用法代码示例。如果您正苦于以下问题:Java ImageObserver.ERROR属性的具体用法?Java ImageObserver.ERROR怎么用?Java ImageObserver.ERROR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.awt.image.ImageObserver的用法示例。


在下文中一共展示了ImageObserver.ERROR属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepare

public boolean prepare(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);
    if (!done) {
        addWatcher(iw);
        startProduction();
        // Some producers deliver image data synchronously
        done = ((availinfo & ImageObserver.ALLBITS) != 0);
    }
    return done;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:ImageRepresentation.java

示例2: waitFor

public synchronized boolean waitFor()
{
  Toolkit tk = Toolkit.getDefaultToolkit();

  _status |= tk.checkImage(_image, -1, -1, this);

  while ((_status &
          (ImageObserver.ALLBITS   |
           ImageObserver.FRAMEBITS |
           ImageObserver.ERROR     |
           ImageObserver.ABORT)) == 0)
  {
    try
    {
      wait();
    }
    catch (InterruptedException e)
    {
      Thread.currentThread().interrupt();
      return false;
    }
  }

  return ((_status & (ImageObserver.ALLBITS |
                      ImageObserver.FRAMEBITS)) != 0);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:26,代码来源:ImageLoader.java

示例3: abort

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);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:17,代码来源:ImageRepresentation.java

示例4: reconstruct

private synchronized void reconstruct(int flags) {
    if ((flags & ~availinfo) != 0) {
        if ((availinfo & ImageObserver.ERROR) != 0) {
            return;
        }
        ImageRepresentation ir = getImageRep();
        ir.startProduction();
        while ((flags & ~availinfo) != 0) {
            try {
                wait();
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                return;
            }
            if ((availinfo & ImageObserver.ERROR) != 0) {
                return;
            }
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:ToolkitImage.java

示例5: reconstruct

public synchronized void reconstruct(int flags) {
    if (src != null) {
        src.checkSecurity(null, false);
    }
    int missinginfo = flags & ~availinfo;
    if ((availinfo & ImageObserver.ERROR) == 0 && missinginfo != 0) {
        numWaiters++;
        try {
            startProduction();
            missinginfo = flags & ~availinfo;
            while ((availinfo & ImageObserver.ERROR) == 0 &&
                   missinginfo != 0)
            {
                try {
                    wait();
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
                    return;
                }
                missinginfo = flags & ~availinfo;
            }
        } finally {
            decrementWaiters();
        }
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:26,代码来源:ImageRepresentation.java

示例6: flush

public void flush() {
    if (src != null) {
        src.checkSecurity(null, false);
    }

    ImageRepresentation ir;
    synchronized (this) {
        availinfo &= ~ImageObserver.ERROR;
        ir = imagerep;
        imagerep = null;
    }
    if (ir != null) {
        ir.abort();
    }
    if (src != null) {
        src.flush();
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:18,代码来源:ToolkitImage.java

示例7: check

public int check(ImageObserver iw) {

        if (src != null) {
            src.checkSecurity(null, false);
        }
        if ((availinfo & (ImageObserver.ERROR | ImageObserver.ALLBITS)) == 0) {
            addWatcher(iw);
        }

        return availinfo;
    }
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:11,代码来源:ImageRepresentation.java

示例8: check

public int check(ImageObserver iw) {
    if (src != null) {
        src.checkSecurity(null, false);
    }
    if ((availinfo & ImageObserver.ERROR) == 0 &&
        ((~availinfo) & (ImageObserver.WIDTH |
                         ImageObserver.HEIGHT |
                         ImageObserver.PROPERTIES)) != 0) {
        addWatcher(iw, false);
    }
    return availinfo;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ToolkitImage.java

示例9: drawToBufImage

public boolean drawToBufImage(Graphics g, ToolkitImage img,
                              AffineTransform xform,
                              ImageObserver iw)
{
    Graphics2D g2 = (Graphics2D) g;

    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))) {
        g2.drawImage (bimage, xform, null);
    }

    return done;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:32,代码来源:ImageRepresentation.java

示例10: drawToBufImage

public boolean drawToBufImage(Graphics g, ToolkitImage img,
                              int dx1, int dy1, int dx2, int dy2,
                              int sx1, int sy1, int sx2, int sy2,
                              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,
                     dx1, dy1, dx2, dy2,
                     sx1, sy1, sx2, sy2,
                     bg, null);
    }

    return done;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:34,代码来源:ImageRepresentation.java

示例11: drawToBufImage

public boolean drawToBufImage(Graphics g, ToolkitImage img,
                              int x, int y, 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, bg, null);
    }

    return done;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:ImageRepresentation.java

示例12: imageComplete

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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:45,代码来源:ImageRepresentation.java


注:本文中的java.awt.image.ImageObserver.ERROR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。