Examples of StyleMetaData


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

                                        final ReportElement element,
                                        final StyleKey styleKey,
                                        final Expression expression,
                                        final ExpressionMetaData expressionMetaData)
  {
    final StyleMetaData styleDescription = element.getMetaData().getStyleDescription(styleKey);
    if (styleDescription != null && styleDescription.isDeprecated())
    {
      final String message = styleDescription.getDeprecationMessage(Locale.getDefault());
      resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
          Messages.getString("DeprecatedUsagesInspection.StyleExpressionTargetDeprecated",
              element.getName(), styleDescription.getDisplayName(Locale.getDefault()), message),
          new StyleLocationInfo(element, styleKey, true)));
    }

    if (expressionMetaData == null)
    {
      return;
    }

    if (expressionMetaData.isDeprecated() == false)
    {
      return;
    }
    final String message = expressionMetaData.getDeprecationMessage(Locale.getDefault());
    if (styleDescription != null)
    {
      resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
          Messages.getString("DeprecatedUsagesInspection.StyleExpressionDeprecated",
              element.getName(), styleDescription.getDisplayName(Locale.getDefault()), message),
          new StyleLocationInfo(element, styleKey, true)));
    }
    else
    {
      resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
View Full Code Here

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

      {
        String oldValue = null;

        for (int i = 0; i < metaData.length; i++)
        {
          final StyleMetaData data = metaData[i];
          if (data.isHidden())
          {
            continue;
          }
          if (WorkspaceSettings.getInstance().isShowExpertItems() == false && data.isExpert())
          {
            continue;
          }
          if (WorkspaceSettings.getInstance().isShowDeprecatedItems() == false && data.isDeprecated())
          {
            continue;
          }

          metaDataCount += 1;

          if (groupCount == 0)
          {
            groupCount = 1;
            final StyleMetaData firstdata = metaData[i];
            oldValue = firstdata.getGrouping(locale);
            continue;
          }

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

      final StyleMetaData[] groupedMetaData = new StyleMetaData[metaDataCount + groupCount];
      int targetIdx = 0;
      GroupingHeader[] groupings = new GroupingHeader[groupedMetaData.length];
      GroupingHeader group = null;
      for (int sourceIdx = 0; sourceIdx < metaData.length; sourceIdx++)
      {
        final StyleMetaData data = metaData[sourceIdx];
        if (data.isHidden())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowExpertItems() == false && data.isExpert())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowDeprecatedItems() == false && data.isDeprecated())
        {
          continue;
        }

        if (targetIdx == 0)
        {
          group = new GroupingHeader(data.getGrouping(locale));
          groupings[targetIdx] = group;
          targetIdx += 1;
        }
        else
        {
          final String newgroup = data.getGrouping(locale);
          //noinspection ConstantConditions
          if ((ObjectUtilities.equal(newgroup, group.getHeaderText())) == false)
          {
            group = new GroupingHeader(newgroup);
            groupings[targetIdx] = group;
View Full Code Here

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

    {
      final Element element = elements[elementIdx];
      final StyleMetaData[] datas = element.getMetaData().getStyleDescriptions();
      for (int styleIdx = 0; styleIdx < datas.length; styleIdx++)
      {
        final StyleMetaData data = datas[styleIdx];
        final String name = data.getName();

        if (data.isHidden())
        {
          attributes.put(name, Boolean.FALSE);
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowExpertItems() == false && data.isExpert())
        {
          attributes.put(name, Boolean.FALSE);
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowDeprecatedItems() == false && data.isDeprecated())
        {
          attributes.put(name, Boolean.FALSE);
          continue;
        }
View Full Code Here

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

    }
  }

  public Object getValueAt(final int rowIndex, final int columnIndex)
  {
    final StyleMetaData metaData = getMetaData(rowIndex);
    if (metaData == null)
    {
      return getGroupings(rowIndex);
    }
    switch (columnIndex)
View Full Code Here

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

    }
  }

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

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

    }
  }

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

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

    return lastElement;
  }

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

    switch (columnIndex)
    {
      case 0:
        return GroupedName.class;
      case 1:
        return Boolean.class;
      case 2:
        return metaData.getTargetType();
      case 3:
        return Expression.class;
      default:
        throw new IndexOutOfBoundsException();
    }
View Full Code Here

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

    }
  }

  public PropertyEditor getEditorForCell(final int rowIndex, final int columnIndex)
  {
    final StyleMetaData metaData = getMetaData(rowIndex);
    if (metaData == null)
    {
      return null;
    }
View Full Code Here

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

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

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

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

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

      }

      final MetaData metaData = crosstabOption.getMetaData();
      if (metaData instanceof StyleMetaData)
      {
        final StyleMetaData attributeMetaData = (StyleMetaData) metaData;
        if (key.equals(attributeMetaData.getStyleKey()))
        {
          crosstabOption.setValue(value);
          fireTableCellUpdated(i, 1);
          return;
        }
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.