weights[i] = list.get(i); table.withColumnLayout(Layout.weighted(weights));
public void testCosmetic() throws Exception { TableElement table = new TableElement(); table.withColumnLayout(Layout.flow()); RowElement row = new RowElement().add(new LabelElement("foo", 5), new LabelElement("This text is larger to be displayed in a cell of 32", 5)); table.add(row); assertRender(table, 32, "fooThis text is larger to be dis", " played in a cell of 32 "); }
public void testCosmeticWithBorder() throws Exception { TableElement table = new TableElement(); table.withColumnLayout(Layout.flow()); RowElement row = new RowElement().add(new LabelElement("foo", 5), new LabelElement("This text is larger to be displayed in a cell of 32", 5)); table.separator(BorderStyle.DASHED); table.border(BorderStyle.DASHED); table.add(row); assertRender(table, 32, " ------------------------------ ", "|foo|This text is larger to be |", "| |displayed in a cell of 32 |", " ------------------------------ "); }
public void testSimple() throws Exception { TableElement table = new TableElement(); table.withColumnLayout(Layout.flow()); table. add(row(). add(label("a")). add(label("b"))). add(row(). add(label("c")). add(label("d"))); assertRender(table, 2, "ab", "cd"); }
table.withColumnLayout(Layout.flow()); table.withColumnLayout(Layout.weighted(1, 1)); table.withColumnLayout(Layout.weighted(1, 2));
table.withColumnLayout(Layout.flow()); table.withColumnLayout(Layout.weighted(1, 1)); table.withColumnLayout(Layout.weighted(1, 2));
table.withColumnLayout(Layout.flow()); table.withColumnLayout(Layout.weighted(1, 1)); table.withColumnLayout(Layout.weighted(1, 2));
table.withColumnLayout(Layout.flow()); table.withColumnLayout(Layout.weighted(1, 1)); table.withColumnLayout(Layout.weighted(1, 2));
public void testBorderStyle() throws Exception { table.withColumnLayout(Layout.flow()); table.border(BorderStyle.DASHED);
weights[i] = list.get(i); table.withColumnLayout(Layout.weighted(weights));
weights[i] = list.get(i); table.withColumnLayout(Layout.weighted(weights));
weights[i] = list.get(i); table.withColumnLayout(Layout.weighted(weights));