您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ComboBoxSuggestionPopupWidthLegacy.java 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 ComboBoxSuggestionPopupWidthLegacy 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> legacy = new ComboBox<>(
  15. "200px wide ComboBox with legacy mode suggestion popup setPopupWidth(null)",
  16. items);
  17. legacy.addStyleName("legacy");
  18. legacy.setWidth("200px");
  19. legacy.setPopupWidth(null);
  20. addComponent(legacy);
  21. }
  22. @Override
  23. protected String getTestDescription() {
  24. return "Suggestion pop-up's width should respect the item captions width";
  25. }
  26. @Override
  27. protected Integer getTicketNumber() {
  28. return 19685;
  29. }
  30. }