diff options
author | Artur Signell <artur@vaadin.com> | 2013-01-07 23:37:04 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-01-07 23:52:12 +0200 |
commit | 991dcf9fa63273e15b38abaca5f4ac792ca94b7e (patch) | |
tree | 5877fdfdd4ab53b9f9d018c61be890cbd65abbad /uitest | |
parent | 68406d87bb4dfb90d460ac02ef6412493f76eba7 (diff) | |
download | vaadin-framework-991dcf9fa63273e15b38abaca5f4ac792ca94b7e.tar.gz vaadin-framework-991dcf9fa63273e15b38abaca5f4ac792ca94b7e.zip |
Fixed ComboBox width problems in all themes (#10484)
Change-Id: Ia8181cd9c9d6a9183083408c55f9c3f28c72fb29
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java b/uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java index 4da683788b..af09b1007d 100644 --- a/uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java +++ b/uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java @@ -4,7 +4,7 @@ import com.vaadin.tests.components.uitest.TestSampler; import com.vaadin.ui.AbstractSelect; import com.vaadin.ui.ComboBox; import com.vaadin.ui.Component; -import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.GridLayout; import com.vaadin.ui.ListSelect; import com.vaadin.ui.NativeSelect; import com.vaadin.ui.OptionGroup; @@ -12,12 +12,13 @@ import com.vaadin.ui.Select; import com.vaadin.ui.TwinColSelect; import com.vaadin.ui.themes.ChameleonTheme; -public class SelectsCssTest extends HorizontalLayout { +public class SelectsCssTest extends GridLayout { private TestSampler parent; private int debugIdCounter = 0; public SelectsCssTest(TestSampler parent) { + super(10, 1); this.parent = parent; setSpacing(true); setWidth(null); @@ -53,18 +54,35 @@ public class SelectsCssTest extends HorizontalLayout { createDummyData(ns); addComponent(ns); - createComboBoxWith(null, null); - createComboBoxWith("CB Search", ChameleonTheme.COMBOBOX_SEARCH); + createComboBoxWith(null, null, null); + createComboBoxWith("CB Search", ChameleonTheme.COMBOBOX_SEARCH, null); createComboBoxWith("SelectButton", - ChameleonTheme.COMBOBOX_SELECT_BUTTON); + ChameleonTheme.COMBOBOX_SELECT_BUTTON, null); ListSelect ls = new ListSelect(); ls.setId("select" + debugIdCounter++); createDummyData(ls); addComponent(ls); + + s = new Select("Basic select"); + s.setId("select" + debugIdCounter++); + s.setWidth("100px"); + addComponent(s); + + s = new Select("Select with items"); + s.setWidth("100px"); + s.setId("select" + debugIdCounter++); + createDummyData(s); + addComponent(s); + + createComboBoxWith(null, null, "100px"); + createComboBoxWith("CB Search", ChameleonTheme.COMBOBOX_SEARCH, "100px"); + createComboBoxWith("SelectButton", + ChameleonTheme.COMBOBOX_SELECT_BUTTON, "100px"); } - private void createComboBoxWith(String caption, String primaryStyleName) { + private void createComboBoxWith(String caption, String primaryStyleName, + String width) { ComboBox cb = new ComboBox(); cb.setId("select" + debugIdCounter++); if (caption != null) { @@ -74,6 +92,9 @@ public class SelectsCssTest extends HorizontalLayout { if (primaryStyleName != null) { cb.addStyleName(primaryStyleName); } + if (width != null) { + cb.setWidth(width); + } createDummyData(cb); addComponent(cb); |