1 package com.vaadin.tests.components.combobox;
3 import java.util.Arrays;
6 import com.vaadin.server.VaadinRequest;
7 import com.vaadin.tests.components.AbstractTestUI;
8 import com.vaadin.v7.ui.ComboBox;
10 public class ComboBoxSuggestionPopupWidthPercentage extends AbstractTestUI {
12 private static List<String> items = Arrays.asList("abc", "cde", "efg",
13 "ghi", "ijk", "more items 1", "more items 2", "more items 3",
14 "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
15 "more items 4", "more items 5", "more items 6", "more items 7");
18 protected void setup(VaadinRequest request) {
19 ComboBox percentage = new ComboBox(
20 "200px wide ComboBox with 200% wide suggestion popup", items);
21 percentage.addStyleName("percentage");
22 percentage.setWidth("200px");
23 percentage.setPopupWidth("200%");
24 addComponent(percentage);
29 protected String getTestDescription() {
30 return "Suggestion pop-up's width should be 200% of the ComboBox itself (400px)";
34 protected Integer getTicketNumber() {