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

Examples of org.pentaho.reporting.engine.classic.core.elementfactory.LabelElementFactory.createElement()


    labelFactory.setFontSize(new Integer(10));
    labelFactory.setBold(Boolean.TRUE);
    labelFactory.setAbsolutePosition(new Point2D.Double(15, 10.0));
    labelFactory.setMinimumSize(new FloatDimension(40, 10.0f));
    labelFactory.setHorizontalAlignment(ElementAlignment.LEFT);
    Element element = labelFactory.createElement();
    element.getStyle().setStyleProperty(TextStyleKeys.WORDBREAK, wrap);
    pageHeader.addElement(element);
    return report;
  }
View Full Code Here


    labelFactory.setWidth(new Float(bounds.getWidth()));
    labelFactory.setWrap(TextWrap.WRAP);
    labelFactory.setAbsolutePosition(new Point2D.Double(bounds.getX(), bounds.getY()));
    labelFactory.setHorizontalAlignment(ElementAlignment.LEFT);
    labelFactory.setVerticalAlignment(ElementAlignment.TOP);
    final Element labelElement = labelFactory.createElement();

    return labelElement;
  }

  private SubReport createSubReportWithDefaultDatasource(final AbstractRootLevelBand band, final String name)
View Full Code Here

    labelFactory.setAbsolutePosition(new Point2D.Double(300, 10.0));
    labelFactory.setMinimumSize(new FloatDimension(300, 24));
    labelFactory.setHorizontalAlignment(ElementAlignment.LEFT);

    // watermark has a implicit rule that limits the height of the band to the size of the usable page-area.
    report.getReportHeader().addElement(labelFactory.createElement());
    validate(report);
  }

  public void testCenterAlignment() throws Exception
  {
View Full Code Here

    labelFactory.setAbsolutePosition(new Point2D.Double(300, 10.0));
    labelFactory.setMinimumSize(new FloatDimension(300, 24));
    labelFactory.setHorizontalAlignment(ElementAlignment.CENTER);

    // watermark has a implicit rule that limits the height of the band to the size of the usable page-area.
    report.getReportHeader().addElement(labelFactory.createElement());
    validate(report);
  }

  public void testRightAlignment() throws Exception
  {
View Full Code Here

    labelFactory.setAbsolutePosition(new Point2D.Double(300, 10.0));
    labelFactory.setMinimumSize(new FloatDimension(300, 24));
    labelFactory.setHorizontalAlignment(ElementAlignment.RIGHT);

    // watermark has a implicit rule that limits the height of the band to the size of the usable page-area.
    report.getReportHeader().addElement(labelFactory.createElement());
    validate(report);
  }

  private void validate(final MasterReport report) throws Exception
  {
View Full Code Here

    labelFactory.setFontSize(new Integer(10));
    labelFactory.setBold(Boolean.TRUE);
    labelFactory.setAbsolutePosition(new Point2D.Double(0, 0.0));
    labelFactory.setMinimumSize(new FloatDimension(4000, 10.0f));
    labelFactory.setHorizontalAlignment(ElementAlignment.LEFT);
    return labelFactory.createElement();
  }

  /**
   * If a large element consumes more space as the parent, the parent must expand.
   * Only valid for reports with compatibility level >= 4.0
View Full Code Here

    labelFactory.setWidth(568.0F);
    labelFactory.setWrap(TextWrap.WRAP);
    labelFactory.setAbsolutePosition(new Point2D.Double(2.0, 4.0));
    labelFactory.setHorizontalAlignment(ElementAlignment.LEFT);
    labelFactory.setVerticalAlignment(ElementAlignment.TOP);
    final Element labelElement = labelFactory.createElement();
    pageHeader.addElement(labelElement);
    return report;
  }
}
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.