Package org.pentaho.reporting.libraries.base.util

Examples of org.pentaho.reporting.libraries.base.util.GenericObjectTable


  private GenericObjectTable createRowHeaders()
  {
    final Axis[] axes = this.resultSet.getAxes();
    if (axes.length < 2)
    {
      return new GenericObjectTable();
    }
    final Axis axis = axes[AXIS_ROW];
    final List<Position> positions = axis.getPositions();
    final int rowCount = positions.size();
    final GenericObjectTable result = new GenericObjectTable(Math.max(1, rowCount), 5);

    for (int r = 0; r < rowCount; r++)
    {
      final Position position = positions.get(r);
      Member member = null;
      final int colCount = position.size();
      for (int c = 0; c < colCount; c++)
      {
        member = position.get(c);
        result.setObject(r, c, member.getName());
      }
      if (member != null)
      {
        result.setObject(r, colCount, member.getHierarchy().getName());
      }
    }
    return result;
  }
View Full Code Here


  private GenericObjectTable createRowHeaders()
  {
    final List<CellSetAxis> axes = this.resultSet.getAxes();
    if (axes.size() < 2)
    {
      return new GenericObjectTable();
    }
    final CellSetAxis axis = axes.get(AXIS_ROW);
    final List<Position> positions = axis.getPositions();
    final int rowCount = positions.size();
    final GenericObjectTable result = new GenericObjectTable(Math.max(1, rowCount), 5);

    for (int r = 0; r < rowCount; r++)
    {
      final Position position = positions.get(r);
      final List<Member> members = position.getMembers();
      Member member = null;
      final int colCount = members.size();
      for (int c = 0; c < colCount; c++)
      {
        member = members.get(c);
        result.setObject(r, c, member.getName());
      }
      if (member != null)
      {
        result.setObject(r, colCount, member.getHierarchy().getName());
      }
    }
    return result;
  }
View Full Code Here

  private GenericObjectTable createColumnHeaders()
  {
    final List<CellSetAxis> axes = this.resultSet.getAxes();
    if (axes.size() < 1)
    {
      return new GenericObjectTable();
    }
    final CellSetAxis axis = axes.get(AXIS_COLUMN);
    final List<Position> positions = axis.getPositions();
    final int colCount = positions.size();
    final GenericObjectTable result = new GenericObjectTable(20, Math.max(1, colCount));
    for (int c = 0; c < colCount; c++)
    {
      final Position position = positions.get(c);
      final List<Member> memberList = position.getMembers();
      Member member = null;
      final int rowCount = memberList.size();
      for (int r = 0; r < rowCount; r++)
      {
        member = memberList.get(r);
        if (member != null)
        {
          result.setObject(r, c, member.getName());
        }
      }

      if (member != null)
      {
        result.setObject(rowCount, c, member.getHierarchy().getName());
      }
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.util.GenericObjectTable

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.