Examples of ElementType


Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

    }

    final String contentBasePath = String.valueOf(contentBasePathRaw);
    final ResourceManager resourceManager = state.getMasterReport().getResourceManager();

    final ElementType type = element.getElementType();
    final ElementMetaData data = type.getMetaData();
    final AttributeMetaData[] datas = data.getAttributeDescriptions();
    for (int i = 0; i < datas.length; i++)
    {
      final AttributeMetaData attributeMetaData = datas[i];
      if (attributeMetaData.isTransient())
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

    if (element == null)
    {
      throw new NullPointerException();
    }

    final ElementType type = element.getElementType();
    if (type == null)
    {
      // A legacy element. Cannot handle that this way.
      return null;
    }

    final ElementMetaData metaData = type.getMetaData();
    final String configKey = ELEMENT_PREFIX + metaData.getName();
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String value = globalConfig.getConfigProperty(configKey);
    if (value != null)
    {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

    if (element == null)
    {
      throw new NullPointerException();
    }

    final ElementType type = element.getElementType();
    final String metaName = type.getMetaData().getName();
    final String configKey = PREFIX + metaName;

    final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String handlerClass = config.getConfigProperty(configKey);
    final BundleElementWriteHandler handler = (BundleElementWriteHandler) ObjectUtilities.loadAndInstantiate
        (handlerClass, type.getClass(), BundleElementWriteHandler.class);
    if (handler == null)
    {
      throw new IllegalStateException("Got no handler for type " + metaName);
    }
    return handler;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

  }

  private void writeElementAttributes(final RenderNode element) throws IOException
  {
    final ReportAttributeMap attributes = element.getAttributes();
    final ElementType type = element.getElementType();
    final String[] attributeNamespaces = attributes.getNameSpaces();
    for (int i = 0; i < attributeNamespaces.length; i++)
    {
      final String namespace = attributeNamespaces[i];

      final String[] attributeNames = attributes.getNames(namespace);
      for (int j = 0; j < attributeNames.length; j++)
      {
        final String name = attributeNames[j];
        final Object value = attributes.getAttribute(namespace, name);
        if (value == null)
        {
          continue;
        }

        final AttributeMetaData attrMeta = type.getMetaData().getAttributeDescription(namespace, name);
        if (attrMeta == null)
        {
          // if you want to use attributes in this output target, declare the attribute's metadata first.
          continue;
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

  }

  private void writeElementAttributes(final RenderNode element) throws IOException
  {
    final ReportAttributeMap attributes = element.getAttributes();
    final ElementType type = element.getElementType();
    writeAttributes(attributes, type);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

    if (content.getY() + contentShift != y || content.getX() != x)
    {
      return retval;
    }

    final ElementType anchor = content.getElementType();
    if (anchor != null)
    {
      if (retval == null)
      {
        retval = new CellBackground();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

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

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

        continue;
      }

      final Number width = AutoGeneratorUtility.createFieldWidth(attributes, context);
      final String fieldName = AutoGeneratorUtility.createFieldName(attributes, context);
      final ElementType targetType = AutoGeneratorUtility.createFieldType(attributes, context);
      final Boolean hideDuplicateItems = (Boolean) attributes.getMetaAttribute
          (MetaAttributeNames.Formatting.NAMESPACE, MetaAttributeNames.Formatting.HIDE_DUPLICATE_ITEMS, Number.class,
              context);
      fields.add(new AutoGeneratorFieldDescription(fieldName, targetType, width, hideDuplicateItems));
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

    final DataAttributeContext dataAttributeContext = new DefaultDataAttributeContext();
    if (attributes == null)
    {
      return null;
    }
    final ElementType type = AutoGeneratorUtility.createFieldType(attributes, dataAttributeContext);
    if (type == null)
    {
      return null;
    }
    return type.getMetaData();
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType

      return;
    }

    try
    {
      final ElementType type = metaData.create();
      final Element visualElement = (Element) type.create();
      if (visualElement instanceof SubReport)
      {
        final Element rootBand = findRootBand(band);
        if (rootBand == null ||
            rootBand instanceof PageHeader ||
            rootBand instanceof PageFooter ||
            rootBand instanceof DetailsHeader ||
            rootBand instanceof DetailsFooter ||
            rootBand instanceof Watermark)
        {
          return;
        }
      }
     
      final ElementStyleSheet styleSheet = visualElement.getStyle();
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);

      type.configureDesignTimeDefaults(visualElement, Locale.getDefault());


      final ReportDocumentContext context = getActiveContext();
      final UndoManager undo = context.getUndo();
      undo.addChange(ActionMessages.getString("InsertElementAction.UndoName"),
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.