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

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


      }

      final MetaData metaData = crosstabOption.getMetaData();
      if (metaData instanceof AttributeMetaData)
      {
        final AttributeMetaData attributeMetaData = (AttributeMetaData) metaData;
        if (namespace.equals(attributeMetaData.getNameSpace()) &&
            name.equals(attributeMetaData.getName()))
        {
          crosstabOption.setValue(value);
          fireTableCellUpdated(i, 1);
          return;
        }
View Full Code Here


      }

      final MetaData metaData = crosstabOption.getMetaData();
      if (metaData instanceof AttributeMetaData)
      {
        final AttributeMetaData attributeMetaData = (AttributeMetaData) metaData;
        if (namespace.equals(attributeMetaData.getNameSpace()) &&
            name.equals(attributeMetaData.getName()))
        {
          return crosstabOption.getValue();
        }
      }
    }
View Full Code Here

      }

      final MetaData metaData = crosstabOption.getMetaData();
      if (metaData instanceof AttributeMetaData)
      {
        final AttributeMetaData attributeMetaData = (AttributeMetaData) metaData;
        final Object value = e.getAttribute(attributeMetaData.getNameSpace(), attributeMetaData.getName());
        crosstabOption.setValue(value);
      }
    }
    fireTableDataChanged();
  }
View Full Code Here

      }

      final MetaData metaData = crosstabOption.getMetaData();
      if (metaData instanceof AttributeMetaData)
      {
        final AttributeMetaData attributeMetaData = (AttributeMetaData) metaData;
        e.setAttribute(attributeMetaData.getNameSpace(), attributeMetaData.getName(), crosstabOption.getValue());
      }
    }
  }
View Full Code Here

    }

    // This is an attribute change event ... see if it is one we are concerned about
    final AttributeChange attributeChange = (AttributeChange) event.getParameter();
    final ReportElement reportElement = (ReportElement) event.getElement();
    final AttributeMetaData attributeDescription = reportElement.getMetaData().getAttributeDescription(attributeChange.getNamespace(), attributeChange.getName());
    if (attributeDescription == null ||
        AttributeMetaData.VALUEROLE_RESOURCE.equals(attributeDescription.getValueRole()) == false)
    {
      return;
    }

    // See if we need to load the resource's value into the resource key
View Full Code Here

                                 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;
    }

    final String valueRole = attributeDescription.getValueRole();
    final Class valueType = attributeDescription.getTargetType();
    final PropertyEditor propertyEditor = attributeDescription.getEditor();
    final GroupedName groupedName = new GroupedName(attributeDescription);
    final GroupingHeader groupingHeader = createGroupingHeader(attributeDescription);
    backend.add(new CrosstabOption(groupingHeader, type, groupedName, valueType, valueRole, propertyEditor, value));

    fireTableRowsInserted(backend.size() - 1, backend.size() - 1);
View Full Code Here

    {
      setEnabled(false);
      return;
    }
    final Element e = (Element) o;
    final AttributeMetaData data = e.getElementType().getMetaData().getAttributeDescription
            (AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE);
    if (data == null)
    {
      setEnabled(false);
      return;
    }
    setEnabled("Resource".equals(data.getValueRole())); // NON-NLS
  }
View Full Code Here

    if (o instanceof Element == false)
    {
      return;
    }
    final Element element = (Element) o;
    final AttributeMetaData data = element.getElementType().getMetaData().getAttributeDescription
            (AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE);
    if (data == null)
    {
      return;
    }
    if("Resource".equals(data.getValueRole()) == false) // NON-NLS
    {
      return;
    }

    final CustomPropertyEditorDialog editorDialog;
View Full Code Here

  }

  private AttributeMetaData selectMetaData(final ReportElement element)
  {
    final ElementMetaData elementMetaData = element.getMetaData();
    final AttributeMetaData fieldData =
            elementMetaData.getAttributeDescription(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD);
    if (fieldData != null)
    {
      return fieldData;
    }
View Full Code Here

      final ElementMetaData data = visualElement.getMetaData();
      final AttributeMetaData[] datas = data.getAttributeDescriptions();
      for (int j = 0; j < datas.length; j++)
      {
        final AttributeMetaData metaData = datas[j];
        final AttributeMetaData attributeMetaData =
            targetMetaData.getAttributeDescription(metaData.getNameSpace(), metaData.getName());
        if (attributeMetaData == null)
        {
          visualElement.setAttribute(metaData.getNameSpace(), metaData.getName(), null);
          visualElement.setAttributeExpression(metaData.getNameSpace(), metaData.getName(), null);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.metadata.AttributeMetaData

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.