Examples of ElementMetaData


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

    e.style = (InternalElementStyleSheet) style.derive();
    e.datasource = (DataSource) datasource.clone();
    e.parent = null;
    e.style.updateElementReference(e);
    e.attributes = (ReportAttributeMap) attributes.clone();
    final ElementMetaData metaData = e.getMetaData();
    final String[] namespaces = e.attributes.getNameSpaces();
    for (int i = 0; i < namespaces.length; i++)
    {
      final String namespace = namespaces[i];
      final Map attrsNs = attributes.getAttributes(namespace);
      final Iterator it = attrsNs.entrySet().iterator();
      while (it.hasNext())
      {
        final Map.Entry entry = (Map.Entry) it.next();
        final Object value = entry.getValue();

        final String name = (String) entry.getKey();
        final AttributeMetaData data = metaData.getAttributeDescription(namespace, name);
        if (data == null)
        {
          if (logger.isDebugEnabled())
          {
            logger.debug(getElementTypeName() + ": Attribute " + namespace + "|" + name + " is not listed in the metadata.");
View Full Code Here

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

    {
      return false;
    }

    final ConverterRegistry instance = ConverterRegistry.getInstance();
    final ElementMetaData metaData = e.getMetaData();
    boolean retval = false;

    for (int namespaceIdx = 0; namespaceIdx < namespaces.length; namespaceIdx++)
    {
      final String namespace = namespaces[namespaceIdx];
      final String[] names = e.getAttributeExpressionNames(namespace);
      for (int nameIdx = 0; nameIdx < names.length; nameIdx++)
      {
        final String name = names[nameIdx];
        final Expression ex = e.getAttributeExpression(namespace, name);
        if (ex == null)
        {
          continue;
        }

        final AttributeMetaData attribute = metaData.getAttributeDescription(namespace, name);
        if (attribute != null && attribute.isDesignTimeValue())
        {
          continue;
        }
View Full Code Here

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

                                final ReportRenderContext reportRenderContext,
                                final InspectionResultListener resultHandler,
                                final String[] columnNames,
                                final ReportElement element)
  {
    final ElementMetaData elementMetaData = element.getMetaData();
    if (elementMetaData.getCompatibilityLevel() > compatibilityLevel)
    {
      // warn: ReportMigrationInspection.ElementInvalid
      resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
          Messages.getString("ReportMigrationInspection.ElementInvalid",
              element.getName(), compatibilityText), new LocationInfo(element)));
    }

    for (final AttributeMetaData attributeMetaData : elementMetaData.getAttributeDescriptions())
    {
      if (attributeMetaData.getCompatibilityLevel() > compatibilityLevel)
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("ReportMigrationInspection.AttributeInvalid",
View Full Code Here

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

    setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
  }

  public void dragGestureRecognized(final DragGestureEvent anEvent)
  {
    final ElementMetaData elementMetaData = ElementTypeRegistry.getInstance().getElementType(elementName);
    final ElementMetaDataTransferable transferable = new ElementMetaDataTransferable(elementMetaData);
    anEvent.startDrag(DragSource.DefaultCopyNoDrop, EMPTY_DRAG_IMAGE, new Point(), transferable, null);

    final ButtonModel model = getModel();
    model.setArmed(false);
View Full Code Here

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

      final Object formatString = data.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FORMAT_STRING);

      final ArrayList<UndoEntry> undos = new ArrayList<UndoEntry>();
      for (Element element : visualElements)
      {
        final ElementMetaData metaData = element.getMetaData();
        final ElementStyleSheet elementStyleSheet = element.getStyle();

        final Object[] oldStyleData = new Object[StyleKey.getDefinedStyleKeyCount()];
        final Object[] newStyleData = new Object[StyleKey.getDefinedStyleKeyCount()];
        for (int j = 0; j < definedPropertyNamesArray.length; j++)
        {
          final StyleKey styleKey = definedPropertyNamesArray[j];
          if (styleKey == null)
          {
            continue;
          }
          final StyleMetaData styleDescr = metaData.getStyleDescription(styleKey);
          if (styleDescr == null)
          {
            // skip if the target element does not have that style ..
            continue;
          }
View Full Code Here

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

                                final ReportDocumentContext reportRenderContext,
                                final InspectionResultListener resultHandler,
                                final String[] columnNames,
                                final ReportElement element)
  {
    final ElementMetaData metaData = element.getMetaData();
    final AttributeMetaData[] attributeDescriptions = metaData.getAttributeDescriptions();
    for (int i = 0; i < attributeDescriptions.length; i++)
    {
      final AttributeMetaData attributeMetaData = attributeDescriptions[i];
      final Object value = element.getAttribute(attributeMetaData.getNameSpace(), attributeMetaData.getName());
      if (value != null)
View Full Code Here

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

    }
    if (element instanceof Section)
    {
      return;
    }
    final ElementMetaData metaData = element.getMetaData();
    if (metaData.isContainerElement())
    {
      return;
    }

    if (isTextElement(metaData) == false)
View Full Code Here

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

  public void addAttributeOption(final ElementType type,
                                 final String nameSpace,
                                 final String name,
                                 final Object value)
  {
    final ElementMetaData metaData = type.getMetaData();
    final AttributeMetaData attributeDescription = metaData.getAttributeDescription(nameSpace, name);
    if (attributeDescription == null)
    {
      return;
    }
View Full Code Here

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

  public void addStyleOption(final ElementType type,
                             final StyleKey styleKey,
                             final Object value)
  {
    final ElementMetaData metaData = type.getMetaData();
    final StyleMetaData styleDescription = metaData.getStyleDescription(styleKey);
    if (styleDescription == null)
    {
      return;
    }
View Full Code Here

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

  {
    try
    {
      if (ElementMetaDataTransferable.ELEMENT_FLAVOR.equals(getFlavor()))
      {
        final ElementMetaData data = (ElementMetaData) getTransferData();
        if (data == null)
        {
          return DnDConstants.ACTION_NONE;
        }

        if (dragHandler == null)
        {
          dragHandler = createDragHandler(data);
          if (dragHandler == null)
          {
            return DnDConstants.ACTION_NONE;
          }
          return dragHandler.dragStarted(event, editorContext, data, null);
        }
        else
        {
          return dragHandler.dragUpdated(event, editorContext, data, null);
        }
      }

      if (FieldDescriptionTransferable.ELEMENT_FLAVOR.equals(getFlavor()))
      {
        final String fieldName = (String) getTransferData();
        final ElementMetaData data = createMetaData(fieldName);
        if (data == null)
        {
          return DnDConstants.ACTION_NONE;
        }
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.