diff options
Diffstat (limited to 'uitest/src/com/vaadin')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java b/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java index 454cc68202..cb97e8ee84 100644 --- a/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java +++ b/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java @@ -6,12 +6,12 @@ import java.util.GregorianCalendar; import com.vaadin.tests.components.uitest.TestSampler; import com.vaadin.ui.Component; import com.vaadin.ui.DateField; -import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.GridLayout; import com.vaadin.ui.InlineDateField; import com.vaadin.ui.PopupDateField; import com.vaadin.ui.themes.ChameleonTheme; -public class DatesCssTest extends HorizontalLayout { +public class DatesCssTest extends GridLayout { private TestSampler parent; private int debugIdCounter = 0; @@ -19,13 +19,14 @@ public class DatesCssTest extends HorizontalLayout { private Calendar cal = new GregorianCalendar(2012, 8, 11, 18, 00, 00); public DatesCssTest(TestSampler parent) { + super(5, 2); this.parent = parent; setSpacing(true); setWidth("100%"); - createDateFieldWith(null, null); - createDateFieldWith("Small", ChameleonTheme.DATEFIELD_SMALL); - createDateFieldWith("Big", ChameleonTheme.DATEFIELD_BIG); + createDateFieldWith(null, null, null); + createDateFieldWith("Small", ChameleonTheme.DATEFIELD_SMALL, null); + createDateFieldWith("Big", ChameleonTheme.DATEFIELD_BIG, null); DateField df = new PopupDateField("Popup date field"); df.setId("datefield" + debugIdCounter++); @@ -36,9 +37,16 @@ public class DatesCssTest extends HorizontalLayout { df.setId("datefield" + debugIdCounter++); df.setValue(cal.getTime()); addComponent(df); + + createDateFieldWith(null, null, "130px"); + createDateFieldWith("Small 130px", ChameleonTheme.DATEFIELD_SMALL, + "130px"); + createDateFieldWith("Big 130px", ChameleonTheme.DATEFIELD_BIG, "130px"); + } - private void createDateFieldWith(String caption, String primaryStyleName) { + private void createDateFieldWith(String caption, String primaryStyleName, + String width) { DateField df = new DateField("Date field"); df.setId("datefield" + debugIdCounter++); df.setValue(cal.getTime()); @@ -50,6 +58,9 @@ public class DatesCssTest extends HorizontalLayout { if (primaryStyleName != null) { df.addStyleName(primaryStyleName); } + if (width != null) { + df.setWidth(width); + } addComponent(df); |