Examples of ExpressionCollection


Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

    {
      throw new NullPointerException();
    }


    final ExpressionCollection exp = state.getReport().getExpressions();
    final ExpressionRegistry registry = ExpressionRegistry.getInstance();
    for (int i = 0; i < exp.size(); i++)
    {
      final Expression expression = exp.getExpression(i);
      if (registry.isExpressionRegistered(expression.getClass().getName()) == false)
      {
        continue;
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

    {
      throw new NullPointerException();
    }


    final ExpressionCollection exp = state.getReport().getExpressions();
    final ExpressionRegistry registry = ExpressionRegistry.getInstance();
    for (int i = 0; i < exp.size(); i++)
    {
      final Expression expression = exp.getExpression(i);
      if (registry.isExpressionRegistered(expression.getClass().getName()) == false)
      {
        continue;
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

    this.reportFooter = new ReportFooter();
    this.pageHeader = new PageHeader();
    this.pageFooter = new PageFooter();
    this.watermark = new Watermark();

    this.expressions = new ExpressionCollection();
    registerAsChild(rootGroup);
    registerAsChild(reportHeader);
    registerAsChild(reportFooter);
    registerAsChild(pageHeader);
    registerAsChild(pageFooter);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

   *
   * @return the functions.
   */
  private ExpressionCollection createFunctions()
  {
    final ExpressionCollection functions = new ExpressionCollection();

    final ItemSumFunction sum = new ItemSumFunction();
    sum.setName("sum");
    sum.setField("Population");
    sum.setGroup("Continent Group");
    functions.add(sum);

    final RowBandingFunction backgroundTrigger = new RowBandingFunction();
    backgroundTrigger.setName("backgroundTrigger");
    functions.add(backgroundTrigger);

    return functions;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

    for (int i = 0; i < size; i++)
    {
      inspectDataSource(designerContext, reportRenderContext, resultHandler, columnNames, dataFactory);
    }

    final ExpressionCollection expressions = reportDefinition.getExpressions();
    final Expression[] expressionsArray = expressions.getExpressions();
    for (int i = 0; i < expressionsArray.length; i++)
    {
      final Expression expression = expressionsArray[i];
      inspectExpression(designerContext, reportRenderContext, resultHandler, columnNames, expression);
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

  }

  private static UndoEntry deleteExpression(final ReportDocumentContext context, final Object data)
  {
    final AbstractReportDefinition report = context.getReportDefinition();
    final ExpressionCollection expressionCollection = report.getExpressions();
    final int count = expressionCollection.size();
    for (int i = 0; i < count; i++)
    {
      final Expression definitionEntry = expressionCollection.getExpression(i);
      if (definitionEntry == data)
      {
        expressionCollection.removeExpression(i);
        report.notifyNodeChildRemoved(definitionEntry);
        return new ExpressionRemoveUndoEntry(i, definitionEntry);
      }
    }
    return null;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

    }

    if (data instanceof Expression)
    {
      final AbstractReportDefinition report = context.getReportDefinition();
      final ExpressionCollection expressionCollection = report.getExpressions();
      final int count = expressionCollection.size();
      for (int i = 0; i < count; i++)
      {
        final Expression definitionEntry = expressionCollection.getExpression(i);
        if (definitionEntry == data)
        {
          return definitionEntry.getInstance();
        }
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

      }
      return indexOf(getDataFactoryColumns(), node.getFieldName());
    }
    if (parent == reportFunctionNode)
    {
      final ExpressionCollection expressionCollection = getExpressions();
      for (int i = 0; i < expressionCollection.size(); i++)
      {
        final Expression dataFactory = expressionCollection.getExpression(i);
        if (dataFactory == child)
        {
          return i;
        }
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

    else
    {
      final RowBandingFunction instance = (RowBandingFunction) function.getInstance();
      if (dialog.performEdit(instance))
      {
        final ExpressionCollection expressionCollection = report.getExpressions();
        final int idx = expressionCollection.indexOf(function);
        expressionCollection.set(idx, instance);
        activeContext.getUndo().addChange(ActionMessages.getString("EditRowBandingAction.Text"),
            new ExpressionEditUndoEntry(idx, function, instance));
        report.fireModelLayoutChanged(report, ReportModelEvent.NODE_PROPERTIES_CHANGED, instance);
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.ExpressionCollection

    return null;
  }

  protected UndoEntry moveExpressions(final AbstractReportDefinition report, final Object element)
  {
    final ExpressionCollection expressionCollection = report.getExpressions();
    final Expression[] expressions = expressionCollection.getExpressions();
    for (int j = 0; j < expressions.length - 1; j++)
    {
      final Expression expression = expressions[j];
      if (element == expression)
      {
        expressionCollection.removeExpression(j);
        expressionCollection.add(expression);

        report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, expression);
        return new CompoundUndoEntry(new ExpressionRemoveUndoEntry(j, expression),
                new ExpressionAddedUndoEntry(expressionCollection.getExpressions().length-1, expression));
      }
    }
    return null;
  }
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.