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

Examples of org.pentaho.reporting.engine.classic.core.ReportHeader.addElement()


    tableCell.addElement(label);


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

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

    final NodeMatcher matcher = new ChildMatcher(new ElementMatcher("TableCellRenderBox"));
View Full Code Here


    table.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, 200f);
    table.addElement(tableBody);

    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"));
View Full Code Here

    factory.setHorizontalAlignment(ElementAlignment.RIGHT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("-");
    factory.setFieldname(DemoReportController.MESSAGE_ONE_FIELDNAME);
    factory.setDynamicHeight(Boolean.TRUE);
    reportHeader.addElement(factory.createElement());

    factory.setName("T2");
    factory.setAbsolutePosition(new Point2D.Float(200, 0));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setFieldname(DemoReportController.MESSAGE_TWO_FIELDNAME);
View Full Code Here

    factory.setName("T2");
    factory.setAbsolutePosition(new Point2D.Float(200, 0));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setFieldname(DemoReportController.MESSAGE_TWO_FIELDNAME);
    reportHeader.addElement(factory.createElement());

    final DefaultParameterDefinition paramDef = new DefaultParameterDefinition();
    paramDef.addParameterDefinition(new PlainParameter("Message1", String.class));
    paramDef.addParameterDefinition(new PlainParameter("Message2", String.class));
    report.getParameterValues().put("Message1", inputPanel.getMessageOne());
View Full Code Here

    band.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, false);
    band.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    band.setName("group-outside");
    band.getStyle().setStyleProperty(ElementStyleKeys.ORPHANS, 2);
    band.getStyle().setStyleProperty(ElementStyleKeys.WIDOWS, 2);
    band.addElement(createBand("group-header-outside"));
    band.addElement(outsideBody);
    band.addElement(createBand("group-footer-outside"));

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, band, false, false);
    final RenderNode grOut = MatchFactory.findElementByName(logicalPageBox, "group-outside");
View Full Code Here

    band.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    band.setName("group-outside");
    band.getStyle().setStyleProperty(ElementStyleKeys.ORPHANS, 2);
    band.getStyle().setStyleProperty(ElementStyleKeys.WIDOWS, 2);
    band.addElement(createBand("group-header-outside"));
    band.addElement(outsideBody);
    band.addElement(createBand("group-footer-outside"));

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, band, false, false);
    final RenderNode grOut = MatchFactory.findElementByName(logicalPageBox, "group-outside");
    assertTrue(grOut instanceof RenderBox);
View Full Code Here

    band.setName("group-outside");
    band.getStyle().setStyleProperty(ElementStyleKeys.ORPHANS, 2);
    band.getStyle().setStyleProperty(ElementStyleKeys.WIDOWS, 2);
    band.addElement(createBand("group-header-outside"));
    band.addElement(outsideBody);
    band.addElement(createBand("group-footer-outside"));

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, band, false, false);
    final RenderNode grOut = MatchFactory.findElementByName(logicalPageBox, "group-outside");
    assertTrue(grOut instanceof RenderBox);
    final RenderBox grOutBox = (RenderBox) grOut;
View Full Code Here

    final ReportHeader header = report.getReportHeader();
    header.getStyle().setStyleProperty(ElementStyleKeys.WIDOW_ORPHAN_OPT_OUT, true);
    header.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, false);
    header.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    header.addElement(createBand("placeholder", 60));
    header.addElement(band);

    List<LogicalPageBox> pages = DebugReportRunner.layoutPages(report, 0, 1, 2);
    final LogicalPageBox logicalPageBox = pages.get(0);
    // if keep-together works, then we avoid the pagebreak between the inner-group-header and the first itemband.
View Full Code Here

    final ReportHeader header = report.getReportHeader();
    header.getStyle().setStyleProperty(ElementStyleKeys.WIDOW_ORPHAN_OPT_OUT, true);
    header.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, false);
    header.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    header.addElement(createBand("placeholder", 60));
    header.addElement(band);

    List<LogicalPageBox> pages = DebugReportRunner.layoutPages(report, 0, 1, 2);
    final LogicalPageBox logicalPageBox = pages.get(0);
    // if keep-together works, then we avoid the pagebreak between the inner-group-header and the first itemband.
    // therefore the first page only contains the placeholder element.
View Full Code Here

    band.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, false);
    band.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    band.setName("group-outside");
    band.getStyle().setStyleProperty(ElementStyleKeys.ORPHANS, 2);
    band.getStyle().setStyleProperty(ElementStyleKeys.WIDOWS, 2);
    band.addElement(createBand("group-header-outside"));
    band.addElement(outsideBody);
    band.addElement(createBand("group-footer-outside"));

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, band, false, false);
    final RenderNode grOut = MatchFactory.findElementByName(logicalPageBox, "group-outside");
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.