use of org.apache.poi.xssf.usermodel.XSSFColor in project Gargoyle by callakrsos.
the class ExcelUtil method applyColor.
private static void applyColor(Workbook createNewWorkBookXlsx, ExcelColDVO dvo, Cell createCell) {
Color backgroundColor = dvo.getBackgroundColor();
if (backgroundColor != null) {
XSSFCellStyle style = (XSSFCellStyle) createNewWorkBookXlsx.createCellStyle();
style.setFillPattern(CellStyle.SOLID_FOREGROUND);
style.setFillForegroundColor(new XSSFColor(backgroundColor));
createCell.setCellStyle(style);
}
}
Aggregations