List of usage examples for org.apache.poi.xssf.usermodel XSSFCellStyle getFillForegroundColorColor
@Override
public XSSFColor getFillForegroundColorColor()
From source file:com.vaadin.addon.spreadsheet.XSSFColorConverter.java
License:Open Source License
@Override public void defaultColorStyles(CellStyle cellStyle, StringBuilder sb) { XSSFCellStyle cs = (XSSFCellStyle) cellStyle; XSSFColor fillForegroundColorColor = cs.getFillForegroundColorColor(); XSSFColor fillBackgroundColorColor = cs.getFillBackgroundColorColor(); defaultBackgroundColor = styleColor(fillForegroundColorColor); defaultBackgroundColor = styleColor(fillBackgroundColorColor); if (defaultBackgroundColor == null) { defaultBackgroundColor = "rgba(255,255,255,1.0);"; }/*from ww w . j a v a2s . co m*/ sb.append("background-color:"); sb.append(defaultBackgroundColor); XSSFColor xssfColor = cs.getFont().getXSSFColor(); defaultColor = styleColor(xssfColor); if (defaultColor == null) { defaultColor = "rgba(0,0,0,1.0);"; } sb.append("color:"); sb.append(defaultColor); }