Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.LocalImageContainer


      final DrawableWrapper d = (DrawableWrapper) o;
      drawDrawable(content, g2, d);
    }
    else if (o instanceof LocalImageContainer)
    {
      final LocalImageContainer imageContainer = (LocalImageContainer) o;
      final Image image = imageContainer.getImage();
      drawImage(content, image);
    }
    else if (o instanceof URLImageContainer)
    {
      final URLImageContainer imageContainer = (URLImageContainer) o;
      if (imageContainer.isLoadable() == false)
      {
        LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it was declared to be not loadable.");
        return;
      }

      final ResourceKey sourceURL = imageContainer.getResourceKey();
      if (sourceURL == null)
      {
        LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it did not return a valid URL.");
      }
View Full Code Here


    if (image instanceof LocalImageContainer)
    {
      // Check, whether the imagereference contains an AWT image.
      // if so, then we can use that image instance for the recoding
      final LocalImageContainer li = (LocalImageContainer) image;
      Image awtImage = li.getImage();
      if (awtImage == null)
      {
        if (url != null)
        {
          try
View Full Code Here

      }
    }

    if (o instanceof LocalImageContainer)
    {
      final LocalImageContainer imageContainer = (LocalImageContainer) o;
      final Image image = imageContainer.getImage();
      if (drawImage(content, image))
      {
        drawImageMap(content);
      }
    }
View Full Code Here

      // if we have an source to load the image data from ..
      if (url != null && urlImage.isLoadable())
      {
        if (reference instanceof LocalImageContainer)
        {
          final LocalImageContainer li = (LocalImageContainer) reference;
          image = li.getImage();
        }
        if (image == null)
        {
          try
          {
            final Resource resource = resourceManager.create(url, null, Image.class);
            image = (Image) resource.getResource();
          }
          catch (ResourceException e)
          {
            // ignore.
          }
        }
      }
    }

    if (reference instanceof LocalImageContainer)
    {
      // Check, whether the imagereference contains an AWT image.
      // if so, then we can use that image instance for the recoding
      final LocalImageContainer li = (LocalImageContainer) reference;
      if (image == null)
      {
        image = li.getImage();
      }
    }

    if (image != null)
    {
View Full Code Here

        if (format == -1)
        {
          // This is a unsupported image format.
          if (reference instanceof LocalImageContainer)
          {
            final LocalImageContainer li = (LocalImageContainer) reference;
            image = li.getImage();
          }
          if (image == null)
          {
            try
            {
              final Resource resource = resourceManager.create(url, null, Image.class);
              image = (Image) resource.getResource();
            }
            catch (ResourceException re)
            {
              ExcelPrinter.logger.info("Failed to load image from URL " + url, re);
            }
          }
        }
        else
        {
          try
          {
            final ResourceData data = resourceManager.load(url);
            // create the image
            return workbook.addPicture(data.getResource(resourceManager), format);
          }
          catch (ResourceException re)
          {
            ExcelPrinter.logger.info("Failed to load image from URL " + url, re);
          }

        }
      }
    }

    if (reference instanceof LocalImageContainer)
    {
      // Check, whether the imagereference contains an AWT image.
      // if so, then we can use that image instance for the recoding
      final LocalImageContainer li = (LocalImageContainer) reference;
      if (image == null)
      {
        image = li.getImage();
      }
    }

    if (image != null)
    {
View Full Code Here

      }
    }

    if (reference instanceof LocalImageContainer && image == null)
    {
      final LocalImageContainer localImageContainer =
          (LocalImageContainer) reference;
      image = localImageContainer.getImage();
      if (image != null)
      {
        // check, if the content was cached ...
        identity = localImageContainer.getIdentity();
        if (identity != null)
        {
          final Image cachedImage = (Image) cachedImages.get(identity);
          if (cachedImage != null)
          {
View Full Code Here

                                                final Object rawObject)
  {
    // Fallback: (At the moment, we only support drawables and images.)
    if (rawObject instanceof LocalImageContainer)
    {
      LocalImageContainer li = (LocalImageContainer) rawObject;
      return li.getImage();
    }
    if (rawObject instanceof URLImageContainer)
    {
      final URLImageContainer imageContainer = (URLImageContainer) rawObject;
      if (imageContainer.isLoadable() == false)
View Full Code Here

    if (image instanceof LocalImageContainer)
    {
      // Check, whether the imagereference contains an AWT image.
      // if so, then we can use that image instance for the recoding
      final LocalImageContainer li = (LocalImageContainer) image;
      Image awtImage = li.getImage();
      if (awtImage == null)
      {
        if (url != null)
        {
          try
View Full Code Here

      }
    }

    if (reference instanceof LocalImageContainer && image == null)
    {
      final LocalImageContainer localImageContainer =
          (LocalImageContainer) reference;
      image = localImageContainer.getImage();
      if (image != null)
      {
        // check, if the content was cached ...
        identity = localImageContainer.getIdentity();
        if (identity != null)
        {
          final Image cachedImage = (Image) cachedImages.get(identity);
          if (cachedImage != null)
          {
View Full Code Here

      final DrawableWrapper d = (DrawableWrapper) o;
      drawDrawable(content, g2, d);
    }
    else if (o instanceof LocalImageContainer)
    {
      final LocalImageContainer imageContainer = (LocalImageContainer) o;
      final Image image = imageContainer.getImage();
      drawImage(content, image);
    }
    else if (o instanceof URLImageContainer)
    {
      final URLImageContainer imageContainer = (URLImageContainer) o;
      if (imageContainer.isLoadable() == false)
      {
        LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it was declared to be not loadable.");
        return;
      }

      final ResourceKey sourceURL = imageContainer.getResourceKey();
      if (sourceURL == null)
      {
        LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it did not return a valid URL.");
      }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.LocalImageContainer

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.