/** * 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; }
public static String getColor( CTRPr rPr ) { if ( rPr != null ) { CTColor ctColor = rPr.getColor(); if ( ctColor != null ) { STHexColor color = ctColor.xgetVal(); return XWPFUtils.getColor( color ); } } return null; }
public static Color getColor( CTParaRPr rPr ) { if ( rPr != null ) { CTColor ctColor = rPr.getColor(); if ( ctColor != null ) { STHexColor color = ctColor.xgetVal(); Object val = ctColor.getVal(); return ColorHelper.getColor( color, val, false ); } } return null; }
public static Color getColor( CTParaRPr rPr ) { if ( rPr != null ) { CTColor ctColor = rPr.getColor(); if ( ctColor != null ) { STHexColor color = ctColor.xgetVal(); Object val = ctColor.getVal(); return ColorHelper.getColor( color, val, false ); } } return null; }
public static Color getColor( CTRPr rPr ) { if ( rPr != null ) { CTColor ctColor = rPr.getColor(); if ( ctColor != null ) { STHexColor color = ctColor.xgetVal(); Object val = ctColor.getVal(); return ColorHelper.getColor( color, val, false ); } // else // { // return ColorHelper.getColor( rPr.getShd() ); // } } return null; }
public static Color getColor( CTRPr rPr ) { if ( rPr != null ) { CTColor ctColor = rPr.getColor(); if ( ctColor != null ) { STHexColor color = ctColor.xgetVal(); Object val = ctColor.getVal(); return ColorHelper.getColor( color, val, false ); } // else // { // return ColorHelper.getColor( rPr.getShd() ); // } } return null; }
/** * 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; }
STHexColor hexColor = ctColor.xgetVal(); String strText = hexColor.getStringValue();
STHexColor hexColor = ctColor.xgetVal(); String strText = hexColor.getStringValue();