Examples of LogicalPageBox


Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

    // For the water-mark area, this computation is different. The Watermark-area uses the known height of
    // the parent (=the page size)
    if (box instanceof WatermarkAreaBox)
    {
      final WatermarkAreaBox watermarkAreaBox = (WatermarkAreaBox) box;
      final LogicalPageBox lpb = watermarkAreaBox.getLogicalPage();
      // set the page-height as watermark size.
      return Math.max(retval, Math.max(0, lpb.getPageHeight() - insetTop - insetBottom));
    }
    return retval;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

    // For the water-mark area, this computation is different. The Watermark-area uses the known height of
    // the parent (=the page size)
    if (box.getNodeType() == LayoutNodeTypes.TYPE_BOX_WATERMARK)
    {
      final WatermarkAreaBox watermarkAreaBox = (WatermarkAreaBox) box;
      final LogicalPageBox lpb = watermarkAreaBox.getLogicalPage();
      // set the page-height as watermark size.
      return lpb.getPageHeight();
    }

    // Check the height. Set the height.
    final BoxDefinition boxDefinition = box.getBoxDefinition();
    final RenderLength preferredHeight = boxDefinition.getPreferredHeight();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

    // Copy and relocate, then prune. (I whished we could prune first, but
    // this does not work.)
    //
    // For the sake of efficiency, we do *not* create private copies for each
    // physical page. This would be an total overkill.
    final LogicalPageBox derived = (LogicalPageBox) pagebox.derive(true);

    // first, shift the normal-flow content downwards.
    // The start of the logical pagebox might be in the negative range now
    // The header-size has already been taken into account by the pagination
    // step.
    BoxShifter.shiftBoxUnchecked(derived, -pageStart + contentStart);

    // now remove all the content that will not be visible at all ..
    // not processing the header and footer area: they are 'out-of-context' bands
    processBoxChilds(derived);

    // Then add the header at the top - it starts at (0,0) and thus it is
    // ok to leave it unshifted.

    // finally, move the footer at the bottom (to the page's bottom, please!)
    final RenderBox footerArea = derived.getFooterArea();
    final long footerShift = contentEnd - footerArea.getY();
    BoxShifter.shiftBoxUnchecked(footerArea, footerShift);

    // the renderer is responsible for painting the page-header and footer ..

    derived.setPageOffset(0);
    derived.setPageEnd(contentEnd + footerArea.getY() + footerArea.getHeight());
    return derived;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

  protected final void processBlockLevelChild(final RenderNode node)
  {
    final int nodeType = node.getNodeType();
    if (nodeType == LayoutNodeTypes.TYPE_BOX_LOGICALPAGE)
    {
      final LogicalPageBox box = (LogicalPageBox) node;
      if (startBlockLevelBox(box))
      {
        startProcessing(box.getWatermarkArea());
        startProcessing(box.getHeaderArea());
        processBoxChilds(box);
        startProcessing(box.getFooterArea());
      }
      finishBlockLevelBox(box);
    }
    else if (nodeType == LayoutNodeTypes.TYPE_BOX_PARAGRAPH)
    {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

      return;
    }

//    Log.debug ("Computing Incremental update.");

    final LogicalPageBox pageBox = getPageBox();
    pageBox.setPageOffset(0);
    pageBox.setPageEnd(pageBox.getHeight());
    // shiftBox(pageBox, true);

    if (pageBox.isOpen())
    {
      final IterativeOutputProcessor io = (IterativeOutputProcessor) outputProcessor;
      if (applyAutoCommitPageHeaderStep.compute(pageBox))
      {
        io.processIterativeContent(pageBox, performOutput);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

    {
      return false;
    }

    final OutputProcessor outputProcessor = getOutputProcessor();
    final LogicalPageBox pageBox = getPageBox();

    // This is fixed: The streaming renderers always use the whole page area ..
    pageBox.setPageOffset(0);
    pageBox.setPageEnd(pageBox.getHeight());

    if (pageBox.isOpen())
    {
      // Not finished and the output target is non-iterative, so we have to wait until everything is done..
      return false;
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

    b.append(box.getBreakContext());
    logger.debug(b.toString());

    if (box instanceof LogicalPageBox)
    {
      final LogicalPageBox pageBox = (LogicalPageBox) box;
      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- PageBox={PageOffset=");
      b.append(pageBox.getPageOffset());
      b.append(", PageHeight=");
      b.append(pageBox.getPageHeight());
      b.append(", PageEnd=");
      b.append(pageBox.getPageEnd());
      b.append('}');
      logger.debug(b.toString());

      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- PageBreaks={");
      b.append(pageBox.getAllVerticalBreaks());
      b.append('}');
      logger.debug(b.toString());
    }

    if (box.isOpen())
    {
      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- WARNING: THIS BOX IS STILL OPEN");
      logger.debug(b.toString());
    }

    if (box.isFinished())
    {
      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- INFO: THIS BOX IS FINISHED");
      logger.debug(b.toString());
    }
    if (box.isCommited())
    {
      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- INFO: THIS BOX IS COMMITED");
      logger.debug(b.toString());
    }

    b = new StringBuffer();
    for (int i = 0; i < level; i++)
    {
      b.append("   ");
    }
    logger.debug(b.toString());

    if (box instanceof ParagraphRenderBox)
    {
      if (PRINT_LINEBOX_CONTENTS)
      {
        final ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
        logger.debug("----------------  START PARAGRAPH POOL CONTAINER -------------------------------------");
        printBox(paraBox.getPool(), level + 1);
        logger.debug("---------------- FINISH PARAGRAPH POOL CONTAINER -------------------------------------");

        if (paraBox.isComplexParagraph())
        {
          logger.debug("----------------  START PARAGRAPH LINEBOX CONTAINER -------------------------------------");
          printBox(paraBox.getLineboxContainer(), level + 1);
          logger.debug("---------------- FINISH PARAGRAPH LINEBOX CONTAINER -------------------------------------");
        }
      }
    }

    if (box instanceof LogicalPageBox)
    {
      final LogicalPageBox lbox = (LogicalPageBox) box;
      printBox(lbox.getHeaderArea(), level + 1);
      printBox(lbox.getWatermarkArea(), level + 1);
    }
    printChilds(box, level);
    if (box instanceof LogicalPageBox)
    {
      final LogicalPageBox lbox = (LogicalPageBox) box;
      printBox(lbox.getFooterArea(), level + 1);
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

      throw new IllegalStateException();
    }

    final SimpleStyleSheet reportStyle = sectionStyleCache.getStyleSheet(report.getStyle());
    final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(reportStyle);
    this.pageBox = new LogicalPageBox(report, reportStyle, boxDefinition);

    if (reportStyle.getBooleanStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE))
    {
      this.groupStack.push(new GroupSection(pageBox.getContentArea(), bandWithKeepTogetherStyle));
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

    writer.write(b.toString());
    writer.write("\n");

    if (box instanceof LogicalPageBox)
    {
      final LogicalPageBox pageBox = (LogicalPageBox) box;
      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- PageBox={PageOffset=");
      b.append(pageBox.getPageOffset());
      b.append(", PageHeight=");
      b.append(pageBox.getPageHeight());
      b.append(", PageEnd=");
      b.append(pageBox.getPageEnd());
      b.append('}');
      writer.write(b.toString());
      writer.write("\n");
    }

    if (box.isOpen())
    {
      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- WARNING: THIS BOX IS STILL OPEN");
      writer.write(b.toString());
      writer.write("\n");
    }

    if (box.isFinished())
    {
      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- INFO: THIS BOX IS FINISHED");
      writer.write(b.toString());
      writer.write("\n");
    }
    if (box.isCommited())
    {
      b = new StringBuffer();
      for (int i = 0; i < level; i++)
      {
        b.append("   ");
      }
      b.append("- INFO: THIS BOX IS COMMITED");
      writer.write(b.toString());
      writer.write("\n");
    }

    b = new StringBuffer();
    for (int i = 0; i < level; i++)
    {
      b.append("   ");
    }
    writer.write(b.toString());
    writer.write("\n");

    if (box instanceof ParagraphRenderBox)
    {
      if (PRINT_LINEBOX_CONTENTS)
      {
        final ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
        if (paraBox.isComplexParagraph())
        {
          writer.write("----------------  START PARAGRAPH LINEBOX CONTAINER -------------------------------------");
          writer.write("\n");
          printBox(writer, paraBox.getLineboxContainer(), level + 1);
          writer.write("---------------- FINISH PARAGRAPH LINEBOX CONTAINER -------------------------------------");
          writer.write("\n");
        }
      }
    }

    if (box instanceof LogicalPageBox)
    {
      final LogicalPageBox lbox = (LogicalPageBox) box;
      printBox(writer, lbox.getHeaderArea(), level + 1);
      printBox(writer, lbox.getWatermarkArea(), level + 1);
    }
    printChilds(writer, box, level);
    if (box instanceof LogicalPageBox)
    {
      final LogicalPageBox lbox = (LogicalPageBox) box;
      printBox(writer, lbox.getFooterArea(), level + 1);
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

    lastPageAge = System.currentTimeMillis();
  }

  protected boolean isPageFinished()
  {
    final LogicalPageBox pageBox = getPageBox();
//    final long sizeBeforePagination = pageBox.getHeight();
    //final LogicalPageBox clone = (LogicalPageBox) pageBox.deriveForAdvance(true);
    final PaginationResult pageBreak = paginationStep.performPagebreak(pageBox);
    if (pageBreak.isOverflow() || pageBox.isOpen() == false)
    {
      setLastStateKey(pageBreak.getLastVisibleState());
      return true;
    }
    return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.