@Override public CTSolidColorFillProperties addNewSolidFill() { return props.addNewSolidFill(); }
/** * Specifies a solid color fill. The shape is filled entirely with the * specified color. * * @param color * the solid color fill. The value of <code>null</code> unsets * the solidFIll attribute from the underlying xml */ @Override public void setFillColor(Color color) { CTTableCellProperties spPr = getCellProperties(true); if (color == null) { if (spPr.isSetSolidFill()) { spPr.unsetSolidFill(); } } else { CTSolidColorFillProperties fill = spPr.isSetSolidFill() ? spPr.getSolidFill() : spPr.addNewSolidFill(); XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr()); c.setColor(color); } }
@Override public CTSolidColorFillProperties addNewSolidFill() { return props.addNewSolidFill(); }
/** * Specifies a solid color fill. The shape is filled entirely with the specified color. * * @param color the solid color fill. * The value of <code>null</code> unsets the solidFIll attribute from the underlying xml */ @Override public void setFillColor(Color color) { CTTableCellProperties spPr = getXmlObject().getTcPr(); if (color == null) { if(spPr.isSetSolidFill()) spPr.unsetSolidFill(); } else { CTSolidColorFillProperties fill = spPr.isSetSolidFill() ? spPr.getSolidFill() : spPr.addNewSolidFill(); CTSRgbColor rgb = CTSRgbColor.Factory.newInstance(); rgb.setVal(new byte[]{(byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue()}); fill.setSrgbClr(rgb); } }
/** * Specifies a solid color fill. The shape is filled entirely with the * specified color. * * @param color * the solid color fill. The value of <code>null</code> unsets * the solidFIll attribute from the underlying xml */ @Override public void setFillColor(Color color) { CTTableCellProperties spPr = getCellProperties(true); if (color == null) { if (spPr.isSetSolidFill()) { spPr.unsetSolidFill(); } } else { CTSolidColorFillProperties fill = spPr.isSetSolidFill() ? spPr.getSolidFill() : spPr.addNewSolidFill(); XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr()); c.setColor(color); } }