Examples of LogicalPageBox


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

  }

  public void testReportRun() throws Exception
  {
    final MasterReport elements = DebugReportRunner.parseGoldenSampleReport("Prd-4471.prpt");
    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(elements, 0);

    final RenderNode[] elementsByElementType = MatchFactory.findElementsByElementType
        (logicalPageBox.getRepeatFooterArea(), GroupFooterType.INSTANCE);
    assertEquals(0, elementsByElementType.length);
  }
View Full Code Here

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

    // Test whether the final page has out-of-bounds boxes. The FillPhysicalPages step should have removed them
    final PrintReportProcessor rp = new PrintReportProcessor(report);
    for (int page = 0; page < rp.getNumberOfPages(); page += 1)
    {
      final PhysicalPageDrawable pageDrawable = (PhysicalPageDrawable) rp.getPageDrawable(page);
      final LogicalPageBox logicalPageBox = pageDrawable.getPageDrawable().getLogicalPageBox();

      //ModelPrinter.print(logicalPageBox);
      //if (true) return;
      final RenderNode[] all = MatchFactory.matchAll(logicalPageBox, new ElementMatcher(TableRowRenderBox.class));
      for (int i = 0; i < all.length; i += 1)
      {
        final RenderNode node = all[i];
        // temporary workaround:
        final RenderBox parent = node.getParent();
        if (parent instanceof TableSectionRenderBox)
        {
          final TableSectionRenderBox parentBox = (TableSectionRenderBox) parent;
          if (parentBox.getDisplayRole() != TableSectionRenderBox.Role.BODY)
          {
            continue;
          }
        }

        assertFalse((node.getY() + node.getHeight()) <= logicalPageBox.getPageOffset());
        assertFalse(node.getY() >= logicalPageBox.getPageEnd());

        if (node.getY() < logicalPageBox.getPageEnd() &&
            (node.getY() + node.getHeight()) > logicalPageBox.getPageEnd())
        {
          fail(" y=" + node.getY() + " height=" + node.getHeight());
        }
      }
    }
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.