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

Examples of org.pentaho.reporting.engine.classic.core.util.IntList


    final Integer[] levels = levelList.getLevelsDescendingArray();
    this.levelData = new LevelStorage[levels.length];
    final int expressionsCount = levelList.size();

    final int capacity = Math.min(20, expressionsCount);
    final IntList expressionPositions = new IntList(capacity);
    final IntList activeExpressions = new IntList(capacity);
    final IntList functions = new IntList(capacity);
    final IntList pageEventListeners = new IntList(capacity);
    final IntList prepareEventListeners = new IntList(capacity);
    final boolean prepareEventListener = false;

    for (int i = 0; i < levels.length; i++)
    {
      final int currentLevel = levels[i].intValue();
      final Integer[] data = (Integer[])
          levelList.getElementArrayForLevel(currentLevel, ExpressionDataRow.EMPTY_INTEGERARRAY);
      for (int x = 0; x < data.length; x++)
      {
        final Integer position = data[x];
        final Expression ex = this.expressions[position.intValue()];
        final int globalPosition = position.intValue();

        expressionPositions.add(globalPosition);
        activeExpressions.add(globalPosition);
        if (ex instanceof Function == false)
        {
          continue;
        }

        functions.add(globalPosition);
        if (ex instanceof PageEventListener)
        {
          pageEventListeners.add(globalPosition);
        }
      }

      levelData[i] = new LevelStorage(currentLevel,
          expressionPositions.toArray(), activeExpressions.toArray(),
          functions.toArray(), pageEventListeners.toArray(),
          prepareEventListeners.toArray());

      expressionPositions.clear();
      activeExpressions.clear();
      functions.clear();
      pageEventListeners.clear();
      prepareEventListeners.clear();

      this.prepareEventListener = prepareEventListener;
    }
  }
View Full Code Here


        }
        else
        {
          stateList = new DefaultPageStateList(this);
        }
        physicalMapping = new IntList(40);
        logicalMapping = new IntList(20);
        AbstractReportProcessor.logger.debug("Pagination started ..");
        state = processPaginationLevel(state, stateList, maxRows);
      }
      else
      {
View Full Code Here

  }

  public static IntList computeColumnToAxisMapping(final Axis[] axes, final int[] axesMembers,
                                                   final int columnCount, final int startAxis)
  {
    IntList columnToAxisPosition = new IntList(columnCount);
    for (int axesIndex = axes.length - 1; axesIndex >= startAxis; axesIndex -= 1)
    {
      int memberCntAxis = axesMembers[axesIndex];
      for (int x = 0; x < memberCntAxis; x += 1)
      {
        columnToAxisPosition.add(axesIndex);
      }
    }
    return columnToAxisPosition;
  }
View Full Code Here

            }
            else
            {
              stateList = new DefaultPageStateList(this);
            }
            physicalMapping = new IntList(40);
            logicalMapping = new IntList(20);
            AbstractReportProcessor.logger.debug("Pagination started ..");
            state = processPaginationLevel(state, stateList, maxRows);
          }
          else
          {
View Full Code Here

    if (currentTable.getSectionRenderBox() != box)
    {
      return;
    }

    final IntList rowSpans = currentTable.rowSpans;
    int missingRows = 0;
    for (int i = 0; i < rowSpans.size(); i++)
    {
      final int value = rowSpans.get(i);
      if (missingRows < value)
      {
        missingRows = value;
      }
    }
View Full Code Here

    if (currentTable.getSectionRenderBox() == null)
    {
      return;
    }

    final IntList rowSpans = currentTable.rowSpans;
    int maxRowSpan = 0;
    for (int i = 0; i < rowSpans.size(); i++)
    {
      final int value = rowSpans.get(i);
      maxRowSpan = Math.max(maxRowSpan, value);
    }

    for (int i = 0; i < rowSpans.size(); i++)
    {
      final int value = rowSpans.get(i);
      rowSpans.set(i, Math.max(0, value - 1));
    }
  }
View Full Code Here

    public TableInfoStructure(final TableRenderBox table, final TableInfoStructure parent)
    {
      this.table = table;
      this.parent = parent;
      this.columnModel = table.getColumnModel();
      this.rowSpans = new IntList(10);
    }
View Full Code Here

    final Integer[] levels = levelList.getLevelsDescendingArray();
    final LevelStorageBackend[] levelData = new LevelStorageBackend[levels.length];
    final int expressionsCount = levelList.size();

    final int capacity = Math.min(20, expressionsCount);
    final IntList activeExpressions = new IntList(capacity);
    final IntList functions = new IntList(capacity);
    final IntList pageEventListeners = new IntList(capacity);

    for (int i = 0; i < levels.length; i++)
    {
      final int currentLevel = levels[i].intValue();
      final Integer[] data = (Integer[])
          levelList.getElementArrayForLevel(currentLevel, EMPTY_INTEGERARRAY);
      for (int x = 0; x < data.length; x++)
      {
        final Integer position = data[x];
        final Expression ex = expressions[position.intValue()];
        final int globalPosition = position.intValue();

        if (ex instanceof Function == false)
        {
          if (ex.getName() != null)
          {
            activeExpressions.add(globalPosition);
          }
          continue;
        }

        activeExpressions.add(globalPosition);
        functions.add(globalPosition);
        if (ex instanceof PageEventListener)
        {
          pageEventListeners.add(globalPosition);
        }
      }

      levelData[i] = new LevelStorageBackend(currentLevel,
          activeExpressions.toArray(),
          functions.toArray(), pageEventListeners.toArray());

      activeExpressions.clear();
      functions.clear();
      pageEventListeners.clear();
    }

    return levelData;
  }
View Full Code Here

  private int currentGroupIndex;

  public DefaultGroupSizeRecorder()
  {
    counts = new HashMap<GroupKey, Integer>();
    groupCounts = new IntList(100);
    groupCounts.add(0);
    currentGroupIndex = -1;
    keys = new FastStack<GroupKey>();
  }
View Full Code Here

  }

  public static IntList computeColumnToAxisMapping(final List<CellSetAxis> axes, final int[] axesMembers,
                                                   final int columnCount, final int startAxis)
  {
    IntList columnToAxisPosition = new IntList(columnCount);
    for (int axesIndex = axes.size() - 1; axesIndex >= startAxis; axesIndex -= 1)
    {
      int memberCntAxis = axesMembers[axesIndex];
      for (int x = 0; x < memberCntAxis; x += 1)
      {
        columnToAxisPosition.add(axesIndex);
      }
    }
    return columnToAxisPosition;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.util.IntList

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.