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

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


    labelA1.getStyle().setStyleProperty(ElementStyleKeys.PADDING_RIGHT, new Float(2));
    labelA1.getStyle().setStyleProperty(ElementStyleKeys.PADDING_TOP, new Float(2));
    labelA1.getStyle().setStyleProperty(ElementStyleKeys.PADDING_BOTTOM, new Float(2));
    labelA1.getStyle().setStyleProperty(ElementStyleKeys.POS_X, new Float(0));
    labelA1.getStyle().setStyleProperty(ElementStyleKeys.POS_Y, new Float(12));
    header.addElement(labelA1);

    final Element labelA2 = new Element();
    labelA2.setElementType(LabelType.INSTANCE);
    labelA2.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, "DROPPED");
    labelA2.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NAME, "DROPPED");
View Full Code Here


    labelA2.getStyle().setStyleProperty(ElementStyleKeys.PADDING_RIGHT, new Float(2));
    labelA2.getStyle().setStyleProperty(ElementStyleKeys.PADDING_TOP, new Float(2));
    labelA2.getStyle().setStyleProperty(ElementStyleKeys.PADDING_BOTTOM, new Float(2));
    labelA2.getStyle().setStyleProperty(ElementStyleKeys.POS_X, new Float(100));
    labelA2.getStyle().setStyleProperty(ElementStyleKeys.POS_Y, new Float(12));
    header.addElement(labelA2);

    final Element labelA3 = new Element();
    labelA3.setElementType(LabelType.INSTANCE);
    labelA3.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, "DROPPED");
    labelA3.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NAME, "DROPPED");
View Full Code Here

    labelA3.getStyle().setStyleProperty(ElementStyleKeys.PADDING_RIGHT, new Float(2));
    labelA3.getStyle().setStyleProperty(ElementStyleKeys.PADDING_TOP, new Float(2));
    labelA3.getStyle().setStyleProperty(ElementStyleKeys.PADDING_BOTTOM, new Float(2));
    labelA3.getStyle().setStyleProperty(ElementStyleKeys.POS_X, new Float(200));
    labelA3.getStyle().setStyleProperty(ElementStyleKeys.POS_Y, new Float(12));
    header.addElement(labelA3);

    final Element labelB1 = new Element();
    labelB1.setElementType(LabelType.INSTANCE);
    labelB1.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, "COST");
    labelB1.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NAME, "COST");
View Full Code Here

    labelB1.getStyle().setStyleProperty(ElementStyleKeys.PADDING_RIGHT, new Float(2));
    labelB1.getStyle().setStyleProperty(ElementStyleKeys.PADDING_TOP, new Float(2));
    labelB1.getStyle().setStyleProperty(ElementStyleKeys.PADDING_BOTTOM, new Float(2));
    labelB1.getStyle().setStyleProperty(ElementStyleKeys.POS_X, new Float(0));
    labelB1.getStyle().setStyleProperty(ElementStyleKeys.POS_Y, new Float(24));
    header.addElement(labelB1);

    final Element labelB2 = new Element();
    labelB2.setElementType(LabelType.INSTANCE);
    labelB2.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, "DROPPED");
    labelB2.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NAME, "DROPPED");
View Full Code Here

    labelB2.getStyle().setStyleProperty(ElementStyleKeys.PADDING_RIGHT, new Float(2));
    labelB2.getStyle().setStyleProperty(ElementStyleKeys.PADDING_TOP, new Float(2));
    labelB2.getStyle().setStyleProperty(ElementStyleKeys.PADDING_BOTTOM, new Float(2));
    labelB2.getStyle().setStyleProperty(ElementStyleKeys.POS_X, new Float(100));
    labelB2.getStyle().setStyleProperty(ElementStyleKeys.POS_Y, new Float(24));
    header.addElement(labelB2);

    final Element labelB3 = new Element();
    labelB3.setElementType(LabelType.INSTANCE);
    labelB3.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, "DROPPED");
    labelB3.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NAME, "DROPPED");
View Full Code Here

    labelB3.getStyle().setStyleProperty(ElementStyleKeys.PADDING_RIGHT, new Float(2));
    labelB3.getStyle().setStyleProperty(ElementStyleKeys.PADDING_TOP, new Float(2));
    labelB3.getStyle().setStyleProperty(ElementStyleKeys.PADDING_BOTTOM, new Float(2));
    labelB3.getStyle().setStyleProperty(ElementStyleKeys.POS_X, new Float(200));
    labelB3.getStyle().setStyleProperty(ElementStyleKeys.POS_Y, new Float(24));
    header.addElement(labelB3);

    DebugReportRunner.createStreamHTML(report);
  }

 
View Full Code Here

  public void testCanvasLayout () throws ReportProcessingException, ContentProcessingException
  {

    final MasterReport report = new MasterReport();
    final ReportHeader reportHeader = report.getReportHeader();
    reportHeader.addElement(createBand("large", 0, 100));
    reportHeader.addElement(createBand("rel", -25, -50));

    // Each character (regarless of font or font-size) will be 8pt high and 4pt wide.
    // this makes this test independent of the fonts installed on the system we run on.
View Full Code Here

  {

    final MasterReport report = new MasterReport();
    final ReportHeader reportHeader = report.getReportHeader();
    reportHeader.addElement(createBand("large", 0, 100));
    reportHeader.addElement(createBand("rel", -25, -50));

    // Each character (regarless of font or font-size) will be 8pt high and 4pt wide.
    // this makes this test independent of the fonts installed on the system we run on.

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, reportHeader);
View Full Code Here

    rowBand.addElement(label);

    final MasterReport report = new MasterReport();
    final ReportHeader band = report.getReportHeader();
    band.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, 2f);
    band.addElement(rowBand);

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

    final RenderNode labelRenderBox = MatchFactory.findElementByName(logicalPageBox, "Label");
View Full Code Here

    final MasterReport report = new MasterReport();
    final ReportHeader band = report.getReportHeader();
    band.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, 2f);
    band.setLayout("block");
    band.addElement(rowBand);

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand(report, band);
    final RenderNode canvasBandRenderBox = MatchFactory.findElementByName(logicalPageBox, "CanvasBand");
    assertEquals(0, canvasBandRenderBox.getWidth());
  }
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.