com.jrefinery.report.targets.table.excel
Class ExcelFontFactory

java.lang.Object
  |
  +--com.jrefinery.report.targets.table.excel.ExcelFontFactory

public class ExcelFontFactory
extends java.lang.Object

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

Author:
Heiko Evermann

Constructor Summary
ExcelFontFactory(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
          Constructor for ExcelFontFactory.
 
Method Summary
 org.apache.poi.hssf.usermodel.HSSFFont getExcelFont(FontDefinition font, java.awt.Color forecolor)
          Creates a HSSFFont.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelFontFactory

public ExcelFontFactory(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
Constructor for ExcelFontFactory.

Parameters:
workbook - the workbook.
Method Detail

getExcelFont

public org.apache.poi.hssf.usermodel.HSSFFont getExcelFont(FontDefinition font,
                                                           java.awt.Color forecolor)
Creates a HSSFFont. The created font is cached and reused later, if a similiar font is requested.

Parameters:
font - the font definition.
forecolor - the font color
Returns:
the created or a cached HSSFFont