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

Examples of org.pentaho.reporting.engine.classic.core.filter.types.TextFieldType


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


    final DataAttributes attributes = flowController.getDataSchema().getAttributes(field);
    if (attributes == null)
    {
      logger.warn("Field '" + field + "' is declared in the wizard-specification, " +
          "but not present in the data. Assuming defaults.");
      return new TextFieldType();
    }
    final Class fieldType = (Class) attributes.getMetaAttribute
        (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.TYPE, Class.class, attributeContext);
    if (fieldType == null)
    {
      return new TextFieldType();
    }

    if (Number.class.isAssignableFrom(fieldType))
    {
      return new NumberFieldType();
    }
    if (Date.class.isAssignableFrom(fieldType))
    {
      return new DateFieldType();
    }
    if (byte[].class.isAssignableFrom(fieldType) ||
        Blob.class.isAssignableFrom(fieldType) ||
        Image.class.isAssignableFrom(fieldType))
    {
      return new ContentFieldType();
    }
    return new TextFieldType();
  }
View Full Code Here

  public static ElementType createFieldType(final DataAttributes attributes, final DataAttributeContext context)
  {
    if (attributes == null)
    {
      return new TextFieldType();
    }
    final ElementType elementType;
    final Class type = (Class) attributes.getMetaAttribute
        (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.TYPE, Class.class, context);
    if (Number.class.isAssignableFrom(type))
    {
      elementType = new NumberFieldType();
    }
    else if (Date.class.isAssignableFrom(type))
    {
      elementType = new DateFieldType();
    }
    else if (byte[].class.isAssignableFrom(type) ||
        Blob.class.isAssignableFrom(type) ||
        File.class.isAssignableFrom(type) ||
        URL.class.isAssignableFrom(type) ||
        Image.class.isAssignableFrom(type) ||
        Shape.class.isAssignableFrom(type) ||
        Component.class.isAssignableFrom(type) ||
        ImageContainer.class.isAssignableFrom(type))
    {
      elementType = new ContentFieldType();
    }
    else
    {
      elementType = new TextFieldType();
    }
    return elementType;
  }
View Full Code Here

  public Element createElement()
  {
    final Element element = new Element();
    applyElementName(element);
    applyStyle(element.getStyle());
    element.setElementType(new TextFieldType());
    if (getFieldname() != null)
    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
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

  public static ElementType createFieldType(final DataAttributes attributes, final DataAttributeContext context)
  {
    if (attributes == null)
    {
      return new TextFieldType();
    }
   
    final Class type = (Class) attributes.getMetaAttribute
        (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.TYPE, Class.class, context);
    return createFieldType(type);
View Full Code Here

    {
      elementType = new ContentFieldType();
    }
    else
    {
      elementType = new TextFieldType();
    }
    return elementType;
  }
View Full Code Here

    final DataAttributes attributes = flowController.getDataSchema().getAttributes(field);
    if (attributes == null)
    {
      logger.warn("Field '" + field + "' is declared in the wizard-specification, " +
          "but not present in the data. Assuming defaults.");
      return new TextFieldType();
    }
    final Class fieldType = (Class) attributes.getMetaAttribute
        (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.TYPE, Class.class, attributeContext);
    if (fieldType == null)
    {
      return new TextFieldType();
    }

    return AutoGeneratorUtility.createFieldType(fieldType);
  }
View Full Code Here

  public Element createElement()
  {
    final Element element = new Element();
    applyElementName(element);
    applyStyle(element.getStyle());
    element.setElementType(new TextFieldType());
    if (getFieldname() != null)
    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.filter.types.TextFieldType

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.