TableCellProperties { public Color getBackgroundColor() { String property = mElement.getFoBackgroundColorAttribute(); Color color = null; try { color = Color.valueOf(property); } catch (Exception e) { Logger.getLogger(TableCellProperties.class.getName()).log(Level.WARNING, e.getMessage()); } return color; } protected  TableCellProperties(); protected  TableCellProperties(StyleTableCellPropertiesElement properties); void setBorders(StyleTypeDefinitions.CellBordersType bordersType, Border border); Border getBorder(); Border getTopBorder(); Border getLeftBorder(); Border getRightBorder(); Border getBottomBorder(); Border getDiagonalBlTr(); Border getDiagonalTlBr(); void setBottomBorder(Border border); void setTopBorder(Border border); void setLeftBorder(Border border); void setRightBorder(Border border); void setDiagonalBlTr(Border border); void setDiagonalTlBr(Border border); void setBorder(Border border); void setBackgroundColor(Color aColor); Color getBackgroundColor(); void setWrapped(boolean isWrapped); void setVerticalAlignment(StyleTypeDefinitions.VerticalAlignmentType alignType); StyleTypeDefinitions.VerticalAlignmentType getVerticalAlignment(); Boolean isWrapped(); static TableCellProperties getOrCreateTableCellProperties(OdfStyleBase style); static TableCellProperties getTableCellProperties(OdfStyleBase style);  }
@Test public void testSettingNullBackgroundOnCell() throws Exception { SpreadsheetDocument doc = SpreadsheetDocument.newSpreadsheetDocument(); Table table = doc.getTableByName("Sheet1"); Cell cell = table.getCellByPosition(1, 1); cell.setCellBackgroundColor((Color) null); Assert.assertNull(cell.getStyleHandler().getTableCellPropertiesForRead().getBackgroundColor()); Assert.assertEquals(Color.WHITE, cell.getCellBackgroundColor()); }