Package org.pentaho.reporting.engine.classic.core.layout.model

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


  public void testAlignmentRightFooterCase() throws Exception
  {
    final SurveyScaleAPIDemoHandler handler = new SurveyScaleAPIDemoHandler();
    final MasterReport report = handler.createReport();

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, report.getPageFooter());
    // simple test, we assert that all paragraph-poolboxes are on either 485000 or 400000
    // and that only two lines exist for each
    new ValidateRunner().startValidation(logicalPageBox);
//    ModelPrinter.print(logicalPageBox);
  }
View Full Code Here


    assertPageValid(pages, page, 0);
  }

  private void assertPageValid(final List<LogicalPageBox> pages, final int page, final long offset) throws Exception
  {
    final LogicalPageBox pageBox = pages.get(page);
    final long pageOffset = pageBox.getPageOffset();

    //ModelPrinter.INSTANCE.print(pageBox);

    final RenderNode[] elementsByNodeType = MatchFactory.findElementsByNodeType(pageBox, LayoutNodeTypes.TYPE_BOX_TABLE_SECTION);
    Assert.assertEquals(2, elementsByNodeType.length);
View Full Code Here

    report.getReportHeader().getSubReport(0).getReportHeader().addElement(createLabel("ReportHeader-label"));

    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.xml.Encoding", "UTF-8");

    LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    assertNotNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("Label")));
    assertNotNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("XASDAS")));
  }
View Full Code Here

    report.getReportHeader().getSubReport(0).getReportHeader().addElement(createLabel("ReportHeader-label"));

    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.xml.Encoding", "UTF-8");

    LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    assertNotNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("Label")));
    assertNotNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("XASDAS")));
  }
View Full Code Here

    report.getReportHeader().getSubReport(0).getReportHeader().addElement(createLabel("ReportHeader-label"));

    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.xml.Encoding", "UTF-8");

    LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    assertNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("Label")));
    assertNotNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("XASDAS")));
  }
View Full Code Here

    report.getReportHeader().getSubReport(0).getPageFooter().setSticky(false);
    report.getReportHeader().getSubReport(0).getReportHeader().addElement(createLabel("ReportHeader-label"));
    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.xml.Encoding", "UTF-8");

    LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);

    assertNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("Label")));
    assertNotNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("XASDAS")));
  }
View Full Code Here

    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.xml.Encoding", "UTF-8");


    LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    assertNotNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("Label")));
    assertNull(MatchFactory.match(logicalPageBox.getFooterArea(), new FooterTextMatcher("PageFooter-Label")));
    // TESTBUG: this is not a true structural test at all.
  }
View Full Code Here

    final MasterReport report = new MasterReport();
    final ReportHeader band = report.getReportHeader();
    band.addElement(table);

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, band, false, false);
    //ModelPrinter.print(logicalPageBox);

    final NodeMatcher matcher = new ChildMatcher(new ElementMatcher("TableCellRenderBox"));
    final RenderNode[] all = MatchFactory.matchAll(logicalPageBox, matcher);
View Full Code Here

    final MasterReport report = new MasterReport();
    final ReportHeader band = report.getReportHeader();
    band.addElement(table);

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, band, false, false);
    //ModelPrinter.print(logicalPageBox);

    final NodeMatcher matcher = new ChildMatcher(new ElementMatcher("TableCellRenderBox"));
    final RenderNode[] all = MatchFactory.matchAll(logicalPageBox, matcher);
View Full Code Here

    final MasterReport report = new MasterReport();
    final ReportHeader band = report.getReportHeader();
    band.addElement(tableRow);

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, band, false, false);
    //ModelPrinter.print(logicalPageBox);

    final NodeMatcher matcher = new ChildMatcher(new ElementMatcher("TableCellRenderBox"));
    final RenderNode[] all = MatchFactory.matchAll(logicalPageBox, matcher);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.model.LogicalPageBox

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.