@Override public boolean isSetSolidFill() { return props.isSetSolidFill(); }
public XDDFColor getFontColor() { XDDFSolidFillProperties solid = findDefinedProperty(props -> props.isSetSolidFill(), props -> props.getSolidFill()) .map(props -> new XDDFSolidFillProperties(props)) .orElse(new XDDFSolidFillProperties()); return solid.getColor(); }
public Color getFontColor(){ CTTextCharacterProperties rPr = getRPr(); if(rPr.isSetSolidFill()){ CTSolidColorFillProperties fill = rPr.getSolidFill(); if(fill.isSetSrgbClr()){ CTSRgbColor clr = fill.getSrgbClr(); byte[] rgb = clr.getVal(); return new Color(0xFF & rgb[0], 0xFF & rgb[1], 0xFF & rgb[2]); } } return new Color(0, 0, 0); }
public void setFontColor(Color color){ CTTextCharacterProperties rPr = getRPr(); CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill(); CTSRgbColor clr = fill.isSetSrgbClr() ? fill.getSrgbClr() : fill.addNewSrgbClr(); clr.setVal(new byte[]{(byte)color.getRed(), (byte)color.getGreen(), (byte)color.getBlue()}); 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(); }
@Override public void setFontColor(PaintStyle color) { if (!(color instanceof SolidPaint)) { LOG.log(POILogger.WARN, "Currently only SolidPaint is supported!"); return; } SolidPaint sp = (SolidPaint)color; Color c = DrawPaint.applyColorTransform(sp.getSolidColor()); CTTextCharacterProperties rPr = getRPr(true); CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill(); XSLFColor col = new XSLFColor(fill, getParentParagraph().getParentShape().getSheet().getTheme(), fill.getSchemeClr()); col.setColor(c); }
props.unsetPattFill(); if (props.isSetSolidFill()) { props.unsetSolidFill();
CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill(); org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor xlsColor = pr.getColorArray(0); if (xlsColor.isSetRgb()) {
@Override public boolean isSetSolidFill() { return props.isSetSolidFill(); }
public Color getFontColor(){ CTTextCharacterProperties rPr = getRPr(); if(rPr.isSetSolidFill()){ CTSolidColorFillProperties fill = rPr.getSolidFill(); if(fill.isSetSrgbClr()){ CTSRgbColor clr = fill.getSrgbClr(); byte[] rgb = clr.getVal(); return new Color(0xFF & rgb[0], 0xFF & rgb[1], 0xFF & rgb[2]); } } return new Color(0, 0, 0); }
public XDDFColor getFontColor() { XDDFSolidFillProperties solid = findDefinedProperty(props -> props.isSetSolidFill(), props -> props.getSolidFill()) .map(props -> new XDDFSolidFillProperties(props)) .orElse(new XDDFSolidFillProperties()); return solid.getColor(); }
public void setFontColor(Color color){ CTTextCharacterProperties rPr = getRPr(); CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill(); CTSRgbColor clr = fill.isSetSrgbClr() ? fill.getSrgbClr() : fill.addNewSrgbClr(); clr.setVal(new byte[]{(byte)color.getRed(), (byte)color.getGreen(), (byte)color.getBlue()}); 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(); }
public void setFontColor(Color color){ CTTextCharacterProperties rPr = getRPr(); CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill(); CTSRgbColor clr = fill.isSetSrgbClr() ? fill.getSrgbClr() : fill.addNewSrgbClr(); clr.setVal(new byte[]{(byte)color.getRed(), (byte)color.getGreen(), (byte)color.getBlue()}); 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(); }
@Override public void setFontColor(PaintStyle color) { if (!(color instanceof SolidPaint)) { LOG.log(POILogger.WARN, "Currently only SolidPaint is supported!"); return; } SolidPaint sp = (SolidPaint)color; Color c = DrawPaint.applyColorTransform(sp.getSolidColor()); CTTextCharacterProperties rPr = getRPr(true); CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill(); XSLFColor col = new XSLFColor(fill, getParentParagraph().getParentShape().getSheet().getTheme(), fill.getSchemeClr()); col.setColor(c); }
props.unsetPattFill(); if (props.isSetSolidFill()) { props.unsetSolidFill();
CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill(); org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor xlsColor = pr.getColorArray(0); if(xlsColor.isSetRgb()) {
CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill(); org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor xlsColor = pr.getColorArray(0); if (xlsColor.isSetRgb()) {