From: Matti Tahvonen Date: Fri, 23 Nov 2007 14:40:12 +0000 (+0000) Subject: test for expand layout X-Git-Tag: 6.7.0.beta1~5498 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c52454637078584ef8ee2ee0e85bacf3f253c808;p=vaadin-framework.git test for expand layout svn changeset:2914/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/tests/TestForExpandLayout.java b/src/com/itmill/toolkit/tests/TestForExpandLayout.java new file mode 100644 index 0000000000..38f2445581 --- /dev/null +++ b/src/com/itmill/toolkit/tests/TestForExpandLayout.java @@ -0,0 +1,40 @@ +package com.itmill.toolkit.tests; + +import com.itmill.toolkit.ui.CustomComponent; +import com.itmill.toolkit.ui.DateField; +import com.itmill.toolkit.ui.ExpandLayout; +import com.itmill.toolkit.ui.Label; + +/** + * + * @author IT Mill Ltd. + */ +public class TestForExpandLayout extends CustomComponent { + + ExpandLayout main = new ExpandLayout(); + + DateField df; + + public TestForExpandLayout() { + setCompositionRoot(main); + createNewView(); + } + + public void createNewView() { + main.removeAllComponents(); + for (int i = 0; i < 10; i++) { + ExpandLayout el = new ExpandLayout( + ExpandLayout.ORIENTATION_HORIZONTAL); + for (int j = 0; j < 10; j++) { + Label l = new Label("label" + i + ":" + j); + el.addComponent(l); + } + if (i > 0) { + el.setHeight(1); + el.setHeightUnits(ExpandLayout.UNITS_EM); + } + main.addComponent(el); + } + + } +}