Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ComboBoxSuggestionPopupWidthLegacy.java 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.AbstractTestUI;
  6. import com.vaadin.ui.ComboBox;
  7. public class ComboBoxSuggestionPopupWidthLegacy extends AbstractTestUI {
  8. private static List<String> items = Arrays
  9. .asList("abc",
  10. "cde",
  11. "efg",
  12. "ghi",
  13. "ijk",
  14. "more items 1",
  15. "more items 2",
  16. "more items 3",
  17. "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
  18. "more items 4", "more items 5", "more items 6",
  19. "more items 7");
  20. @Override
  21. protected void setup(VaadinRequest request) {
  22. ComboBox legacy = new ComboBox(
  23. "200px wide ComboBox with legacy mode suggestion popup setPopupWidth(null)",
  24. items);
  25. legacy.addStyleName("legacy");
  26. legacy.setWidth("200px");
  27. legacy.setPopupWidth(null);
  28. addComponent(legacy);
  29. }
  30. @Override
  31. protected String getTestDescription() {
  32. return "Suggestion pop-up's width should respect the item captions width";
  33. }
  34. @Override
  35. protected Integer getTicketNumber() {
  36. return 19685;
  37. }
  38. }