Examples of LogicalPageBox


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

//      Log.debug ("No incremental system.");
      return;
    }


    final LogicalPageBox pageBox = getPageBox();
    pageBox.setPageEnd(pageBox.getHeight());
//    Log.debug ("Computing Incremental update: " + pageBox.getPageOffset() + " " + pageBox.getPageEnd());
    // 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

                                      final boolean performOutput)
      throws ContentProcessingException
  {
    final OutputProcessor outputProcessor = getOutputProcessor();
    // next: perform pagination.
    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());
//      final long sizeAfterPagination = pageBox.getHeight();
      setPagebreaks(getPagebreaks() + 1);
      pageBox.setAllVerticalBreaks(pageBreak.getAllBreaks());

      flowCount += 1;
      debugPrint(pageBox);

      // A new page has been started. Recover the page-grid, then restart
      // everything from scratch. (We have to recompute, as the pages may
      // be different now, due to changed margins or page definitions)
      final long nextOffset = pageBox.computePageEnd();
      pageBox.setPageEnd(nextOffset);
      final long pageOffset = pageBox.getPageOffset();

      if (performOutput)
      {
        if (outputProcessor.isNeedAlignedPage())
        {
          final LogicalPageBox box = fillPhysicalPagesStep.compute(pageBox, pageOffset, nextOffset);
//          DebugLog.log("Processing contents for Page " + flowCount + " Page-Offset: " + pageOffset + " -> " + nextOffset);

          outputProcessor.processContent(box);
        }
        else
View Full Code Here

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

  }

  public boolean isCurrentPageEmpty()
  {
    // todo: Invent a test that checks whether the page is currently empty.
    final LogicalPageBox logicalPageBox = getPageBox();
    final PageBreakPositionList breakPositionList = logicalPageBox.getAllVerticalBreaks();
    final long masterBreak = breakPositionList.getLastMasterBreak();
    final boolean nextPageContainsContent = (logicalPageBox.getHeight() > masterBreak);
    return nextPageContainsContent == false;
  }
View Full Code Here

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

    MasterReport masterReport = new MasterReport();
    SubReport element = new SubReport();
    masterReport.getReportHeader().addSubReport(element);

    ReportLayouter l = new ReportLayouter(new ReportRenderContext(masterReport));
    LogicalPageBox layout = l.layout();
    ModelPrinter.INSTANCE.print(layout);

    MatchFactory.findElementsByAttribute
        (layout, AttributeNames.Core.NAMESPACE, AttributeNames.Core.ELEMENT_TYPE, element.getElementType());
  }
View Full Code Here

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

    final Resource resource = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) resource.getResource();

    final ReportLayouter l = new ReportLayouter
        (new ReportRenderContext(report, report, null, new GlobalAuthenticationStore()));
    final LogicalPageBox layout = l.layout();
  //  ModelPrinter.print(layout);

  }
View Full Code Here

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

    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    ReportRenderContext rcontext = new ReportRenderContext(report, report, null, new GlobalAuthenticationStore());
    final ReportLayouter layouter = new ReportLayouter(rcontext);
    final LogicalPageBox logicalPageBox = layouter.layout();

    assertEquals(2000000, logicalPageBox.getHeight());
  }
View Full Code Here

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

  public void actionPerformed(final ActionEvent e)
  {
    try
    {
      final LogicalPageBox layout = getActiveContext().getSharedRenderer().getLayouter().layout();
      ModelPrinter.INSTANCE.print(layout);
    }
    catch (Exception ex)
    {
      UncaughtExceptionsModel.getInstance().addException(ex);
View Full Code Here

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

    }
  }

  private void refreshLayoutFromSharedRenderer()
  {
    final LogicalPageBox pageBox = sharedRenderer.getPageBox();
    if (pageBox == null)
    {
      computedBounds = sharedRenderer.getFallbackBounds();
      return;
    }

    elementsById.clear();
    sharedRenderer.transferLocalLayout(getElement(), elementsById, verticalEdgePositions);
    final OutputProcessorMetaData outputProcessorMetaData = sharedRenderer.getLayouter().getOutputProcessorMetaData();

    logicalPageDrawable = new DesignerPageDrawable(pageBox, outputProcessorMetaData, resourceManager, element);
    final StrictBounds bounds = logicalPageDrawable.getRootElementBounds();
    computedBounds = StrictGeomUtility.createAWTRectangle(0, bounds.getY(), pageBox.getWidth(), bounds.getHeight());
    if (getVisualHeight() < computedBounds.getHeight())
    {
      setVisualHeight(computedBounds.getHeight());
    }
  }
View Full Code Here

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

   * @return the layout result.
   * @throws ContentProcessingException
   */
  public LayoutResult validatePages() throws ContentProcessingException
  {
    final LogicalPageBox pageBox = getPageBox();
    if (pageBox == null)
    {
      return LayoutResult.LAYOUT_UNVALIDATABLE;
    }

    if (pageBox.isOpen())
    {
      return LayoutResult.LAYOUT_UNVALIDATABLE;
    }

    return super.validatePages();
View Full Code Here

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

    final Resource resource = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) resource.getResource();

    final ReportLayouter l = new ReportLayouter
        (new ReportRenderContext(report, report, null, new GlobalAuthenticationStore()));
    final LogicalPageBox layout = l.layout();

    ModelPrinter.INSTANCE.print(layout);
    assertNotNull(MatchFactory.findElementsByElementType(layout, ItemBandType.INSTANCE));
    assertNotNull(MatchFactory.findElementsByElementType(layout, SubReportType.INSTANCE));
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.