public void styleColor(Formatter out, String attr, Color color) { XSSFColor xSSFColor = (XSSFColor) color; if (color == null || xSSFColor.isAuto()) return; byte[] rgb = xSSFColor.getRgb(); if (rgb == null) { return; } out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]); } }
@Override public void styleColor(Formatter out, String attr, Color color) { XSSFColor xSSFColor = (XSSFColor) color; if (color == null || xSSFColor.isAuto()) { return; } byte[] rgb = xSSFColor.getRGB(); if (rgb == null) { return; } out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]); } }
public void styleColor(Formatter out, String attr, Color color) { XSSFColor xSSFColor = (XSSFColor) color; if (color == null || xSSFColor.isAuto()) return; byte[] rgb = xSSFColor.getRGB(); if (rgb == null) { return; } out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]); } }
public void styleColor(Formatter out, String attr, Color color) { XSSFColor xSSFColor = (XSSFColor) color; if (color == null || xSSFColor.isAuto()) return; byte[] rgb = xSSFColor.getRgb(); if (rgb == null) { return; } out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]); } }
private void styleColor(Formatter out, String attr, XSSFColor color) { if (color == null || color.isAuto()) { return; } byte[] rgb = color.getRGB(); if (rgb == null) { return; } // This is done twice -- rgba is new with CSS 3, and browser that don't // support it will ignore the rgba specification and stick with the // solid color, which is declared first out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]); byte[] argb = color.getARGB(); if (argb == null) { return; } out.format(" %s: rgba(0x%02x, 0x%02x, 0x%02x, 0x%02x);%n", attr, argb[3], argb[0], argb[1], argb[2]); } }
protected Border createBorder(Rectangle fillArea, XSSFCellBorder.BorderSide borderSide, XSSFCellStyle cellStyle) { DashPattern pattern = getBorderPattern(cellStyle, borderSide); float width = getBorderWidth(getBorderStyle(cellStyle, borderSide)); Line line = getBorderLine(fillArea, borderSide); ColorHelper helper = node.getColorHelper(); XSSFColor borderColor = cellStyle.getBorderColor(borderSide); Color color = helper == null || borderColor.isAuto() ? Color.BLACK : helper.getAwtColor(borderColor); return new Border(color, line, pattern, width); }