diff options
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(); + } } |