From: Matti Tahvonen Date: Tue, 1 Sep 2009 07:57:05 +0000 (+0000) Subject: cleaning code style X-Git-Tag: 6.7.0.beta1~2559 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2250b5a23afc3935b70cf37297c0e8aab37ebc48;p=vaadin-framework.git cleaning code style svn changeset:8602/svn branch:6.1 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index f97cd451c6..b89eb94c97 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -286,8 +286,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler { if (isAttached()) { sizeInit(); } - - restoreRowVisibility(); + scrollBody.restoreRowVisibility(); } if (selectMode == Table.SELECT_MODE_NONE) { @@ -302,18 +301,6 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler { headerChangedDuringUpdate = false; } - private void restoreRowVisibility() { - // Restore row visibility which is set to "none" when the row is - // rendered. - Element tableBodyElement = scrollBody.tBodyElement.cast(); - final int rows = DOM.getChildCount(tableBodyElement); - for (int row = 0; row < rows; row++) { - final Element cell = DOM.getChild(tableBodyElement, row).cast(); - cell.getStyle().setProperty("visibility", ""); - } - - } - private void setCacheRate(double d) { if (cache_rate != d) { cache_rate = d; @@ -427,7 +414,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler { } scrollBody.fixSpacers(); - restoreRowVisibility(); + scrollBody.restoreRowVisibility(); } /** @@ -2178,6 +2165,16 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler { } + /** + * Restore row visibility which is set to "none" when the row is + * rendered (due a performance optimization). + */ + private void restoreRowVisibility() { + for (Widget row : renderedRows) { + row.getElement().getStyle().setProperty("visibility", ""); + } + } + public class VScrollTableRow extends Panel implements ActionOwner, Container {