]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixed headers width and added horizontal scrollhandler to adjust headers position
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 28 Jun 2007 05:15:29 +0000 (05:15 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 28 Jun 2007 05:15:29 +0000 (05:15 +0000)
svn changeset:1796/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/scrolltable/IScrollTable.java

index 3a78a1a94ec8427d22d5b371d8f684516f321010..4bb7b08193283678e4c54f929359eaecfd1a3fb4 100644 (file)
@@ -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)