Examples of ReportPreProcessorPropertyMetaData


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

        for (int i = 0; i < metaData.length; i++)
        {
          if (groupCount == 0)
          {
            groupCount = 1;
            final ReportPreProcessorPropertyMetaData firstdata = metaData[i];
            oldValue = firstdata.getGrouping(locale);
            continue;
          }

          final ReportPreProcessorPropertyMetaData data = metaData[i];
          final String grouping = data.getGrouping(locale);
          if ((ObjectUtilities.equal(oldValue, grouping)) == false)
          {
            oldValue = grouping;
            groupCount += 1;
          }
        }
      }

      final ReportPreProcessorPropertyMetaData[] groupedMetaData = new ReportPreProcessorPropertyMetaData[metaData.length + groupCount];
      this.groupings = new GroupingHeader[groupedMetaData.length];
      int targetIdx = 0;
      GroupingHeader group = null;
      for (int sourceIdx = 0; sourceIdx < metaData.length; sourceIdx++)
      {
        final ReportPreProcessorPropertyMetaData data = metaData[sourceIdx];
        if (sourceIdx == 0)
        {
          group = new GroupingHeader(data.getGrouping(locale));
          groupings[targetIdx] = group;
          targetIdx += 1;
        }
        else
        {
          final String newgroup = data.getGrouping(locale);
          if ((ObjectUtilities.equal(newgroup, group.getHeaderText())) == false)
          {
            group = new GroupingHeader(newgroup);
            groupings[targetIdx] = group;
            targetIdx += 1;
View Full Code Here

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

    }
  }

  public Object getValueAt(final int rowIndex, final int columnIndex)
  {
    final ReportPreProcessorPropertyMetaData metaData = getMetaData(rowIndex);
    if (metaData == null)
    {
      return getGroupings(rowIndex);
    }

    switch (columnIndex)
    {
      case 0:
        return metaData.getDisplayName(Locale.getDefault());
      case 1:
        return computeFullValue(metaData);
      default:
        throw new IndexOutOfBoundsException();
    }
View Full Code Here

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

    }
  }

  public boolean isCellEditable(final int rowIndex, final int columnIndex)
  {
    final ReportPreProcessorPropertyMetaData metaData = getMetaData(rowIndex);
    if (metaData == null)
    {
      return false;
    }
View Full Code Here

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

  }


  public void setValueAt(final Object aValue, final int rowIndex, final int columnIndex)
  {
    final ReportPreProcessorPropertyMetaData metaData = getMetaData(rowIndex);
    if (metaData == null)
    {
      return;
    }
View Full Code Here

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

    }
  }

  public Class getClassForCell(final int rowIndex, final int columnIndex)
  {
    final ReportPreProcessorPropertyMetaData metaData = getMetaData(rowIndex);
    if (metaData == null)
    {
      return GroupingHeader.class;
    }

    switch (columnIndex)
    {
      case 0:
        return String.class;
      case 1:
        return metaData.getPropertyType();
      default:
        throw new IndexOutOfBoundsException();
    }
  }
View Full Code Here

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

    }
  }

  public PropertyEditor getEditorForCell(final int aRowIndex, final int aColumnIndex)
  {
    final ReportPreProcessorPropertyMetaData metaData = getMetaData(aRowIndex);
    if (metaData == null)
    {
      // a header row
      return null;
    }

    try
    {
      switch (aColumnIndex)
      {
        case 0:
          return null;
        case 1:
          final PropertyEditor editor = metaData.getEditor();
          if (editor != null)
          {
            return editor;
          }

          final Class editorClass = metaData.getBeanDescriptor().getPropertyEditorClass();
          if (editorClass != null)
          {
            return (PropertyEditor) editorClass.newInstance();
          }
         
          if (String.class.equals(metaData.getPropertyType()))
          {
            return null;
          }

          return FastPropertyEditorManager.findEditor(metaData.getPropertyType());
        default:
          throw new IndexOutOfBoundsException();
      }
    }
    catch (Exception e)
View Full Code Here

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

  {
    if (column != 1)
    {
      return null;
    }
    final ReportPreProcessorPropertyMetaData metaData = getMetaData(row);
    if (metaData == null)
    {
      return null;
    }
    return metaData.getPropertyRole();
  }
View Full Code Here

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

  {
    if (column == 0)
    {
      return null;
    }
    final ReportPreProcessorPropertyMetaData metaData = getMetaData(row);
    if (metaData == null)
    {
      return null;
    }
    return metaData.getExtraCalculationFields();
  }
View Full Code Here

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

    final String typeName = metaData.getName();

    final ReportPreProcessorPropertyMetaData[] styleMetaDatas = metaData.getPropertyDescriptions();
    for (int j = 0; j < styleMetaDatas.length; j++)
    {
      final ReportPreProcessorPropertyMetaData propertyMetaData = styleMetaDatas[j];
      final String propertyDisplayName = propertyMetaData.getDisplayName(locale);
      if (isValid(propertyDisplayName, propertyMetaData.getName(), missingProperties) == false)
      {
        logger.warn("ReportPreProcessorPropertyMetaData '" + typeName + ": Property " + propertyMetaData.getName() + ": No DisplayName");
      }

      final String propertyGrouping = propertyMetaData.getGrouping(locale);
      if (isValid(propertyGrouping, "Required", missingProperties) == false)
      {
        logger.warn("ReportPreProcessorPropertyMetaData '" + typeName + ": Property " + propertyMetaData.getName() + ": Grouping is not valid");
      }
      if (propertyMetaData.isDeprecated())
      {
        final String deprecateMessage = propertyMetaData.getDeprecationMessage(locale);
        if (isValid(deprecateMessage, "Deprecated", missingProperties) == false)
        {
          logger.warn(
              "ReportPreProcessorPropertyMetaData '" + typeName + ": Property " + propertyMetaData.getName() + ": No valid deprecate message");
        }
      }
    }
  }
View Full Code Here

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

        for (int i = 0; i < metaData.length; i++)
        {
          if (groupCount == 0)
          {
            groupCount = 1;
            final ReportPreProcessorPropertyMetaData firstdata = metaData[i];
            oldValue = firstdata.getGrouping(locale);
            continue;
          }

          final ReportPreProcessorPropertyMetaData data = metaData[i];
          final String grouping = data.getGrouping(locale);
          if ((ObjectUtilities.equal(oldValue, grouping)) == false)
          {
            oldValue = grouping;
            groupCount += 1;
          }
        }
      }

      final ReportPreProcessorPropertyMetaData[] groupedMetaData = new ReportPreProcessorPropertyMetaData[metaData.length + groupCount];
      this.groupings = new GroupingHeader[groupedMetaData.length];
      int targetIdx = 0;
      GroupingHeader group = null;
      for (int sourceIdx = 0; sourceIdx < metaData.length; sourceIdx++)
      {
        final ReportPreProcessorPropertyMetaData data = metaData[sourceIdx];
        if (sourceIdx == 0)
        {
          group = new GroupingHeader(data.getGrouping(locale));
          groupings[targetIdx] = group;
          targetIdx += 1;
        }
        else
        {
          final String newgroup = data.getGrouping(locale);
          if ((ObjectUtilities.equal(newgroup, group.getHeaderText())) == false)
          {
            group = new GroupingHeader(newgroup);
            groupings[targetIdx] = group;
            targetIdx += 1;
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.