/** * Set the vertical alignment of the cell. * * @param vAlign - the desired alignment enum value */ public void setVerticalAlignment(XWPFVertAlign vAlign) { CTTcPr tcpr = getTcPr(); CTVerticalJc va = tcpr.addNewVAlign(); va.setVal(alignMap.get(vAlign)); }
private CTTblWidth getTcWidth() { CTTcPr tcPr = getTcPr(); return tcPr.isSetTcW() ? tcPr.getTcW() : tcPr.addNewTcW(); }
/** * Set cell color. This sets some associated values; for finer control * you may want to access these elements individually. * * @param rgbStr - the desired cell color, in the hex form "RRGGBB". */ public void setColor(String rgbStr) { CTTcPr tcpr = getTcPr(); CTShd ctshd = tcpr.isSetShd() ? tcpr.getShd() : tcpr.addNewShd(); ctshd.setColor("auto"); ctshd.setVal(STShd.CLEAR); ctshd.setFill(rgbStr); }
/** * Set the vertical alignment of the cell. * * @param vAlign - the desired alignment enum value */ public void setVerticalAlignment(XWPFVertAlign vAlign) { CTTcPr tcpr = getTcPr(); CTVerticalJc va = tcpr.addNewVAlign(); va.setVal(alignMap.get(vAlign)); }
private CTTblWidth getTcWidth() { CTTcPr tcPr = getTcPr(); return tcPr.isSetTcW() ? tcPr.getTcW() : tcPr.addNewTcW(); }
/** * Set cell color. This sets some associated values; for finer control * you may want to access these elements individually. * * @param rgbStr - the desired cell color, in the hex form "RRGGBB". */ public void setColor(String rgbStr) { CTTcPr tcpr = getTcPr(); CTShd ctshd = tcpr.isSetShd() ? tcpr.getShd() : tcpr.addNewShd(); ctshd.setColor("auto"); ctshd.setVal(STShd.CLEAR); ctshd.setFill(rgbStr); }