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

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


    {
      throw new NullPointerException();
    }

    super.init(metaData, resourceManager);
    this.cellBackgroundProducer = new CellBackgroundProducer
        (metaData.isFeatureSupported(AbstractTableOutputProcessor.TREAT_ELLIPSE_AS_RECTANGLE),
            metaData.isFeatureSupported(OutputProcessorFeature.UNALIGNED_PAGEBANDS));
  }
View Full Code Here


      DefaultHtmlContentGenerator contentGenerator = getContentGenerator();
      XmlWriter xmlWriter;

      if (documentContentItem == null)
      {
        this.cellBackgroundProducer = new CellBackgroundProducer
            (metaData.isFeatureSupported(AbstractTableOutputProcessor.TREAT_ELLIPSE_AS_RECTANGLE),
                metaData.isFeatureSupported(OutputProcessorFeature.UNALIGNED_PAGEBANDS));
        initialize(metaData.getConfiguration());

        documentContentItem = contentLocation.createItem(contentNameGenerator.generateName(null, "text/html"));
View Full Code Here

  private String name;
  private CellBackgroundProducer cellBackgroundProducer;

  public ResultTable()
  {
    this.cellBackgroundProducer = new CellBackgroundProducer(true, true);
  }
View Full Code Here

  public static void print(final LogicalPageBox logicalPage,
                           final SheetLayout sheetLayout,
                           final TableContentProducer contentProducer)
  {
    final CellBackgroundProducer cellBackgroundProducer = new CellBackgroundProducer(true, true);
    try
    {
      final DefaultTagDescription tagDescription = new DefaultTagDescription();
      tagDescription.setNamespaceHasCData(null, false);
      final XmlWriter writer = new XmlWriter(new OutputStreamWriter(System.out), tagDescription);

      writer.writeComment("Table Layout: ");
      writer.writeComment("Rows: " + sheetLayout.getRowCount());
      writer.writeComment("Columns: " + sheetLayout.getColumnCount());
      final int rows = sheetLayout.getRowCount();
      final int cols = sheetLayout.getColumnCount();
      writer.writeTag(null, "table", XmlWriter.OPEN);
      for (int row = 0; row < rows; row++)
      {
        writer.writeTag(null, "row", XmlWriter.OPEN);
        for (int col = 0; col < cols; col++)
        {
          final RenderBox content = contentProducer.getContent(row, col);
          final CellMarker.SectionType sectionType = contentProducer.getSectionType(row, col);
          if (content == null)
          {
            final CellBackground bg =
                cellBackgroundProducer.getBackgroundAt(logicalPage, sheetLayout, col, row, true, sectionType);
            if (bg == null)
            {
              writer.writeTag(null, "empty-cell", XmlWriter.CLOSE);
            }
            else
            {
              final AttributeList attList = computeCellAttributes(bg);
              writer.writeTag(null, "cell", attList, XmlWriter.CLOSE);
            }
            continue;
          }

          final long contentOffset = contentProducer.getContentOffset(row, col);

          final long colPos = sheetLayout.getXPosition(col);
          final long rowPos = sheetLayout.getYPosition(row);
          if (content.getX() != colPos || (content.getY() + contentOffset) != rowPos)
          {
            // A spanned cell ..
            writer.writeTag(null, "covered-cell", XmlWriter.CLOSE);
            continue;
          }

          final CellBackground bg =
              cellBackgroundProducer.getBackgroundAt(logicalPage, sheetLayout, col, row, true, sectionType);
          final AttributeList attList = computeCellAttributes(bg);
          writer.writeTag(null, "cell", attList, XmlWriter.CLOSE);
        }
        writer.writeCloseTag();
      }
View Full Code Here

    this.metaData = metaData;
    this.sheetLayout = sheetLayout;
    this.excelPrinter = excelPrinter;
    this.layout = new HashMap<InstanceID,CellLayoutInfo>();
    this.backgroundCells = new ArrayList<CellLayoutInfo>();
    this.cellBackgroundProducer = new CellBackgroundProducer
            (metaData.isFeatureSupported(AbstractTableOutputProcessor.TREAT_ELLIPSE_AS_RECTANGLE),
                metaData.isFeatureSupported(OutputProcessorFeature.UNALIGNED_PAGEBANDS));
  }
View Full Code Here

  {
    this.metaData = metaData;
    this.sheetLayout = sheetLayout;
    this.htmlPrinter = htmlPrinter;
    this.recorder = new Recorder();
    this.cellBackgroundProducer = new CellBackgroundProducer
            (metaData.isFeatureSupported(AbstractTableOutputProcessor.TREAT_ELLIPSE_AS_RECTANGLE),
                metaData.isFeatureSupported(OutputProcessorFeature.UNALIGNED_PAGEBANDS));
  }
View Full Code Here

TOP

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

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.