Examples of PaginationResult


Examples of org.pentaho.reporting.engine.classic.core.layout.process.util.PaginationResult

    // next: perform pagination.
    final LogicalPageBox pageBox = getPageBox();

    //    final long sizeBeforePagination = pageBox.getHeight();
//    final LogicalPageBox clone = (LogicalPageBox) pageBox.derive(true);
    final PaginationResult pageBreak = paginationStep.performPagebreak(pageBox);
    if (pageBox.isOpen() && pageBreak.isOverflow() == false)
    {
      return false;
    }

    setLastStateKey(pageBreak.getLastVisibleState());
    setPagebreaks(getPagebreaks() + 1);
    pageBox.setAllVerticalBreaks(pageBreak.getAllBreaks());

    pageCount += 1;

//      DebugLog.log("1: **** Start Printing Page: " + pageCount);
    debugPrint(pageBox);
//      DebugLog.log("PaginationResult: " + pageBreak);

    // 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 OutputProcessor outputProcessor = getOutputProcessor();
    final long nextOffset = pageBreak.getLastPosition();
    final long pageOffset = pageBox.getPageOffset();

    if (logger.isDebugEnabled())
    {
      logger.debug("PageableRenderer: pageOffset=" + pageOffset + "; nextOffset=" + nextOffset);
    }

    if (performOutput)
    {
      if (outputProcessor.isNeedAlignedPage())
      {
        final LogicalPageBox box = fillPhysicalPagesStep.compute(pageBox, pageOffset, nextOffset);
        outputProcessor.processContent(box);
        // DebugLog.log("Processing contents for Page " + pageCount + " Page-Offset: " + pageOffset + " -> " + nextOffset);
      }
      else
      {
        // DebugLog.log("Processing fast contents for Page " + pageCount + " Page-Offset: " + pageOffset + " -> " + nextOffset);
        outputProcessor.processContent(pageBox);
      }
    }
    else
    {
      // todo: When recomputing the contents, we have to update the page cursor or the whole excercise is next to useless ..
      // DebugLog.log("Recomputing contents for Page " + pageCount + " Page-Offset: " + pageOffset + " -> " + nextOffset);
      outputProcessor.processRecomputedContent(pageBox);
    }

    // Now fire the pagebreak. This goes through all layers and informs all
    // components, that a pagebreak has been encountered and possibly a
    // new page has been set. It does not save the state or perform other
    // expensive operations. However, it updates the 'isPagebreakEncountered'
    // flag, which will be active until the input-feed received a new event.
    //      Log.debug ("PageTime " + (currentPageAge - lastPageAge));
    final boolean repeat = pageBox.isOpen() || (pageBox.getHeight() > nextOffset);
    if (repeat)
    {
      pageBox.setPageOffset(nextOffset);
      countBoxesStep.process(pageBox);
      cleanPaginatedBoxesStep.compute(pageBox);
      // todo PRD-4606
      pageBox.resetCacheState(true);

      if (pageBreak.isNextPageContainsContent())
      {
        if (layoutPagebreakHandler != null)
        {
          layoutPagebreakHandler.pageStarted();
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.util.PaginationResult

      else
      {
        overflow = usedPageHeight > masterBreak;
      }
      final boolean nextPageContainsContent = (pageBox.getHeight() > masterBreak);
      return new PaginationResult(basePageBreakList, overflow, nextPageContainsContent, visualState);
    }
    finally
    {
      this.breakIndicatorEncountered = null;
      this.paginationTableState = null;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.util.PaginationResult

        {
          nextPageContainsContent = (pageBox.getHeight() > recordedPageBreakPosition);
        }
      }

      return new PaginationResult(basePageBreakList, pagebreakEncountered, nextPageContainsContent, visualState);
    }
    finally
    {
      getEventWatch().stop();
      getSummaryWatch().stop(true);
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.