public interface ColorConverter extends Serializable
This interface has been created because the POI implementations differ quite a lot.
| 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 borderSide,
String attribute,
org.apache.poi.ss.usermodel.BorderFormatting format)
Returns CSS border definitions for the given conditional formatting rule
|
String |
getBorderColorCSS(org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder.BorderSide borderSide,
String attribute,
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 cs)
Returns true if the given cell style has a background color.
|
void colorStyles(org.apache.poi.ss.usermodel.CellStyle cellStyle,
StringBuilder sb)
cellStyle - The cell style.sb - to write the styles inString getBorderColorCSS(org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder.BorderSide borderSide, String attribute, org.apache.poi.ss.usermodel.CellStyle cellStyle)
borderSide - Which side the border should goattribute - What type of border style we want (solid, dashed..)cellStyle - Style for the cellString getBorderColorCSS(org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder.BorderSide borderSide, String attribute, org.apache.poi.ss.usermodel.BorderFormatting format)
borderSide - Which side the border should goattribute - What type of border style we want (solid, dashed..)format - the active formattingvoid defaultColorStyles(org.apache.poi.ss.usermodel.CellStyle cellStyle,
StringBuilder sb)
cellStyle - The cell stylesb - to write the styles inboolean hasBackgroundColor(org.apache.poi.ss.usermodel.CellStyle cs)
cs - String getBackgroundColorCSS(org.apache.poi.ss.usermodel.ConditionalFormattingRule rule)
rule - Formatting rulenull if no
color matches.String getFontColorCSS(org.apache.poi.ss.usermodel.ConditionalFormattingRule rule)
rule - Formatting rulenull if no
color matches.Copyright © 2013–2026 Vaadin Ltd. All rights reserved.