Package org.pentaho.reporting.libraries.base.util

Examples of org.pentaho.reporting.libraries.base.util.WaitingImageObserver


        logger.debug("Failed to render the image. This should not happen for BufferedImages")// NON-NLS
      }
    }
    else
    {
      final WaitingImageObserver obs = new WaitingImageObserver(image);
      obs.waitImageLoaded();

      while (graphics.drawImage(image, null, obs) == false)
      {
        obs.waitImageLoaded();
        if (obs.isError())
        {
          logger.warn("Error while loading the image during the rendering.")// NON-NLS
          break;
        }
      }
View Full Code Here


    {
      PdfLogicalPageDrawable.logger.debug("Error: Image area is empty: " + content);
      return false;
    }

    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();
    final int imageWidth = image.getWidth(obs);
    final int imageHeight = image.getHeight(obs);
    if (imageWidth < 1 || imageHeight < 1)
    {
      return false;
View Full Code Here

  }


  public void draw(final Graphics2D graphics2D, final Rectangle2D bounds)
  {
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();

    graphics2D.drawImage(image, 0, 0, image.getWidth(null), image.getHeight(null), null);
  }
View Full Code Here

    return true;
  }

  public Dimension getPreferredSize()
  {
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();

    return new Dimension(image.getWidth(null), image.getHeight(null));
  }
View Full Code Here

                                 final String mimeType,
                                 final float quality,
                                 final boolean alpha)
      throws UnsupportedEncoderException, IOException
  {
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();

    final ImageEncoder imageEncoder = ImageEncoderRegistry.getInstance().createEncoder(mimeType);
    if (imageEncoder == null)
    {
      throw new UnsupportedEncoderException("The encoder for mime-type '" + mimeType + "' is not available");
View Full Code Here

          logger.debug("Failed to scale the image. This should not happen.");
        }
      }
      else
      {
        final WaitingImageObserver obs = new WaitingImageObserver(ret);
        while (g2.drawImage(ret, 0, 0, w, h, null) == false)
        {
          obs.waitImageLoaded();
          if (obs.isError())
          {
            logger.warn("Error while loading the image during the rendering.");
            break;
          }
        }
View Full Code Here

    }

    private OfficeImage produceFromImage(final Image image)
    {
        // quick caching ... use a weak list ...
        final WaitingImageObserver obs = new WaitingImageObserver(image);
        obs.waitImageLoaded();

        final PngEncoder encoder = new PngEncoder(image, PngEncoder.ENCODE_ALPHA, PngEncoder.FILTER_NONE, 5);
        final byte[] data = encoder.pngEncode();
        return produceFromByteArray(data);
    }
View Full Code Here

    if (img == null)
    {
      throw new NullPointerException();
    }
    this.image = img;
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();
    if (obs.isError())
    {
      throw new IOException("Failed to load the image. ImageObserver signaled an error.");
    }
    this.width = image.getWidth(null);
    this.height = image.getHeight(null);
View Full Code Here

    {
      this.url = (URL) identifier;
    }
    this.resourceKey = resKey;
    this.image = (Image) o;
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();
    if (obs.isError())
    {
      throw new ResourceException("Failed to load the image. ImageObserver signaled an error.");
    }
    this.width = image.getWidth(null);
    this.height = image.getHeight(null);
View Full Code Here

    showOnStartupCheckbox.addActionListener(new TriggerShowWelcomePaneAction());

    backgroundImage = Toolkit.getDefaultToolkit().createImage
        (IconLoader.class.getResource("/org/pentaho/reporting/designer/core/icons/WelcomeBackground.png"));// NON-NLS

    final WaitingImageObserver obs = new WaitingImageObserver(backgroundImage);
    obs.waitImageLoaded();

    setResizable(false);

    initGUI();
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.util.WaitingImageObserver

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.