use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPatternFill in project poi by apache.
the class XSSFCellFill method setFillForegroundColor.
/**
* Set the foreground fill color represented as a {@link XSSFColor} value.
*
* @param color - the color to use
*/
public void setFillForegroundColor(XSSFColor color) {
CTPatternFill ptrn = ensureCTPatternFill();
ptrn.setFgColor(color.getCTColor());
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPatternFill in project poi by apache.
the class XSSFCellFill method setPatternType.
/**
* set the fill pattern
*
* @param patternType fill pattern to use
*/
public void setPatternType(STPatternType.Enum patternType) {
CTPatternFill ptrn = ensureCTPatternFill();
ptrn.setPatternType(patternType);
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPatternFill in project poi by apache.
the class XSSFCellFill method getFillBackgroundColor.
/**
* Get the background fill color.
*
* @return fill color, null if color is not set
*/
public XSSFColor getFillBackgroundColor() {
CTPatternFill ptrn = _fill.getPatternFill();
if (ptrn == null)
return null;
CTColor ctColor = ptrn.getBgColor();
return ctColor == null ? null : new XSSFColor(ctColor, _indexedColorMap);
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPatternFill in project poi by apache.
the class XSSFCellFill method getFillForegroundColor.
/**
* Get the foreground fill color.
*
* @return XSSFColor - foreground color. null if color is not set
*/
public XSSFColor getFillForegroundColor() {
CTPatternFill ptrn = _fill.getPatternFill();
if (ptrn == null)
return null;
CTColor ctColor = ptrn.getFgColor();
return ctColor == null ? null : new XSSFColor(ctColor, _indexedColorMap);
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPatternFill in project poi by apache.
the class XSSFCellFill method setFillBackgroundColor.
/**
* Set the background fill color represented as a {@link XSSFColor} value.
*
* @param color
*/
public void setFillBackgroundColor(XSSFColor color) {
CTPatternFill ptrn = ensureCTPatternFill();
ptrn.setBgColor(color.getCTColor());
}
Aggregations