TableRowStyle implements ObjectStyle { public static TableRowStyleBuilder builder(final String name) { return new TableRowStyleBuilder(name); } TableRowStyle(final String styleName, final boolean hidden, final Length rowHeight,
                  final boolean optimalHeight); static TableRowStyleBuilder builder(final String name); @Override void addToElements(final OdsElements odsElements); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); @Override ObjectStyleFamily getFamily(); @Override String getName(); Length getRowHeight(); @Override String getKey(); @Override boolean isHidden(); void addToContentStyles(final StylesContainer stylesContainer); static final TableRowStyle DEFAULT_TABLE_ROW_STYLE; }
@Test public final void testCustomHeight() throws IOException { final TableRowStyle style = TableRowStyle.builder("test").visible().rowHeight(SimpleLength.cm(5)).build(); TestHelper.assertXMLEquals("<style:style style:name=\"test\" " + "style:family=\"table-row\"><style:table-row-properties " + "style:row-height=\"5cm\" fo:break-before=\"auto\"/></style" + ":style>", style); }
@Test public final void testOptimalHeight() throws IOException { final TableRowStyle style = TableRowStyle.builder("test").optimalHeight().build(); TestHelper.assertXMLEquals("<style:style style:name=\"test\" " + "style:family=\"table-row\"><style:table-row-properties " + "fo:break-before=\"auto\" style:use-optimal-row-height=\"true\"/></style" + ":style>", style); }
@Test public final void testGetters() { StyleTestHelper.testGettersHidden(TableRowStyle.builder("test")); }
@Test public final void testGetFontFace() { final TableCellStyle tcs = TableCellStyle.builder("tcs").fontName(LOFonts.OPENSYMBOL).build(); final TableRowStyle test = TableRowStyle.builder("test").defaultCellStyle(tcs).build(); Assert.assertEquals(new FontFace(LOFonts.OPENSYMBOL), tcs.getFontFace()); }