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

Examples of org.pentaho.reporting.engine.classic.core.ReportHeader


    Element test = TableTestUtil.createDataItem("Test");
    test.setVisible(false);

    MasterReport report = new MasterReport();
    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "false");
    ReportHeader reportHeader = report.getReportHeader();
    reportHeader.setLayout(BandStyleKeys.LAYOUT_ROW);
    reportHeader.addElement(test);
    reportHeader.getStyle().setStyleProperty(ElementStyleKeys.INVISIBLE_CONSUMES_SPACE, false);
    reportHeader.setVisible(false);

    LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, reportHeader);
    RenderNode[] elementsByNodeType = MatchFactory.findElementsByNodeType(logicalPageBox, LayoutNodeTypes.TYPE_NODE_TEXT);
    Assert.assertEquals(0, elementsByNodeType.length);
  }
View Full Code Here


    table.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, -100f);
    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

    table.getStyle().setStyleProperty(ElementStyleKeys.POS_X, 10f);
    table.getStyle().setStyleProperty(ElementStyleKeys.POS_Y, 10f);
    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

    final Band tableRow = TableTestUtil.createRow();
    tableRow.addElement(tableCell);

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

    tableBody.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, -100f);
    tableBody.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, 200f);
    tableBody.addElement(tableRow);

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

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

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

    tableBody.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, -50f);
    tableBody.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, 200f);
    tableBody.addElement(tableRow);

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

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

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

    tableCell.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, 200f);
    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_WIDTH, -100f);
    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

   */
  public MasterReport createReport() throws ReportDefinitionException
  {

    final MasterReport report = new MasterReport();
    final ReportHeader reportHeader = report.getReportHeader();
    report.setName(getDemoName());

    final TextFieldElementFactory factory = new TextFieldElementFactory();
    factory.setName("T1");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(150, 12));
    factory.setColor(Color.black);
    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);
    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

    final Band outsideBody = new Band();
    outsideBody.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    outsideBody.setName("group-body-outside");
    outsideBody.addElement(insideGroup);

    final ReportHeader band = report.getReportHeader();
    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");
    assertTrue(grOut instanceof RenderBox);
    final RenderBox grOutBox = (RenderBox) grOut;
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.ReportHeader

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.