TableCellStyle implements FontFaceContainerStyle { public TableCellStyleBuilder toBuilder(final String newName) { return new TableCellStyleBuilder(newName, this.hidden, this.borders, this.margins, this.dataStyle, this.backgroundColor, this.textProperties, this.textAlign, this.verticalAlign, this.wrap, this.parentCellStyle, this.textRotating); } TableCellStyle(final String name, final boolean hidden, final DataStyle dataStyle,
                   final Color backgroundColor, final TextProperties textProperties,
                   final CellAlign textAlign, final VerticalAlign verticalAlign, final boolean wrap,
                   final TableCellStyle parentCellStyle, final Borders borders,
                   final Margins margins, final Angle textRotating); static TableCellStyleBuilder builder(final String name); @Override void addToElements(final OdsElements odsElements); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); DataStyle getDataStyle(); @Override ObjectStyleFamily getFamily(); @Override String getKey(); @Override String getName(); String getRealName(); boolean hasParent(); @Override boolean isHidden(); TableCellStyle getParentCellStyle(); @Override FontFace getFontFace(); boolean hasTextAlign(); TableCellStyleBuilder toBuilder(final String newName); static final TableCellStyle DEFAULT_CELL_STYLE; }
@Test public final void testToBuilder() throws IOException { final TableCellStyle style = TableCellStyle.DEFAULT_CELL_STYLE.toBuilder("Default with red bg") .backgroundColor(SimpleColor.RED).build(); TestHelper.assertXMLEquals("<style:style style:name=\"Default with red bg\" " + "style:family=\"table-cell\"><style:table-cell-properties " + "fo:background-color=\"#ff0000\" " + "style:vertical-align=\"top\"/><style:text-properties " + "style:font-name=\"Liberation Sans\"/><style:paragraph-properties " + "fo:margin=\"0cm\"/></style:style>", style); }