Package org.pentaho.reporting.engine.classic.core.modules.output.table.base

Examples of org.pentaho.reporting.engine.classic.core.modules.output.table.base.TableContentProducer


      throws ContentProcessingException
  {
    final TableLayoutProducer tableLayoutProducer = new TableLayoutProducer(metaData);
    tableLayoutProducer.update(logicalPage, false);
    final SheetLayout layout = tableLayoutProducer.getLayout();
    final TableContentProducer tcp = new TableContentProducer(layout, metaData);
    tcp.compute(logicalPage, false);
    try
    {
      // then add it to the layout-producer ..
      resultTable.validate(logicalPage, layout, tcp);
    }
View Full Code Here


    return new FastExcelFormattedDataBuilder(layout, backgroundCells, cellHeights, excelPrinter);
  }

  public void produceTemplate(final LogicalPageBox pageBox)
  {
    TableContentProducer contentProducer = TemplatingOutputProcessor.produceTableLayout(pageBox, sheetLayout, metaData);
    final SheetLayout sheetLayout = contentProducer.getSheetLayout();
    final int columnCount = contentProducer.getColumnCount();
    final int startRow = contentProducer.getFinishedRows();

    final int finishRow = contentProducer.getFilledRows();

    cellHeights = new long[finishRow - startRow];

    for (int row = startRow; row < finishRow; row++)
    {
      cellHeights[row - startRow] = sheetLayout.getRowHeight(row);

      for (short col = 0; col < columnCount; col++)
      {
        final CellMarker.SectionType sectionType = contentProducer.getSectionType(row, col);
        final RenderBox content = contentProducer.getContent(row, col);
        if (content == null)
        {
          final RenderBox backgroundBox = contentProducer.getBackground(row, col);
          final CellBackground background;
          if (backgroundBox != null)
          {
            background = cellBackgroundProducer.getBackgroundForBox
                (pageBox, sheetLayout, col, row, 1, 1, true, sectionType, backgroundBox);
          }
          else
          {
            background = cellBackgroundProducer.getBackgroundAt(pageBox, sheetLayout, col, row, true, sectionType);
          }
          if (background != null)
          {
            backgroundCells.add(new CellLayoutInfo(col, row, background));
          }
          continue;
        }

        if (content.isCommited() == false)
        {
          throw new InvalidReportStateException("Uncommited content encountered");
        }

        final long contentOffset = contentProducer.getContentOffset(row, col);
        final TableRectangle rect = sheetLayout.getTableBounds
            (content.getX(), content.getY() + contentOffset,
                content.getWidth(), content.getHeight(), null);
        if (rect.isOrigin(col, row) == false)
        {
View Full Code Here

    quoter = new CSVQuoter(separator.charAt(0));
  }

  public void produceTemplate(final LogicalPageBox pageBox)
  {
    TableContentProducer contentProducer = TemplatingOutputProcessor.produceTableLayout(pageBox, sheetLayout, metaData);

    final SheetLayout sheetLayout = contentProducer.getSheetLayout();
    final int columnCount = contentProducer.getColumnCount();
    final int lastColumn = columnCount - 1;

    final int startRow = contentProducer.getFinishedRows();
    final int finishRow = contentProducer.getFilledRows();
    StringWriter swriter = new StringWriter();
    PrintWriter writer = new PrintWriter(swriter);

    for (int row = startRow; row < finishRow; row++)
    {
      for (short col = 0; col < columnCount; col++)
      {
        final RenderBox content = contentProducer.getContent(row, col);
        if (content == null)
        {
          writer.print(quoter.getSeparator());
          continue;
        }

        if (content.isCommited() == false)
        {
          throw new InvalidReportStateException("Uncommited content encountered");
        }

        final long contentOffset = contentProducer.getContentOffset(row, col);
        final TableRectangle rectangle = sheetLayout.getTableBounds
            (content.getX(), content.getY() + contentOffset,
                content.getWidth(), content.getHeight(), null);
        if (rectangle.isOrigin(col, row) == false)
        {
View Full Code Here

    return new FastHtmlFormattedDataBuilder(gridLayout, htmlPrinter, recorder.getRecordedBounds());
  }

  public void produceTemplate(final LogicalPageBox pageBox)
  {
    TableContentProducer contentProducer = TemplatingOutputProcessor.produceTableLayout(pageBox, sheetLayout, metaData);
    final SheetLayout sheetLayout = contentProducer.getSheetLayout();
    final int columnCount = contentProducer.getColumnCount();
    final int startRow = contentProducer.getFinishedRows();

    final int finishRow = contentProducer.getFilledRows();

    gridLayout = new FastGridLayout();

    for (int row = startRow; row < finishRow; row++)
    {
      gridLayout.addRow(row - startRow, sheetLayout.getRowHeight(row));

      for (short col = 0; col < columnCount; col++)
      {
        final CellMarker.SectionType sectionType = contentProducer.getSectionType(row, col);
        final RenderBox content = contentProducer.getContent(row, col);
        if (content == null)
        {
          final RenderBox backgroundBox = contentProducer.getBackground(row, col);
          final CellBackground background;
          if (backgroundBox != null)
          {
            background = cellBackgroundProducer.getBackgroundForBox
                (pageBox, sheetLayout, col, row, 1, 1, true, sectionType, backgroundBox);
          }
          else
          {
            background = cellBackgroundProducer.getBackgroundAt(pageBox, sheetLayout, col, row, true, sectionType);
          }
          if (background != null)
          {
            gridLayout.addBackground(new CellLayoutInfo(col, row, background));
          }
          else
          {
            gridLayout.addBackground(new CellLayoutInfo(col, row, null));
          }
          continue;
        }

        if (content.isCommited() == false)
        {
          throw new InvalidReportStateException("Uncommited content encountered");
        }

        final long contentOffset = contentProducer.getContentOffset(row, col);
        final TableRectangle rect = sheetLayout.getTableBounds
            (content.getX(), content.getY() + contentOffset,
                content.getWidth(), content.getHeight(), null);
        if (rect.isOrigin(col, row) == false)
        {
View Full Code Here

    TableLayoutProducer currentLayout = new TableLayoutProducer(metaData, layout);
    currentLayout.update(pageBox.derive(true), false);
    currentLayout.pageCompleted();

    TableContentProducer contentProducer = new TableContentProducer(layout, metaData);
    contentProducer.compute(pageBox, false);
    return contentProducer;
  }
View Full Code Here

    final DebugOutputProcessorMetaData metaData = new DebugOutputProcessorMetaData();
    metaData.initialize(report.getConfiguration());
   
    final TableLayoutProducer tlb = new TableLayoutProducer(metaData);
    tlb.update(logicalPageBox, false);
    final TableContentProducer tcp = new TestTableContentProducer(tlb.getLayout(), metaData);
    tcp.compute(logicalPageBox, false);
//    final SheetLayout layout = tlb.getLayout();
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.output.table.base.TableContentProducer

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.