]> source.dussan.org Git - vaadin-framework.git/commitdiff
rounding pixels instead of ceiling. Should be ok, as the height of rendered rows...
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 4 Jan 2010 07:13:48 +0000 (07:13 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 4 Jan 2010 07:13:48 +0000 (07:13 +0000)
svn changeset:10604/svn branch:6.2

src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java

index a4bed08a5315247feab963f0857e5023f415384a..3c5ef55a6d292c283e042294eb0e3ad8883b24c4 100644 (file)
@@ -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.
                  *