public class HSSFColorConverter extends Object implements ColorConverter
| Constructor and Description |
|---|
HSSFColorConverter(org.apache.poi.hssf.usermodel.HSSFWorkbook wb) |
| Modifier and Type | Method and Description |
|---|---|
void |
colorStyles(org.apache.poi.ss.usermodel.CellStyle cellStyle,
StringBuilder sb)
Creates the appropriate CSS text and background style for the given cell
style.
|
void |
defaultColorStyles(org.apache.poi.ss.usermodel.CellStyle cellStyle,
StringBuilder sb)
Writes the default background and foreground colors as CSS styles from
the given cell style to the given string buffer.
|
String |
getBackgroundColorCSS(org.apache.poi.ss.usermodel.ConditionalFormattingRule rule)
Create a CSS color string for the background in the given rule.
|
String |
getBorderColorCSS(org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder.BorderSide right,
String attribute,
org.apache.poi.ss.usermodel.BorderFormatting borderFormatting)
Returns CSS border definitions for the given conditional formatting rule
|
String |
getBorderColorCSS(org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder.BorderSide borderSide,
String attr,
org.apache.poi.ss.usermodel.CellStyle cellStyle)
Returns CSS border definitions for the given cell style
|
String |
getFontColorCSS(org.apache.poi.ss.usermodel.ConditionalFormattingRule rule)
Create a CSS color string for the font in the given rule.
|
boolean |
hasBackgroundColor(org.apache.poi.ss.usermodel.CellStyle cellStyle)
Returns true if the given cell style has a background color.
|
public HSSFColorConverter(org.apache.poi.hssf.usermodel.HSSFWorkbook wb)
public String getBorderColorCSS(org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder.BorderSide borderSide, String attr, org.apache.poi.ss.usermodel.CellStyle cellStyle)
ColorConvertergetBorderColorCSS in interface ColorConverterborderSide - Which side the border should goattr - What type of border style we want (solid, dashed..)cellStyle - Style for the cellpublic void colorStyles(org.apache.poi.ss.usermodel.CellStyle cellStyle,
StringBuilder sb)
ColorConvertercolorStyles in interface ColorConvertercellStyle - The cell style.sb - to write the styles inpublic void defaultColorStyles(org.apache.poi.ss.usermodel.CellStyle cellStyle,
StringBuilder sb)
ColorConverterdefaultColorStyles in interface ColorConvertercellStyle - The cell stylesb - to write the styles inpublic boolean hasBackgroundColor(org.apache.poi.ss.usermodel.CellStyle cellStyle)
ColorConverterhasBackgroundColor in interface ColorConverterpublic String getBackgroundColorCSS(org.apache.poi.ss.usermodel.ConditionalFormattingRule rule)
ColorConvertergetBackgroundColorCSS in interface ColorConverterrule - Formatting rulenull if no
color matches.public String getFontColorCSS(org.apache.poi.ss.usermodel.ConditionalFormattingRule rule)
ColorConvertergetFontColorCSS in interface ColorConverterrule - Formatting rulenull if no
color matches.public String getBorderColorCSS(org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder.BorderSide right, String attribute, org.apache.poi.ss.usermodel.BorderFormatting borderFormatting)
ColorConvertergetBorderColorCSS in interface ColorConverterright - Which side the border should goattribute - What type of border style we want (solid, dashed..)borderFormatting - the active formattingCopyright © 2013–2026 Vaadin Ltd. All rights reserved.