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

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


  public void testComplex() throws ReportProcessingException, ContentProcessingException
  {
    final MasterReport report = createReport(false);

    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");
    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, report.getPageHeader(), false, false);
    // 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, true, false);
  }
View Full Code Here


  public void testComplexLegacy() throws ReportProcessingException, ContentProcessingException
  {
    final MasterReport report = createReport(true);

    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");
    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, report.getPageHeader(), false, false);
    // 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, true, true);
  }
View Full Code Here

    final ResourceManager rm = new ResourceManager();
    rm.registerDefaults();
    final Resource directly = rm.createDirectly(target, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand
        (basereport, report.getReportHeader(), false, false);
    // 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);
  }
View Full Code Here

    ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final Resource resource = mgr.createDirectly(reportLocation, MasterReport.class);
    final MasterReport report = (MasterReport) resource.getResource();

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, report.getReportHeader());
    //ModelPrinter.print(logicalPageBox);
/*
    final RenderNode elementByName2 = MatchFactory.findElementByName(logicalPageBox, "Push me too!");
    assertEquals("Expected failure, this bug is still unresolved.",
        StrictGeomUtility.toInternalValue(75), elementByName2.getHeight());
View Full Code Here

    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(file, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

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

    final RenderNode[] nodes = MatchFactory.matchAll(logicalPageBox, "RowRenderBox");
    for (int i = 0; i < nodes.length; i++)
    {
      final RenderNode node = nodes[i];
View Full Code Here

      // page cannot have borders ...
      final int type = box.getNodeType();
      if ((type & LayoutNodeTypes.MASK_BOX_PAGEAREA) == LayoutNodeTypes.MASK_BOX_PAGEAREA)
      {
        final PageAreaBox pageAreaBox = (PageAreaBox) box;
        final LogicalPageBox pageBox = pageAreaBox.getLogicalPage();
        if (pageBox == null)
        {
          return 0;
        }
        return pageBox.getPageWidth();
      }
      if ((type & LayoutNodeTypes.TYPE_BOX_LOGICALPAGE) == LayoutNodeTypes.TYPE_BOX_LOGICALPAGE)
      {
        final LogicalPageBox logicalPage = (LogicalPageBox) box;
        return logicalPage.getPageWidth();
      }
      return 0;
    }

    // A row or inline-box never establishes a context on its own; it always transfers the parent's block-render context.
View Full Code Here

    report.getReportHeader().setName("RH");
    report.getReportHeader().addElement(e1);
    report.getReportHeader().addElement(e2);
    report.getReportHeader().addElement(e3);

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, report.getReportHeader());
    //ModelPrinter.INSTANCE.print(logicalPageBox);

    final RenderNode e1Box = MatchFactory.findElementByName(logicalPageBox, "E1");
    final RenderNode e2Box = MatchFactory.findElementByName(logicalPageBox, "E2");
    final RenderNode e3Box = MatchFactory.findElementByName(logicalPageBox, "E3");
View Full Code Here

    report.getReportHeader().setName("RH");
    report.getReportHeader().addElement(e1);
    report.getReportHeader().addElement(e2);
    report.getReportHeader().addElement(e3);

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, report.getReportHeader());
    //ModelPrinter.INSTANCE.print(logicalPageBox);

    final RenderNode e1Box = MatchFactory.findElementByName(logicalPageBox, "E1");
    final RenderNode e2Box = MatchFactory.findElementByName(logicalPageBox, "E2");
    final RenderNode e3Box = MatchFactory.findElementByName(logicalPageBox, "E3");
View Full Code Here

    final MasterReport report = (MasterReport) directly.getResource();

    PageDefinition pageDefinition = report.getPageDefinition();
    assertEquals(500f, pageDefinition.getWidth());

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

  @Test
  public void testGoldenSample() throws Exception
  {
    MasterReport report = DebugReportRunner.parseGoldenSampleReport("Prd-4841.prpt");
    LogicalPageBox page = DebugReportRunner.layoutPage(report, 0);
    // This test should not throw an exception
  }
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.