Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRPrintElementIndex


//        {
//          imagePath = ((JRImageRenderer)renderer).getImageLocation();
//        }
//        else
//        {
          JRPrintElementIndex imageIndex = getElementIndex(gridCell);
          imagesToProcess.add(imageIndex);

          String mimeType = JRTypeSniffer.getImageMimeType(renderer.getImageType());//FIXMEPPTX this code for file extension is duplicated
          if (mimeType == null)
          {
            mimeType = JRRenderable.MIME_TYPE_JPEG;
          }
          String extension = mimeType.substring(mimeType.lastIndexOf('/') + 1);

          String imageName = IMAGE_NAME_PREFIX + imageIndex.toString() + "." + extension;
          imagePath = imageName;
          //imagePath = "Pictures/" + imageName;
//        }

        rendererToImagePathMap.put(renderer.getId(), imagePath);
View Full Code Here


  }


  protected JRPrintElementIndex getElementIndex(JRExporterGridCell gridCell)
  {
    JRPrintElementIndex imageIndex =
      new JRPrintElementIndex(
          reportIndex,
          pageIndex,
          gridCell.getWrapper().getAddress()
          );
    return imageIndex;
View Full Code Here

      if ((imagesToProcess != null && imagesToProcess.size() > 0))
      {
        for(Iterator it = imagesToProcess.iterator(); it.hasNext();)
        {
          JRPrintElementIndex imageIndex = (JRPrintElementIndex)it.next();

          JRPrintImage image = getImage(jasperPrintList, imageIndex);
          JRRenderable renderer = image.getRenderer();
          if (renderer.getType() == JRRenderable.TYPE_SVG)
          {
            renderer =
              new JRWrappingSvgRenderer(
                renderer,
                new Dimension(image.getWidth(), image.getHeight()),
                ModeEnum.OPAQUE == image.getModeValue() ? image.getBackcolor() : null
                );
          }

          String mimeType = JRTypeSniffer.getImageMimeType(renderer.getImageType());
          if (mimeType == null)
          {
            mimeType = JRRenderable.MIME_TYPE_JPEG;
          }
          String extension = mimeType.substring(mimeType.lastIndexOf('/') + 1);
         
          String imageName = IMAGE_NAME_PREFIX + imageIndex.toString() + "." + extension;
         
          xlsxZip.addEntry(//FIXMEDOCX optimize with a different implementation of entry
            new FileBufferedZipEntry(
              "xl/media/" + imageName,
              renderer.getImageData()
View Full Code Here

    if ((imagesToProcess != null && imagesToProcess.size() > 0))
    {
      for(Iterator it = imagesToProcess.iterator(); it.hasNext();)
      {
        JRPrintElementIndex imageIndex = (JRPrintElementIndex)it.next();

        JRPrintImage image = getImage(jasperPrintList, imageIndex);
        JRRenderable renderer = image.getRenderer();
        if (renderer.getType() == JRRenderable.TYPE_SVG)
        {
View Full Code Here

        {
          imagePath = ((JRImageRenderer)renderer).getImageLocation();
        }
        else
        {
          JRPrintElementIndex imageIndex = getElementIndex(gridCell);
          imagesToProcess.add(imageIndex);

          String imageName = getImageName(imageIndex);
          imagePath = "Pictures/" + imageName;
        }
View Full Code Here

  }


  protected JRPrintElementIndex getElementIndex(JRExporterGridCell gridCell)
  {
    JRPrintElementIndex imageIndex =
      new JRPrintElementIndex(
          reportIndex,
          pageIndex,
          gridCell.getWrapper().getAddress()
          );
    return imageIndex;
View Full Code Here

    }

    try
    {
      JRGridLayout layout = gridCell.getLayout();
      JRPrintElementIndex frameIndex =
        new JRPrintElementIndex(
            reportIndex,
            pageIndex,
            gridCell.getWrapper().getAddress()
            );
      exportGrid(layout, frameIndex);
View Full Code Here

    if ((imagesToProcess != null && imagesToProcess.size() > 0))
    {
      for(Iterator it = imagesToProcess.iterator(); it.hasNext();)
      {
        JRPrintElementIndex imageIndex = (JRPrintElementIndex)it.next();

        JRPrintImage image = getImage(jasperPrintList, imageIndex);
        JRRenderable renderer = image.getRenderer();
        if (renderer.getType() == JRRenderable.TYPE_SVG)
        {
          renderer =
            new JRWrappingSvgRenderer(
              renderer,
              new Dimension(image.getWidth(), image.getHeight()),
              ModeEnum.OPAQUE == image.getModeValue() ? image.getBackcolor() : null
              );
        }

        String mimeType = JRTypeSniffer.getImageMimeType(renderer.getImageType());
        if (mimeType == null)
        {
          mimeType = JRRenderable.MIME_TYPE_JPEG;
        }
        String extension = mimeType.substring(mimeType.lastIndexOf('/') + 1);
       
        String imageName = IMAGE_NAME_PREFIX + imageIndex.toString() + "." + extension;
       
        pptxZip.addEntry(//FIXMEPPTX optimize with a different implementation of entry
          new FileBufferedZipEntry(
            "ppt/media/" + imageName,
            renderer.getImageData()
View Full Code Here

//        {
//          imagePath = ((JRImageRenderer)renderer).getImageLocation();
//        }
//        else
//        {
          JRPrintElementIndex imageIndex = getElementIndex();
          imagesToProcess.add(imageIndex);

          String mimeType = JRTypeSniffer.getImageMimeType(renderer.getImageType());//FIXMEPPTX this code for file extension is duplicated
          if (mimeType == null)
          {
            mimeType = JRRenderable.MIME_TYPE_JPEG;
          }
          String extension = mimeType.substring(mimeType.lastIndexOf('/') + 1);

          String imageName = IMAGE_NAME_PREFIX + imageIndex.toString() + "." + extension;
          imagePath = imageName;
          //imagePath = "Pictures/" + imageName;
//        }

        rendererToImagePathMap.put(renderer.getId(), imagePath);
View Full Code Here

      Integer frameIndex = (Integer)frameIndexStack.get(i);

      sbuffer.append(frameIndex).append("_");
    }
   
    JRPrintElementIndex imageIndex =
      new JRPrintElementIndex(
          reportIndex,
          pageIndex,
          sbuffer.append(elementIndex).toString()
          );
    return imageIndex;
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JRPrintElementIndex

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.