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.

HorizontalScrollAfterResize.java 1005B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.vaadin.tests.components.grid;
  2. import java.util.stream.IntStream;
  3. import com.vaadin.server.VaadinRequest;
  4. import com.vaadin.tests.components.AbstractTestUI;
  5. import com.vaadin.ui.Grid;
  6. /**
  7. * @author Vaadin Ltd
  8. *
  9. */
  10. public class HorizontalScrollAfterResize extends AbstractTestUI {
  11. @Override
  12. protected void setup(VaadinRequest request) {
  13. final Grid<Integer> grid = new Grid<>();
  14. grid.setWidth("100%");
  15. grid.setHeight("350px");
  16. grid.setCaption("My Grid");
  17. for (int i = 0; i < 10; i++) {
  18. char ch = (char) ('a' + i);
  19. grid.addColumn(item -> "test").setCaption("" + ch);
  20. }
  21. grid.setItems(IntStream.of(0, 100).mapToObj(Integer::valueOf));
  22. addComponents(grid);
  23. }
  24. @Override
  25. protected String getTestDescription() {
  26. return "Don't add more than one scroll handler";
  27. }
  28. @Override
  29. protected Integer getTicketNumber() {
  30. return 19189; // also 20254, 19622
  31. }
  32. }