@Override public void unsetSolidFill() { props.unsetSolidFill(); }
@Override public void setNoFill(boolean noFill) { CTShapeProperties props = getShapeProperties(); //unset solid and pattern fills if they are set if (props.isSetPattFill()) props.unsetPattFill(); if (props.isSetSolidFill()) props.unsetSolidFill(); props.setNoFill(CTNoFillProperties.Factory.newInstance()); }
@Override public void unsetSolidFill() { props.unsetSolidFill(); }
/** * Sets whether this shape is filled or transparent. * * @param noFill if true then no fill will be applied to the shape element. */ public void setNoFill(boolean noFill) { CTShapeProperties props = getShapeProperties(); //unset solid and pattern fills if they are set if (props.isSetPattFill()) props.unsetPattFill(); if (props.isSetSolidFill()) props.unsetSolidFill(); props.setNoFill(CTNoFillProperties.Factory.newInstance()); }
@Override public void setNoFill(boolean noFill) { CTShapeProperties props = getShapeProperties(); //unset solid and pattern fills if they are set if (props.isSetPattFill()) props.unsetPattFill(); if (props.isSetSolidFill()) props.unsetSolidFill(); props.setNoFill(CTNoFillProperties.Factory.newInstance()); }
/** * 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 */ public void setFillColor(Color color) { CTShapeProperties spPr = getSpPr(); if (color == null) { if (spPr.isSetSolidFill()) spPr.unsetSolidFill(); if (!spPr.isSetNoFill()) spPr.addNewNoFill(); } else { if (spPr.isSetNoFill()) spPr.unsetNoFill(); 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); if(fill.isSetHslClr()) fill.unsetHslClr(); if(fill.isSetPrstClr()) fill.unsetPrstClr(); if(fill.isSetSchemeClr()) fill.unsetSchemeClr(); if(fill.isSetScrgbClr()) fill.unsetScrgbClr(); if(fill.isSetSysClr()) fill.unsetSysClr(); } }