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.

ComboBoxClickIcon.java 883B

12345678910111213141516171819202122232425262728293031323334
  1. package com.vaadin.tests.components.combobox;
  2. import com.vaadin.icons.VaadinIcons;
  3. import com.vaadin.server.VaadinRequest;
  4. import com.vaadin.tests.components.AbstractReindeerTestUI;
  5. import com.vaadin.ui.ComboBox;
  6. /**
  7. * Test UI to check click on icon in the combobox.
  8. *
  9. * @author Vaadin Ltd
  10. */
  11. public class ComboBoxClickIcon extends AbstractReindeerTestUI {
  12. @Override
  13. protected void setup(VaadinRequest request) {
  14. final ComboBox<String> combo = new ComboBox<>();
  15. combo.setItems("A", "B", "C");
  16. combo.setItemIconGenerator(item -> VaadinIcons.ALIGN_CENTER);
  17. combo.setTextInputAllowed(false);
  18. addComponent(combo);
  19. }
  20. @Override
  21. protected String getTestDescription() {
  22. return "Combobox icon should handle click events";
  23. }
  24. @Override
  25. protected Integer getTicketNumber() {
  26. return 14624;
  27. }
  28. }