summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2009-04-29 08:11:09 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2009-04-29 08:11:09 +0000
commit10de4fcca895564cbaeeae2753ff9c862c003126 (patch)
tree14f5ce19bac358535585a3908651b362ceb36740
parenta0133d3f26aff03d1c231f42375e5ca34b010fc1 (diff)
downloadvaadin-framework-10de4fcca895564cbaeeae2753ff9c862c003126.tar.gz
vaadin-framework-10de4fcca895564cbaeeae2753ff9c862c003126.zip
Minor IScrolltable fixes. Extra scrollbar space in some situations and table height when paging off.
svn changeset:7559/svn branch:6.0
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
index 70bcc618a5..596b47a191 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
@@ -15,7 +15,6 @@ import java.util.Vector;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.NodeList;
-import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.TableCellElement;
import com.google.gwt.dom.client.TableRowElement;
import com.google.gwt.dom.client.TableSectionElement;
@@ -687,10 +686,12 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener {
*/
if (pageLength == totalRows) {
/*
- * We want to show all rows so the bodyHeight should be equal to
- * the table height
+ * A hack to support variable height rows when paging is off.
+ * Generally this is not supported by scrolltable. We want to
+ * show all rows so the bodyHeight should be equal to the table
+ * height.
*/
- int bodyHeight = tBody.getTableHeight();
+ int bodyHeight = tBody.getOffsetHeight();
bodyContainer.setHeight(bodyHeight + "px");
Util.runWebkitOverflowAutoFix(bodyContainer.getElement());
} else {
@@ -1838,12 +1839,8 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener {
}
public int getAvailableWidth() {
- Style style = bodyContainer.getElement().getStyle();
- style.setProperty("overflow", "hidden");
- int w = bodyContainer.getElement().getPropertyInt("clientWidth");
- style.setProperty("overflow", "auto");
- return w;
- // return preSpacer.getOffsetWidth();
+ int availW = bodyContainer.getOffsetWidth() - getBorderWidth();
+ return availW;
}
public void renderInitialRows(UIDL rowData, int firstIndex, int rows) {