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.

GridLayoutComboBoxZoomOut.java 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package com.vaadin.tests.components.combobox;
  2. import com.vaadin.tests.components.AbstractTestCase;
  3. import com.vaadin.ui.ComboBox;
  4. import com.vaadin.ui.GridLayout;
  5. import com.vaadin.ui.Label;
  6. import com.vaadin.ui.Layout;
  7. import com.vaadin.ui.LegacyWindow;
  8. @SuppressWarnings("serial")
  9. public class GridLayoutComboBoxZoomOut extends AbstractTestCase {
  10. @Override
  11. public void init() {
  12. LegacyWindow mainWindow = new LegacyWindow("Gridlayoutbug Application");
  13. setMainWindow(mainWindow);
  14. Label description = new Label(
  15. "Open this application in Chrome, zoom out (cmd + \"-\") and "
  16. + "open the ComboBox for weird behavior.");
  17. mainWindow.addComponent(description);
  18. Layout formLayout = new GridLayout(2, 1);
  19. // formLayout.setWidth("100%");
  20. formLayout.setWidth("1000px");
  21. ComboBox<String> countryField = new ComboBox<>();
  22. countryField.setItems("Finland", "Sweden", "Canada", "USA");
  23. countryField.setCaption("Country");
  24. countryField.setWidth("100%");
  25. formLayout.addComponent(countryField);
  26. ComboBox<String> statusField = new ComboBox<>();
  27. statusField.setItems("Available", "On vacation", "Busy",
  28. "Left the building");
  29. statusField.setCaption("Status");
  30. statusField.setWidth("100%");
  31. formLayout.addComponent(statusField);
  32. mainWindow.addComponent(formLayout);
  33. }
  34. @Override
  35. protected String getDescription() {
  36. // TODO Auto-generated method stub
  37. return null;
  38. }
  39. @Override
  40. protected Integer getTicketNumber() {
  41. // TODO Auto-generated method stub
  42. return null;
  43. }
  44. }