diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2007-06-28 05:15:29 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2007-06-28 05:15:29 +0000 |
commit | c7b66c62580296abbbc743b0300378480ac4610e (patch) | |
tree | e114e6cdc413f5f010210fe50791e708e47d47aa | |
parent | 02e516142aead7fa840bc083bcc0cfd31b73367d (diff) | |
download | vaadin-framework-c7b66c62580296abbbc743b0300378480ac4610e.tar.gz vaadin-framework-c7b66c62580296abbbc743b0300378480ac4610e.zip |
fixed headers width and added horizontal scrollhandler to adjust headers position
svn changeset:1796/svn branch:trunk
-rw-r--r-- | src/com/itmill/toolkit/terminal/gwt/client/ui/scrolltable/IScrollTable.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/scrolltable/IScrollTable.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/scrolltable/IScrollTable.java index 3a78a1a94e..4bb7b08193 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/scrolltable/IScrollTable.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/scrolltable/IScrollTable.java @@ -230,6 +230,11 @@ public class IScrollTable extends Composite implements Paintable, ITable, Scroll rowRequestHandler.cancel(); + // fix headers horizontal scrolling + System.out.println("scrolling header to " + scrollLeft); + headerContainer.setHorizontalScrollPosition(scrollLeft); + + firstRowInViewPort = (int) Math.ceil( scrollTop / tBody.getRowHeight() ); client.console.log("At scrolltop: " + scrollTop + " At row " + firstRowInViewPort); @@ -273,6 +278,7 @@ public class IScrollTable extends Composite implements Paintable, ITable, Scroll rowRequestHandler.setReqRows((int) ((firstRowInViewPort + pageLength + pageLength*CACHE_RATE) - lastRendered)); rowRequestHandler.deferRowFetch(); } + } @@ -292,8 +298,10 @@ public class IScrollTable extends Composite implements Paintable, ITable, Scroll if(width < 0) { bodyContainer.setWidth((tBody.getOffsetWidth() + getScrollBarWidth() ) + "px"); + headerContainer.setWidth((tBody.getOffsetWidth()) + "px"); } else { bodyContainer.setWidth(width + "px"); + headerContainer.setWidth(width + "px"); } if(firstvisible > 0) |