From 30a10c6e93d839afafad031abc532a7520723134 Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Tue, 23 Aug 2011 11:04:52 +0000 Subject: [PATCH] Fixes for issues found during review of #6720 - Don't statically set row height - Table.RowGenerator and Table.GeneratedRow made Serializable svn changeset:20561/svn branch:6.7 --- WebContent/VAADIN/themes/reindeer/table/table.css | 6 +++++- src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java | 2 -- src/com/vaadin/ui/Table.java | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/WebContent/VAADIN/themes/reindeer/table/table.css b/WebContent/VAADIN/themes/reindeer/table/table.css index 461f4642b3..d4e7046d2b 100644 --- a/WebContent/VAADIN/themes/reindeer/table/table.css +++ b/WebContent/VAADIN/themes/reindeer/table/table.css @@ -122,7 +122,7 @@ background: #eff0f1; } .v-table-generated-row { - background: #dcdee0; + background: #dcdee0; text-transform: uppercase; font-size: 10px; font-weight: bold; @@ -130,6 +130,10 @@ text-shadow: #f3f5f8 0 1px 0; line-height: normal; } +.v-table-generated-row .v-table-cell-content { + padding-top: 1px; + padding-bottom: 2px; +} .v-table-cell-content:last-child { border-right-color: transparent; } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 5c55a432b7..fda2c5798e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -5387,7 +5387,6 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, TableCellElement td = DOM.createTD().cast(); td.setColSpan(colCount); initCellWithWidget(w, align, style, sorted, td); - td.getStyle().setHeight(getRowHeight(), Unit.PX); } private void addSpannedCell(UIDL rowUidl, String text, char align, @@ -5398,7 +5397,6 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, td.setColSpan(colCount); initCellWithText(text, align, style, textIsHTML, sorted, description, td); - td.getStyle().setHeight(getRowHeight(), Unit.PX); } @Override diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 2b13467481..65340eaf91 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -4643,7 +4643,7 @@ public class Table extends AbstractSelect implements Action.Container, * * Row generators can be used for e.g. summary rows or grouping of items. */ - public interface RowGenerator { + public interface RowGenerator extends Serializable { /** * Called for every row that is painted in the Table. Returning a * GeneratedRow object will cause the row to be painted based on the @@ -4677,7 +4677,7 @@ public class Table extends AbstractSelect implements Action.Container, public GeneratedRow generateRow(Table table, Object itemId); } - public static class GeneratedRow { + public static class GeneratedRow implements Serializable { private boolean htmlContentAllowed = false; private boolean spanColumns = false; private String[] text = null; -- 2.39.5