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

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


    }

    this.sheetLayout = sheetLayout;
    this.maximumHeight = sheetLayout.getMaxHeight();
    this.maximumWidth = sheetLayout.getMaxWidth();
    this.contentBackend = new GenericObjectTable(Math.max(1, sheetLayout.getRowCount()), Math.max(1,
        sheetLayout.getColumnCount()));
    this.contentBackend.ensureCapacity(sheetLayout.getRowCount(), sheetLayout.getColumnCount());
  }
View Full Code Here


    this(10, 10);
  }

  public TypedTableModel(final int rowIncrement, final int columnIncrement)
  {
    data = new GenericObjectTable(Math.max(1, rowIncrement), Math.max(1, columnIncrement));
    columnNames = new ArrayList(columnIncrement);
    columnClasses = new ArrayList(columnIncrement);
  }
View Full Code Here

        columnAttributes.add(attributes);
      }

      if (metaTableModel.isCellDataAttributesSupported())
      {
        cellAttributes = new GenericObjectTable(Math.max(1,model.getRowCount()), Math.max(1,model.getColumnCount()));
        for (int row = 0; row < model.getRowCount(); row += 1)
        {
          for (int columns = 0; columns < model.getColumnCount(); columns += 1)
          {
            final DefaultDataAttributes attributes = new DefaultDataAttributes();
            attributes.merge(metaTableModel.getCellDataAttributes(row, columns), dataAttributeContext);
            cellAttributes.setObject(row, columns, attributes);
          }
        }
      }

      final DefaultDataAttributes attributes = new DefaultDataAttributes();
      attributes.merge(metaTableModel.getTableAttributes(), dataAttributeContext);
      tableAttributes = attributes;
    }
    else
    {
      for (int i = 0; i < model.getColumnCount(); i++)
      {
        final String columnName = model.getColumnName(i);
        final Class columnType = model.getColumnClass(i);
        final DefaultDataAttributes attributes = new DefaultDataAttributes();
        attributes.setMetaAttribute(MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.NAME,
            new DefaultConceptQueryMapper(), columnName);
        attributes.setMetaAttribute(MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.TYPE,
            new DefaultConceptQueryMapper(), columnType);
        columnAttributes.add(attributes);
      }
      tableAttributes = EmptyDataAttributes.INSTANCE;
    }

    cellValues = new GenericObjectTable(Math.max(1,model.getRowCount()), Math.max(1,model.getColumnCount()));
    for (int row = 0; row < model.getRowCount(); row += 1)
    {
      for (int columns = 0; columns < model.getColumnCount(); columns += 1)
      {
        cellValues.setObject(row, columns, model.getValueAt(row, columns));
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

  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 Axis[] axes = this.resultSet.getAxes();
    if (axes.length < 1)
    {
      return new GenericObjectTable();
    }
    final Axis axis = axes[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);
      Member member = null;
      final int rowCount = position.size();
      for (int r = 0; r < rowCount; r++)
      {
        member = position.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

  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

      // try to find all valid column names
      // visit all entries and add the names as we find them
      final NodeList rows = evaluateNodeList(xPath, xPathExpression, xmlResource, resourceManager);
      final HashMap columnNamesToPositionMap = new HashMap();
      final int rowCount = rows.getLength();
      data = new GenericObjectTable(Math.max(1, rowCount), Math.max(1, columnTypes.size()));
      logger.debug("Processing " + rowCount + " rows");

      for (int row = 0; row < rowCount; row++)
      {
View Full Code Here

      // try to find all valid column names
      // visit all entries and add the names as we find them
      final NodeList rows = evaluateNodeList(xPath, xPathExpression, xmlResource, resourceManager);
      final HashMap<String,Integer> columnNamesToPositionMap = new HashMap<String,Integer>();
      final int rowCount = rows.getLength();
      data = new GenericObjectTable(Math.max(1, rowCount), Math.max(1, columnTypes.size()));
      logger.debug("Processing " + rowCount + " rows");

      for (int row = 0; row < rowCount; row++)
      {
View Full Code Here

  private GenericObjectTable createColumnHeaders()
  {
    final Axis[] axes = this.resultSet.getAxes();
    if (axes.length < 1)
    {
      return new GenericObjectTable();
    }
    final Axis axis = axes[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);
      Member member = null;
      final int rowCount = position.size();
      for (int r = 0; r < rowCount; r++)
      {
        member = position.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.