/** * Set text color. * * @param rgbStr - the desired color, in the hex form "RRGGBB". */ public void setColor(String rgbStr) { CTRPr pr = getRunProperties(true); CTColor color = pr.isSetColor() ? pr.getColor() : pr.addNewColor(); color.setVal(rgbStr); }
/** * Get text color. The returned value is a string in the hex form "RRGGBB". */ public String getColor() { String color = null; if (run.isSetRPr()) { CTRPr pr = getRunProperties(false); if (pr != null && pr.isSetColor()) { CTColor clr = pr.getColor(); color = clr.xgetVal().getStringValue(); } } return color; }
/** * Set text color. * * @param rgbStr - the desired color, in the hex form "RRGGBB". */ public void setColor(String rgbStr) { CTRPr pr = getRunProperties(true); CTColor color = pr.isSetColor() ? pr.getColor() : pr.addNewColor(); color.setVal(rgbStr); }
/** * Get text color. The returned value is a string in the hex form "RRGGBB". */ public String getColor() { String color = null; if (run.isSetRPr()) { CTRPr pr = getRunProperties(false); if (pr != null && pr.isSetColor()) { CTColor clr = pr.getColor(); color = clr.xgetVal().getStringValue(); } } return color; }
/** * Get text color. The returned value is a string in the hex form "RRGGBB". */ public String getColor() { String color = null; if (run.isSetRPr()) { CTRPr pr = run.getRPr(); if (pr.isSetColor()) { CTColor clr = pr.getColor(); color = clr.xgetVal().getStringValue(); } } return color; }
/** * Set text color. * @param rgbStr - the desired color, in the hex form "RRGGBB". */ public void setColor(String rgbStr) { CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr(); CTColor color = pr.isSetColor() ? pr.getColor() : pr.addNewColor(); color.setVal(rgbStr); }