Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRPrintFrame


  /**
   *
   */
  private void addHorizontalGridLine(int x, int y, int width)
  {
    JRPrintFrame printFrame = new JRBasePrintFrame(getDefaultStyleProvider());
    printFrame.setX(x);
    printFrame.setY(y);
    printFrame.setWidth(width);
    printFrame.setHeight(1);
    printFrame.getLineBox().getPen().setLineWidth(0);
    printFrame.getLineBox().getPen().setLineStyle(LineStyleEnum.SOLID);
    printFrame.getLineBox().getTopPen().setLineWidth(0.1f);
    printFrame.getLineBox().getTopPen().setLineStyle(LineStyleEnum.DASHED);
    printFrame.getLineBox().getTopPen().setLineColor(GRID_LINE_COLOR);
    pageElements.add(0, printFrame);
  }
View Full Code Here


  /**
   *
   */
  private void addVerticalGridLine(int x, int y, int height)
  {
    JRPrintFrame printFrame = new JRBasePrintFrame(getDefaultStyleProvider());
    printFrame.setX(x);
    printFrame.setY(y);
    printFrame.setWidth(1);
    printFrame.setHeight(height);
    printFrame.getLineBox().getPen().setLineWidth(0);
    printFrame.getLineBox().getPen().setLineStyle(LineStyleEnum.SOLID);
    printFrame.getLineBox().getLeftPen().setLineWidth(0.1f);
    printFrame.getLineBox().getLeftPen().setLineStyle(LineStyleEnum.DASHED);
    printFrame.getLineBox().getLeftPen().setLineColor(GRID_LINE_COLOR);
    pageElements.add(0, printFrame);
  }
View Full Code Here

          linksMap.put(link, element);
        }

        if (element instanceof JRPrintFrame)
        {
          JRPrintFrame frame = (JRPrintFrame) element;
          int frameOffsetX = offsetX + frame.getX() + frame.getLineBox().getLeftPadding().intValue();
          int frameOffsetY = offsetY + frame.getY() + frame.getLineBox().getTopPadding().intValue();
          createHyperlinks(frame.getElements(), frameOffsetX, frameOffsetY);
        }
      }
    }
  }
View Full Code Here

  {
    if (isTagged)
    {
      if (element instanceof JRPrintFrame)
      {
        JRPrintFrame frame = (JRPrintFrame) element;
       
        boolean isCellContentsFrame =
          frame.getPropertiesMap().hasProperties()
          && frame.getPropertiesMap().getProperty(JRCellContents.PROPERTY_TYPE) != null;
       
        if (crtCrosstabRowY >= 0) //crosstab already started
        {
          //frame depth must be incremented for all frame, when inside a crosstab
          crosstabFrameDepth++;

          if (isCellContentsFrame)
          {
            if (JRCellContents.TYPE_DATA.equals(frame.getPropertiesMap().getProperty(JRCellContents.PROPERTY_TYPE)))
            {
              isDataCellPrinted = true;
            }

            if (crtCrosstabRowY != frame.getY())
            {
              //this is the first cell on a new row

              //end the current row
              pdfContentByte.endMarkedContentSequence();
              tagStack.pop();
             
              if (
                isDataCellPrinted
                && (JRCellContents.TYPE_CROSSTAB_HEADER.equals(frame.getPropertiesMap().getProperty(JRCellContents.PROPERTY_TYPE))
                  || JRCellContents.TYPE_COLUMN_HEADER.equals(frame.getPropertiesMap().getProperty(JRCellContents.PROPERTY_TYPE)))
                )
              {
                //end the table
                pdfContentByte.endMarkedContentSequence();
                tagStack.pop();

                //start table
                createTableStartTag();
                //start crosstab
                isDataCellPrinted = false;
              }

              //start the new row
              createTrStartTag();

              //keep crosstab open, but mark new row position and frame depth
              crtCrosstabRowY = frame.getY();
            }
          }
          else
          {
            if (crosstabFrameDepth == 1)
            {
              //normal frame outside crosstab
             
              //end the current row
              pdfContentByte.endMarkedContentSequence();
              tagStack.pop();
             
              //end the table
              pdfContentByte.endMarkedContentSequence();
              tagStack.pop();
             
              //end crosstab
              crtCrosstabRowY = -1;
              //make depth zero because it will not be decremented after frame export
              // due to crosstab being ended here
              crosstabFrameDepth = 0;
            }
          }
        }
        else
        {
          if (isCellContentsFrame)
          {
            //start table and firts row
            createTableStartTag();
            createTrStartTag();
            //start crosstab
            crtCrosstabRowY = frame.getY();
            crosstabFrameDepth++;
            isDataCellPrinted = false;
          }
//          else
//          {
View Full Code Here

      {
        exportText((JRPrintText) element);
      }
      else if (element instanceof JRPrintFrame)
      {
        JRPrintFrame frame = (JRPrintFrame) element;
        setFrameElementsOffset(frame, false);
        try
        {
          exportElements(frame.getElements());
        }
        finally
        {
          restoreElementOffsets();
        }
View Full Code Here

    Integer[] elementIndexes = imageIndex.getAddressArray();
    Object element = page.getElements().get(elementIndexes[0].intValue());

    for (int i = 1; i < elementIndexes.length; ++i)
    {
      JRPrintFrame frame = (JRPrintFrame) element;
      element = frame.getElements().get(elementIndexes[i].intValue());
    }

    return (JRPrintImage) element;
  }
View Full Code Here

    Integer[] elementIndexes = imageIndex.getAddressArray();
    Object element = page.getElements().get(elementIndexes[0].intValue());

    for (int i = 1; i < elementIndexes.length; ++i)
    {
      JRPrintFrame frame = (JRPrintFrame) element;
      element = frame.getElements().get(elementIndexes[i].intValue());
    }

    return (JRPrintImage) element;
  }
View Full Code Here

    Integer[] elementIndexes = imageIndex.getAddressArray();
    Object element = page.getElements().get(elementIndexes[0].intValue());

    for (int i = 1; i < elementIndexes.length; ++i)
    {
      JRPrintFrame frame = (JRPrintFrame) element;
      element = frame.getElements().get(elementIndexes[i].intValue());
    }

    return (JRPrintImage) element;
  }
View Full Code Here

    Integer[] elementIndexes = imageIndex.getAddressArray();
    Object element = page.getElements().get(elementIndexes[0].intValue());

    for (int i = 1; i < elementIndexes.length; ++i)
    {
      JRPrintFrame frame = (JRPrintFrame) element;
      element = frame.getElements().get(elementIndexes[i].intValue());
    }

    return (JRPrintImage) element;
  }
View Full Code Here

      JRPrintElement element = (JRPrintElement) it.next();
      deepElements.add(element);
     
      if (element instanceof JRPrintFrame)
      {
        JRPrintFrame frame = (JRPrintFrame) element;
        collectDeepElements(frame.getElements(), deepElements);
      }
    }
  }
View Full Code Here

TOP

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

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.