use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor in project poi by apache.
the class XSSFBorderFormatting method setTopBorderColor.
@Override
public void setTopBorderColor(short color) {
CTColor ctColor = CTColor.Factory.newInstance();
ctColor.setIndexed(color);
setTopBorderColor(ctColor);
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor in project poi by apache.
the class XSSFBorderFormatting method setHorizontalBorderColor.
public void setHorizontalBorderColor(short color) {
CTColor ctColor = CTColor.Factory.newInstance();
ctColor.setIndexed(color);
setHorizontalBorderColor(ctColor);
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor in project poi by apache.
the class XSSFBorderFormatting method setDiagonalBorderColor.
@Override
public void setDiagonalBorderColor(short color) {
CTColor ctColor = CTColor.Factory.newInstance();
ctColor.setIndexed(color);
setDiagonalBorderColor(ctColor);
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor in project poi by apache.
the class TestXSSFCellFill method testGetFillBackgroundColor.
@Test
public void testGetFillBackgroundColor() {
CTFill ctFill = CTFill.Factory.newInstance();
XSSFCellFill cellFill = new XSSFCellFill(ctFill, null);
CTPatternFill ctPatternFill = ctFill.addNewPatternFill();
CTColor bgColor = ctPatternFill.addNewBgColor();
assertNotNull(cellFill.getFillBackgroundColor());
bgColor.setIndexed(2);
assertEquals(2, cellFill.getFillBackgroundColor().getIndexed());
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor in project poi by apache.
the class TestXSSFCellFill method testGetFillForegroundColor.
@Test
public void testGetFillForegroundColor() {
CTFill ctFill = CTFill.Factory.newInstance();
XSSFCellFill cellFill = new XSSFCellFill(ctFill, null);
CTPatternFill ctPatternFill = ctFill.addNewPatternFill();
CTColor fgColor = ctPatternFill.addNewFgColor();
assertNotNull(cellFill.getFillForegroundColor());
fgColor.setIndexed(8);
assertEquals(8, cellFill.getFillForegroundColor().getIndexed());
}
Aggregations