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

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


      final StructureFunction[] functions = definition.getStructureFunctions();
      boolean hasOverrideFunction = false;
      for (int i = 0; i < functions.length; i++)
      {
        final StructureFunction function = functions[i];
        if (function instanceof WizardOverrideFormattingFunction)
        {
          hasOverrideFunction = true;
          break;
        }
View Full Code Here


    final StructureFunction[] structureFunctions = getStructureFunctions();
    final ArrayList newProcessors = new ArrayList(Math.max(10, structureFunctions.length));
    for (int i = 0; i < structureFunctions.length; i++)
    {
      final StructureFunction structureFunction = structureFunctions[i];
      newProcessors.add(structureFunction);
    }
    newProcessors.add(function);

    final StructureFunction[] newArray =
View Full Code Here

    final StructureFunction[] structureFunctions = getStructureFunctions();
    final ArrayList newProcessors = new ArrayList(Math.max(10, structureFunctions.length));
    boolean found = false;
    for (int i = 0; i < structureFunctions.length; i++)
    {
      final StructureFunction structureFunction = structureFunctions[i];
      if (found || structureFunction != f)
      {
        newProcessors.add(structureFunction);
        found = true;
      }
View Full Code Here

      throw new NullPointerException();
    }
    final StructureFunction[] collectionFunctions = lp.getCollectionFunctions();
    for (int i = 0; i < collectionFunctions.length; i++)
    {
      final StructureFunction function = collectionFunctions[i];
      if (function.getDependencyLevel() == Integer.MAX_VALUE)
      {
        // this indicates a structural-preprocessor function, like the CrosstabNormalizer. They do not
        // take part in the ordinary processing.
        continue;
      }

      levels.add(IntegerCache.getInteger(function.getDependencyLevel()));
    }
    levels.add(IntegerCache.getInteger(LayoutProcess.LEVEL_PAGINATE));

    final Expression[] expressions = report.getMasterRow().getExpressionDataRow().getExpressions();
    for (int i = 0; i < expressions.length; i++)
View Full Code Here

  {
  }

  public int compare(final Object o1, final Object o2)
  {
    final StructureFunction s1 = (StructureFunction) o1;
    final StructureFunction s2 = (StructureFunction) o2;

    final int dL1 = s1.getDependencyLevel();
    final int dL2 = s2.getDependencyLevel();
    if (dL1 > dL2)
    {
      return -1;
    }
    if (dL1 < dL2)
    {
      return 1;
    }

    final int priority1 = s1.getProcessingPriority();
    final int priority2 = s2.getProcessingPriority();
    if (priority1 < priority2)
    {
      return -1;
    }
    if (priority1 > priority2)
View Full Code Here

    {
      this.hasPageListener = false;
    }
    for (int i = 0; i < collectionFunctions.length; i++)
    {
      final StructureFunction fn = collectionFunctions[i];
      if (fn instanceof PageEventListener)
      {
        this.collectionFunctionIsPageListener[i] = true;
        this.hasPageListener = true;
      }
View Full Code Here

    final int type = event.getType();

    final ExpressionRuntime[] oldRuntimes = new ExpressionRuntime[collectionFunctions.length];
    for (int i = 0; i < collectionFunctions.length; i++)
    {
      final StructureFunction function = collectionFunctions[i];
      oldRuntimes[i] = function.getRuntime();
    }

    if (inlineDataRowRuntime == null)
    {
      inlineDataRowRuntime = new InlineDataRowRuntime();
    }
    inlineDataRowRuntime.setState(event.getState());

    for (int i = 0; i < collectionFunctions.length; i++)
    {
      final StructureFunction function = collectionFunctions[i];
      function.setRuntime(inlineDataRowRuntime);
    }

    try
    {
      // first check the flagged events: Prepare, Page-Start, -end, cancel and rollback
      // before heading for the unflagged events ..

      if ((type & ReportEvent.PAGE_STARTED) == ReportEvent.PAGE_STARTED)
      {
        firePageStartedEvent(event);
      }
      else if ((type & ReportEvent.PAGE_FINISHED) == ReportEvent.PAGE_FINISHED)
      {
        firePageFinishedEvent(event);
      }
      else if ((type & ReportEvent.ITEMS_ADVANCED) == ReportEvent.ITEMS_ADVANCED)
      {
        fireItemsAdvancedEvent(event);
      }
      else if ((type & ReportEvent.ITEMS_FINISHED) == ReportEvent.ITEMS_FINISHED)
      {
        fireItemsFinishedEvent(event);
      }
      else if ((type & ReportEvent.ITEMS_STARTED) == ReportEvent.ITEMS_STARTED)
      {
        fireItemsStartedEvent(event);
      }
      else if ((type & ReportEvent.GROUP_FINISHED) == ReportEvent.GROUP_FINISHED)
      {
        fireGroupFinishedEvent(event);
      }
      else if ((type & ReportEvent.GROUP_STARTED) == ReportEvent.GROUP_STARTED)
      {
        fireGroupStartedEvent(event);
      }
      else if ((type & ReportEvent.REPORT_INITIALIZED) == ReportEvent.REPORT_INITIALIZED)
      {
        fireReportInitializedEvent(event);
      }
      else if ((type & ReportEvent.REPORT_DONE) == ReportEvent.REPORT_DONE)
      {
        fireReportDoneEvent(event);
      }
      else if ((type & ReportEvent.REPORT_FINISHED) == ReportEvent.REPORT_FINISHED)
      {
        fireReportFinishedEvent(event);
      }
      else if ((type & ReportEvent.REPORT_STARTED) == ReportEvent.REPORT_STARTED)
      {
        fireReportStartedEvent(event);
      }
      else
      {
        throw new IllegalArgumentException();
      }
    }
    finally
    {
      for (int i = 0; i < collectionFunctions.length; i++)
      {
        final StructureFunction function = collectionFunctions[i];
        function.setRuntime(oldRuntimes[i]);
      }
    }

    if (parent != null)
    {
View Full Code Here

  {
    final int activeLevel = event.getState().getLevel();

    for (int i = 0; i < collectionFunctions.length; i++)
    {
      final StructureFunction function = collectionFunctions[i];
      if (activeLevel <= function.getDependencyLevel())
      {
        function.itemsAdvanced(event);
      }
    }
  }
View Full Code Here

  {
    final int activeLevel = event.getState().getLevel();

    for (int i = 0; i < collectionFunctions.length; i++)
    {
      final StructureFunction function = collectionFunctions[i];
      if (activeLevel <= function.getDependencyLevel())
      {
        function.itemsStarted(event);
      }
    }
  }
View Full Code Here

  {
    final int activeLevel = event.getState().getLevel();

    for (int i = 0; i < collectionFunctions.length; i++)
    {
      final StructureFunction function = collectionFunctions[i];
      if (activeLevel <= function.getDependencyLevel())
      {
        function.itemsFinished(event);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.function.StructureFunction

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.