You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ComboBoxSuggestionPopupWidthPixels.java 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.vaadin.tests.components.combobox;
  2. import java.util.Arrays;
  3. import java.util.List;
  4. import com.vaadin.server.VaadinRequest;
  5. import com.vaadin.tests.components.AbstractReindeerTestUI;
  6. import com.vaadin.ui.ComboBox;
  7. public class ComboBoxSuggestionPopupWidthPixels extends AbstractReindeerTestUI {
  8. private static List<String> items = Arrays.asList("abc", "cde", "efg",
  9. "ghi", "ijk", "more items 1", "more items 2", "more items 3",
  10. "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
  11. "more items 4", "more items 5", "more items 6", "more items 7");
  12. @Override
  13. protected void setup(VaadinRequest request) {
  14. ComboBox<String> pixels = new ComboBox<>(
  15. "200px wide ComboBox with 300px wide suggestion popup", items);
  16. pixels.addStyleName("pixels");
  17. pixels.setWidth("200px");
  18. pixels.setPopupWidth("300px");
  19. addComponent(pixels);
  20. }
  21. @Override
  22. protected String getTestDescription() {
  23. return "Suggestion pop-up's width should 300px";
  24. }
  25. @Override
  26. protected Integer getTicketNumber() {
  27. return 19685;
  28. }
  29. }