From: Matti Tahvonen Date: Mon, 4 Jan 2010 07:13:48 +0000 (+0000) Subject: rounding pixels instead of ceiling. Should be ok, as the height of rendered rows... X-Git-Tag: 6.7.0.beta1~2084^2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ce66799d85d223ab2cc45526c61d71cd77f82511;p=vaadin-framework.git rounding pixels instead of ceiling. Should be ok, as the height of rendered rows is ceiled when measuring. Still, this might cause some scroll bar regressions. svn changeset:10604/svn branch:6.2 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index a4bed08a53..3c5ef55a6d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -295,7 +295,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler { .getIntAttribute("firstrow"), uidl.getIntAttribute("rows")); bodyContainer.add(scrollBody); initialContentReceived = true; + ApplicationConnection.getConsole().log("foo"); if (isAttached()) { + ApplicationConnection.getConsole().log("bar"); sizeInit(); } scrollBody.restoreRowVisibility(); @@ -724,7 +726,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler { // int bodyHeight = scrollBody.getOffsetHeight(); bodyHeight = scrollBody.getRequiredHeight(); } else { - bodyHeight = (int) Math.ceil(scrollBody.getRowHeight(true) + bodyHeight = (int) Math.round(scrollBody.getRowHeight(true) * pageLength); } boolean needsSpaceForHorizontalSrollbar = (total > availW); @@ -783,7 +785,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler { return true; } } else { - int fakeheight = (int) Math.ceil(scrollBody.getRowHeight() + int fakeheight = (int) Math.round(scrollBody.getRowHeight() * totalRows); int availableHeight = bodyContainer.getElement().getPropertyInt( "clientHeight"); @@ -1898,11 +1900,13 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler { reactLastRow = totalRows - 1; } if (lastRendered < reactLastRow) { + ApplicationConnection.getConsole().log("GET BELOW"); // get some cache rows below visible area rowRequestHandler.setReqFirstRow(lastRendered + 1); rowRequestHandler.setReqRows(reactLastRow - lastRendered); rowRequestHandler.deferRowFetch(1); } else if (scrollBody.getFirstRendered() > reactFirstRow) { + ApplicationConnection.getConsole().log("GET ABOVE"); /* * Branch for fetching cache above visible area. *