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

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


*/
public class ResourceMessageReportElementReadHandler extends AbstractTextElementReadHandler
{
  public ResourceMessageReportElementReadHandler()
  {
    final Element element = new Element();
    element.setElementType(new ResourceMessageType());
    setElement(element);
  }
View Full Code Here


*/
public class TextFieldReportElementReadHandler extends AbstractTextElementReadHandler
{
  public TextFieldReportElementReadHandler()
  {
    final Element element = new Element();
    element.setElementType(new TextFieldType());
    setElement(element);
  }
View Full Code Here

{
  private Element element;

  public StaticImageReportElementReadHandler()
  {
    element = new Element();
    element.setElementType(new ContentType());
    element.getStyle().setStyleProperty(ElementStyleKeys.SCALE, Boolean.TRUE);
  }
View Full Code Here

   *
   * @return the newly generated instance of the element.
   */
  public Element createElement()
  {
    final Element element = new Element();
    applyElementName(element);
    applyStyle(element.getStyle());

    element.setElementType(new SimpleBarcodesType());
    if (getContent() != null)
    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, getContent());
    }
    if (getFieldname() != null)
    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }

    if (getType() != null)
    {
      element.setAttribute(SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.TYPE_ATTRIBUTE,
          getType());
    }
    if (getChecksum() != null)
    {
      element.setAttribute(SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.CHECKSUM_ATTRIBUTE,
          getChecksum());
    }
    if (barWidth != null)
    {
      element.setAttribute(SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.BAR_WIDTH_ATTRIBUTE,
          barWidth);
    }
    if (barHeight != null)
    {
      element.setAttribute(SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.BAR_HEIGHT_ATTRIBUTE,
          barHeight);
    }
    if (showText != null)
    {
      element.setAttribute(SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.SHOW_TEXT_ATTRIBUTE,
          showText);
    }

    return element;
  }
View Full Code Here

        ("Sample Thai chars: เพิ่ม, " +
          "ลูกค้า");
    //String test = "\u3648\u3614\u3636\u3656\u3617\u3621\u3641\u3585\u3588\u3657\u3634";
    test = new String(test.getBytes("iso-8859-1"), "TIS620");

    final Element e = LabelElementFactory.createLabelElement(null,
        new Rectangle2D.Float(10, 10, 250, 50),
        null,
        ElementAlignment.CENTER,
        new FontDefinition("Serif", 14),
        test);
View Full Code Here

      final ReportElement re = section.getElement(i);
      if (re instanceof Element == false)
      {
        throw new IllegalStateException("Cannot write custom implementations of report-element.");
      }
      final Element e = (Element) re;
      final BundleElementWriteHandler writeHandler = BundleElementWriterFactory.createHandler(e);
      writeHandler.writeElement(bundle, state, xmlWriter, e);
    }
  }
View Full Code Here

      final String type = atts.getValue(getUri(), "type");

      final ElementFactoryCollector fc = (ElementFactoryCollector)
          getRootHandler().getHelperObject
              (ReportDefinitionReadHandler.ELEMENT_FACTORY_KEY);
      final Element element = fc.getElementForType(type);
      if (element == null)
      {
        throw new ParseException("There is no factory for elements of type '" +
            type + '\'', getLocator());
      }
View Full Code Here

*/
public class DateFieldReportElementReadHandler extends AbstractTextElementReadHandler
{
  public DateFieldReportElementReadHandler()
  {
    final Element element = new Element();
    element.setElementType(new DateFieldType());
    setElement(element);
  }
View Full Code Here

*/
public class NumberFieldReportElementReadHandler extends AbstractTextElementReadHandler
{
  public NumberFieldReportElementReadHandler()
  {
    final Element element = new Element();
    element.setElementType(new NumberFieldType());
    setElement(element);
  }
View Full Code Here

*/
public class ImageFieldReportElementReadHandler extends AbstractTextElementReadHandler
{
  public ImageFieldReportElementReadHandler()
  {
    final Element element = new Element();
    element.setElementType(new ContentFieldType());
    setElement(element);
    element.getStyle().setStyleProperty(ElementStyleKeys.SCALE, Boolean.TRUE);
  }
View Full Code Here

TOP

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

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.