Examples of LogicalPageBox


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

    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.setCompatibilityLevel(ClassicEngineBoot.computeVersionId(4, 0, 0));

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    //ModelPrinter.print(logicalPageBox);

    final RenderNode[] cell2a = MatchFactory.findElementsByName(logicalPageBox, "header-#1");
    for (int i = 0; i < cell2a.length; i+= 1)
    {
View Full Code Here

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

    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.setCompatibilityLevel(ClassicEngineBoot.computeVersionId(4, 0, 0));

    final LogicalPageBox pageBox = DebugReportRunner.layoutPage(report, 0);
  //  ModelPrinter.INSTANCE.print(pageBox);
  }
View Full Code Here

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

    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    report.getReportHeader().removeElement(0);
    report.getReportHeader().getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.YELLOW);
    report.getReportFooter().clear();

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

    RenderNode second = MatchFactory.findElementByName(logicalPageBox, "second");
    assertTrue(second instanceof RenderBox);

    ExcelOutputProcessorMetaData metaData = new ExcelOutputProcessorMetaData(ExcelOutputProcessorMetaData.PAGINATION_FULL);
View Full Code Here

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

    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    report.getReportHeader().removeElement(0);
    report.getReportHeader().getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.YELLOW);
    report.getReportFooter().clear();

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

    RenderNode second = MatchFactory.findElementByName(logicalPageBox, "second");
    assertTrue(second instanceof RenderBox);

    HtmlRenderingSetup setup = new HtmlRenderingSetup(report);
View Full Code Here

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

    URL resource = getClass().getResource("rich-text-sample1.prpt");
    ResourceManager mgr = new ResourceManager();
    MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();
    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");

    LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    RenderNode first = MatchFactory.findElementByName(logicalPageBox, "first");
    assertNotNull(first);
    assertTrue(first.getHeight() > StrictGeomUtility.toInternalValue(20));

    RenderNode[] elementsByNodeType = MatchFactory.findElementsByNodeType(first, LayoutNodeTypes.TYPE_NODE_COMPLEX_TEXT);
View Full Code Here

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

    MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();
    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");
    report.getReportHeader().removeElement(report.getReportHeader().getElement(0));
    report.getReportHeader().getElement(0).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);

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

    RenderNode second = MatchFactory.findElementByName(logicalPageBox, "second");
    assertTrue(second instanceof ParagraphRenderBox);
    ParagraphRenderBox p = (ParagraphRenderBox) second;
    assertTrue(p.getPool().getFirstChild().getNext() instanceof RenderableReplacedContentBox);
View Full Code Here

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

  public void testValidate() throws ReportProcessingException, ContentProcessingException
  {
    final MasterReport report = new MasterReport();
    final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);

    final LogicalPageBox pageBox = DebugReportRunner.layoutSingleBand(report, createTable());
    assertTrue(new ValidateModelStep().isLayoutable(pageBox));
    new TableValidationStep().validate(pageBox);
    new ParagraphLineBreakStep().compute(pageBox);
   
    final ComputeStaticPropertiesProcessStep computeStaticPropertiesProcessStep = new ComputeStaticPropertiesProcessStep();
View Full Code Here

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

  }

  public void testGoldenSampleSubReportHeightLegacy () throws Exception
  {
    final MasterReport report = DebugReportRunner.parseGoldenSampleReport("Prd-3245.prpt");
    LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    RenderNode elementByName = MatchFactory.findElementByName
        (logicalPageBox, "Subreport 1.1.1");
    assertTrue("SubReport height of " + StrictGeomUtility.toExternalValue(elementByName.getHeight()) +
        " is greater than 600pt", elementByName.getHeight() > StrictGeomUtility.toInternalValue(600));
  }
View Full Code Here

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

    // migrate to latest version
    final CompatibilityUpdater updater = new CompatibilityUpdater();
    updater.performUpdate(report);
    report.setAttribute(AttributeNames.Internal.NAMESPACE, AttributeNames.Internal.COMAPTIBILITY_LEVEL, null);

    LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    RenderNode elementByName = MatchFactory.findElementByName
        (logicalPageBox, "Subreport 1.1.1");
    assertTrue("SubReport height of " + StrictGeomUtility.toExternalValue(elementByName.getHeight()) +
        " is greater than 600pt", elementByName.getHeight() > StrictGeomUtility.toInternalValue(600));
  }
View Full Code Here

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

  }

  public void testBandedPageSubreport() throws Exception
  {
    final MasterReport report = DebugReportRunner.parseGoldenSampleReport("Prd-3245.prpt");
    LogicalPageBox box = DebugReportRunner.layoutPage(report, 2);
    assertNull(MatchFactory.findElementByName(box, "Subreport 1.1"));
  }
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.