public class HSSFCellStyleProducer extends Object implements CellStyleProducer
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected static short |
convertAlignment(ElementAlignment e)
Converts the given element alignment into one of the HSSFCellStyle-constants.
|
org.apache.poi.ss.usermodel.CellStyle |
createCellStyle(InstanceID id,
StyleSheet element,
CellBackground bg)
Creates a HSSFCellStyle based on the given ExcelDataCellStyle.
|
ExcelFontFactory |
getFontFactory() |
protected static short |
translateStroke(BorderStyle borderStyle,
long widthRaw)
Tries to translate the given stroke width into one of the predefined excel border styles.
|
public HSSFCellStyleProducer(org.apache.poi.ss.usermodel.Workbook workbook, boolean hardLimit, ExcelColorProducer colorProducer, ExcelColorProducer fontColorProducer)
workbook
- the workbook for which the styles should be created.public org.apache.poi.ss.usermodel.CellStyle createCellStyle(InstanceID id, StyleSheet element, CellBackground bg)
createCellStyle
in interface CellStyleProducer
element
- can be null for background only cells.bg
- the optional background style for the table cell.protected static short convertAlignment(ElementAlignment e)
e
- the JFreeReport element alignment.IllegalArgumentException
- if an Unknown JFreeReport alignment is given.protected static short translateStroke(BorderStyle borderStyle, long widthRaw)
widthRaw
- the AWT-Stroke-Width.public ExcelFontFactory getFontFactory()
getFontFactory
in interface CellStyleProducer
Copyright © 2017 Hitachi Vantara. All rights reserved.