diff options
author | Henrik Paul <henrik@vaadin.com> | 2014-03-06 09:37:29 +0200 |
---|---|---|
committer | Henrik Paul <henrik@vaadin.com> | 2014-03-06 13:30:03 +0200 |
commit | 91559310f9b9ad5758944e2d36ab750b87b009a1 (patch) | |
tree | 6e276cb2437b8f54a6dc7c6210d881ac1f9be18e /uitest/src/com/vaadin/tests/widgetset | |
parent | 3798a8ab782d5e68b269692bbb784069b9312122 (diff) | |
download | vaadin-framework-91559310f9b9ad5758944e2d36ab750b87b009a1.tar.gz vaadin-framework-91559310f9b9ad5758944e2d36ab750b87b009a1.zip |
Add support for changing the default row height in escalator (#12645)
Since this is quite the change, I've taken the opportunity to rewrite smaller
adjoining pieces to make more sense. Move methods from classes, and so on.
These changes are, however, only on the code level, no other functionality will
be introduced by this patch.
Change-Id: I56f19c5af7dc4ccfd2fa4c9098f06e77dbfa12fb
Diffstat (limited to 'uitest/src/com/vaadin/tests/widgetset')
4 files changed, 21 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/TestGridClientRpc.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/TestGridClientRpc.java index df2b8eb075..ae2799d228 100644 --- a/uitest/src/com/vaadin/tests/widgetset/client/grid/TestGridClientRpc.java +++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/TestGridClientRpc.java @@ -43,4 +43,6 @@ public interface TestGridClientRpc extends ClientRpc { void setColumnWidth(int index, int px); void calculateColumnWidths(); + + void randomRowHeight(); } diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/TestGridConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/TestGridConnector.java index b8ea380301..e2d88c57f2 100644 --- a/uitest/src/com/vaadin/tests/widgetset/client/grid/TestGridConnector.java +++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/TestGridConnector.java @@ -15,6 +15,7 @@ */ package com.vaadin.tests.widgetset.client.grid; +import com.google.gwt.user.client.Random; import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.grid.ScrollDestination; @@ -112,6 +113,16 @@ public class TestGridConnector extends AbstractComponentConnector { public void calculateColumnWidths() { getWidget().calculateColumnWidths(); } + + @Override + public void randomRowHeight() { + getWidget().getHeader().setDefaultRowHeight( + Random.nextInt(20) + 20); + getWidget().getBody().setDefaultRowHeight( + Random.nextInt(20) + 20); + getWidget().getFooter().setDefaultRowHeight( + Random.nextInt(20) + 20); + } }); } diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/VTestGrid.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/VTestGrid.java index 0230367b85..28e650edc1 100644 --- a/uitest/src/com/vaadin/tests/widgetset/client/grid/VTestGrid.java +++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/VTestGrid.java @@ -206,6 +206,10 @@ public class VTestGrid extends Composite { return escalator.getHeader(); } + public RowContainer getBody() { + return escalator.getBody(); + } + public RowContainer getFooter() { return escalator.getFooter(); } diff --git a/uitest/src/com/vaadin/tests/widgetset/server/grid/TestGrid.java b/uitest/src/com/vaadin/tests/widgetset/server/grid/TestGrid.java index bdc5d46c1d..4e218ebba1 100644 --- a/uitest/src/com/vaadin/tests/widgetset/server/grid/TestGrid.java +++ b/uitest/src/com/vaadin/tests/widgetset/server/grid/TestGrid.java @@ -89,4 +89,8 @@ public class TestGrid extends AbstractComponent { public void calculateColumnWidths() { rpc().calculateColumnWidths(); } + + public void randomizeDefaultRowHeight() { + rpc().randomRowHeight(); + } } |