org.pentaho.reporting.engine.classic.core.modules.output.table.xls.helper
Class HSSFCellStyleProducer

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.output.table.xls.helper.HSSFCellStyleProducer

public class HSSFCellStyleProducer
extends Object

The cellstyle producer converts the JFreeReport content into excel cell styles. This class is able to use the POI 2.0 features to build data cells.

Author:
Thomas Morgner

Constructor Summary
HSSFCellStyleProducer(org.apache.poi.ss.usermodel.Workbook workbook, boolean hardLimit, ExcelColorProducer colorProducer, ExcelColorProducer fontColorProducer)
          The class does the dirty work of creating the HSSF-objects.
 
Method Summary
 org.apache.poi.ss.usermodel.CellStyle createCellStyle(RenderBox element, CellBackground bg)
          Creates a HSSFCellStyle based on the given ExcelDataCellStyle.
 ExcelFontFactory getFontFactory()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HSSFCellStyleProducer

public HSSFCellStyleProducer(org.apache.poi.ss.usermodel.Workbook workbook,
                             boolean hardLimit,
                             ExcelColorProducer colorProducer,
                             ExcelColorProducer fontColorProducer)
The class does the dirty work of creating the HSSF-objects.

Parameters:
workbook - the workbook for which the styles should be created.
Method Detail

createCellStyle

public org.apache.poi.ss.usermodel.CellStyle createCellStyle(RenderBox element,
                                                             CellBackground bg)
Creates a HSSFCellStyle based on the given ExcelDataCellStyle. If a similiar cell style was previously generated, then reuse that cached result.

Parameters:
element - can be null for background only cells.
bg - the optional background style for the table cell.
Returns:
the generated or cached HSSFCellStyle.

getFontFactory

public ExcelFontFactory getFontFactory()