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

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

public class ExcelFontFactory
extends Object

This class keeps track of all fonts that we have used so far in our Excel file.

Excel fonts should never be created directly, as excel does not like the idea of having too many font definitions.

Author:
Heiko Evermann

Constructor Summary
ExcelFontFactory(org.apache.poi.ss.usermodel.Workbook workbook, ExcelColorProducer colorProducer)
          Constructor for ExcelFontFactory.
 
Method Summary
 org.apache.poi.ss.usermodel.Font getExcelFont(HSSFFontWrapper wrapper)
          Creates a HSSFFont.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelFontFactory

public ExcelFontFactory(org.apache.poi.ss.usermodel.Workbook workbook,
                        ExcelColorProducer colorProducer)
Constructor for ExcelFontFactory.

Parameters:
workbook - the workbook.
Method Detail

getExcelFont

public org.apache.poi.ss.usermodel.Font getExcelFont(HSSFFontWrapper wrapper)
Creates a HSSFFont. The created font is cached and reused later, if a similiar font is requested.

Parameters:
wrapper - the font information that should be used to produce the excel font
Returns:
the created or a cached HSSFFont instance