private String getBorderColor(Border border) { final CTBorder b = getTblBorder(false, border); return (b != null) ? (b.isSetColor() ? b.xgetColor().getStringValue() : null) : null; }
/** * Get cell color. Note that this method only returns the "fill" value. * * @return RGB string of cell color */ public String getColor() { String color = null; CTTcPr tcpr = ctTc.getTcPr(); if (tcpr != null) { CTShd ctshd = tcpr.getShd(); if (ctshd != null) { color = ctshd.xgetFill().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 = getRunProperties(false); if (pr != null && pr.isSetColor()) { CTColor clr = pr.getColor(); color = clr.xgetVal().getStringValue(); } } return color; }
public static String getColor( STHexColor color ) { if ( color != null ) { if ( !"auto".equals( color.getStringValue() ) ) { return color.getStringValue(); } } return null; }
public static Color getColor( STHexColor hexColor, Object val, boolean background ) { if ( hexColor == null ) { return null; } return getColor( hexColor.getStringValue(), val, background ); }
public static Color getColor( STHexColor hexColor, Object val, boolean background ) { if ( hexColor == null ) { return null; } return getColor( hexColor.getStringValue(), val, background ); }
private String getBorderColor(Border border) { final CTBorder b = getTblBorder(false, border); return (b != null) ? (b.isSetColor() ? b.xgetColor().getStringValue() : null) : null; }
/** * Get cell color. Note that this method only returns the "fill" value. * @return RGB string of cell color */ public String getColor() { String color = null; CTTcPr tcpr = ctTc.getTcPr(); if (tcpr != null) { CTShd ctshd = tcpr.getShd(); if (ctshd != null) { color = ctshd.xgetFill().getStringValue(); } } return color; }
/** * Get cell color. Note that this method only returns the "fill" value. * * @return RGB string of cell color */ public String getColor() { String color = null; CTTcPr tcpr = ctTc.getTcPr(); if (tcpr != null) { CTShd ctshd = tcpr.getShd(); if (ctshd != null) { color = ctshd.xgetFill().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 = 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; }
public String getInsideVBorderColor() { String color = null; CTTblPr tblPr = getTrPr(); if (tblPr.isSetTblBorders()) { CTTblBorders ctb = tblPr.getTblBorders(); if (ctb.isSetInsideV()) { CTBorder border = ctb.getInsideV(); color = border.xgetColor().getStringValue(); } } return color; }
public String getInsideHBorderColor() { String color = null; CTTblPr tblPr = getTrPr(); if (tblPr.isSetTblBorders()) { CTTblBorders ctb = tblPr.getTblBorders(); if (ctb.isSetInsideH()) { CTBorder border = ctb.getInsideH(); color = border.xgetColor().getStringValue(); } } return color; }
private StyleBorder createBorder( CTBorder docxBorder, BorderType borderType ) { if ( docxBorder == null ) { return null; } StyleBorder styleBorder = new StyleBorder( docxBorder.getVal().toString(), borderType ); // XXX semi point ? styleBorder.setWidth( docxBorder.getSz() ); STHexColor hexColor = docxBorder.xgetColor(); Color bc = ColorRegistry.getInstance().getColor( "0x" + hexColor.getStringValue() ); styleBorder.setColor( bc ); return styleBorder; }
private StyleBorder createBorder( CTBorder docxBorder, BorderType borderType ) { if ( docxBorder == null ) { return null; } StyleBorder styleBorder = new StyleBorder( docxBorder.getVal().toString(), borderType ); // XXX semi point ? styleBorder.setWidth( docxBorder.getSz() ); STHexColor hexColor = docxBorder.xgetColor(); Color bc = ColorRegistry.getInstance().getColor( "0x" + hexColor.getStringValue() ); styleBorder.setColor( bc ); return styleBorder; }
+ bottom.xgetColor().getStringValue() ); cssStyleSheet.setCSSProperty( BORDER_LEFT_COLOR, "#" + left.xgetColor().getStringValue() ); cssStyleSheet.setCSSProperty( BORDER_TOP_COLOR, "#" + top.xgetColor().getStringValue() ); cssStyleSheet.setCSSProperty( BORDER_RIGHT_COLOR, "#" + right.xgetColor().getStringValue() );
String strText = hexColor.getStringValue();
String strText = hexColor.getStringValue();
if ( shd != null ) hexColor = shd.xgetFill().getStringValue();