Examples of ExpressionCollection


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)
      {
        if (expressions.length > j + 1)
        {
          expressionCollection.removeExpression(j);
          expressionCollection.add(j + 1, expression);
          report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, expression);
          return new CompoundUndoEntry
              (new ExpressionRemoveUndoEntry(j, expression), new ExpressionAddedUndoEntry(j + 1, expression));
        }
      }
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 = 1; j < expressions.length; j++)
    {
      final Expression expression = expressions[j];
      if (element == expression)
      {
        expressionCollection.removeExpression(j);
        expressionCollection.add(j - 1, expression);

        report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, expression);
        return new CompoundUndoEntry
            (new ExpressionRemoveUndoEntry(j, expression), new ExpressionAddedUndoEntry(j - 1, expression));
      }
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 = 1; j < expressions.length; j++)
    {
      final Expression expression = expressions[j];
      if (element == expression)
      {
        expressionCollection.removeExpression(j);
        expressionCollection.add(0, expression);

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

    if (state == null)
    {
      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

    if (state == null)
    {
      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

    {
      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

  public static class ValidateChartPreProcessor extends AbstractReportPreProcessor
  {
    public SubReport performPreProcessing(final SubReport definition,
                                          final DefaultFlowController flowController) throws ReportProcessingException
    {
      final ExpressionCollection expressions = definition.getExpressions();
      for (int i = 0; i < expressions.size(); i+= 1)
      {
        if (expressions.getExpression(i) instanceof PieDataSetCollector)
        {
          fail("Found dataset collector, but we should not have one here");
        }
      }
      return definition;
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.