public XDDFColor getBulletColor() { if (props.isSetBuClr()) { return XDDFColor.forColorContainer(props.getBuClr()); } else { return null; } }
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuClr()){ XSLFColor c = new XSLFColor(props.getBuClr(), theme, null); setValue(c.getColor()); return true; } return false; } };
/** * Set the color to be used on bullet characters within a given paragraph. * * @param color the bullet color */ public void setBulletFontColor(Color color){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTColor c = pr.isSetBuClr() ? pr.getBuClr() : pr.addNewBuClr(); CTSRgbColor clr = c.isSetSrgbClr() ? c.getSrgbClr() : c.addNewSrgbClr(); clr.setVal(new byte[]{(byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue()}); }
/** * Set the color to be used on bullet characters within a given paragraph. * * @param color the bullet color */ @SuppressWarnings("WeakerAccess") public void setBulletFontColor(PaintStyle color) { if (!(color instanceof SolidPaint)) { throw new IllegalArgumentException("Currently XSLF only supports SolidPaint"); } // TODO: implement setting bullet color to null SolidPaint sp = (SolidPaint)color; Color col = DrawPaint.applyColorTransform(sp.getSolidColor()); CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTColor c = pr.isSetBuClr() ? pr.getBuClr() : pr.addNewBuClr(); CTSRgbColor clr = c.isSetSrgbClr() ? c.getSrgbClr() : c.addNewSrgbClr(); clr.setVal(new byte[]{(byte) col.getRed(), (byte) col.getGreen(), (byte) col.getBlue()}); }
public XDDFColor getBulletColor() { if (props.isSetBuClr()) { return XDDFColor.forColorContainer(props.getBuClr()); } else { return null; } }
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuClr()){ XSLFColor c = new XSLFColor(props.getBuClr(), theme, null); setValue(c.getColor()); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuClr()){ XSLFColor c = new XSLFColor(props.getBuClr(), theme, null); setValue(c.getColor()); return true; } return false; } };
/** * Set the color to be used on bullet characters within a given paragraph. * * @param color the bullet color */ public void setBulletFontColor(Color color){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTColor c = pr.isSetBuClr() ? pr.getBuClr() : pr.addNewBuClr(); CTSRgbColor clr = c.isSetSrgbClr() ? c.getSrgbClr() : c.addNewSrgbClr(); clr.setVal(new byte[]{(byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue()}); }
/** * Set the color to be used on bullet characters within a given paragraph. * * @param color the bullet color */ public void setBulletFontColor(Color color){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTColor c = pr.isSetBuClr() ? pr.getBuClr() : pr.addNewBuClr(); CTSRgbColor clr = c.isSetSrgbClr() ? c.getSrgbClr() : c.addNewSrgbClr(); clr.setVal(new byte[]{(byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue()}); }
/** * Set the color to be used on bullet characters within a given paragraph. * * @param color the bullet color */ @SuppressWarnings("WeakerAccess") public void setBulletFontColor(PaintStyle color) { if (!(color instanceof SolidPaint)) { throw new IllegalArgumentException("Currently XSLF only supports SolidPaint"); } // TODO: implement setting bullet color to null SolidPaint sp = (SolidPaint)color; Color col = DrawPaint.applyColorTransform(sp.getSolidColor()); CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTColor c = pr.isSetBuClr() ? pr.getBuClr() : pr.addNewBuClr(); CTSRgbColor clr = c.isSetSrgbClr() ? c.getSrgbClr() : c.addNewSrgbClr(); clr.setVal(new byte[]{(byte) col.getRed(), (byte) col.getGreen(), (byte) col.getBlue()}); }