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.

WindowShadow.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package com.vaadin.tests.components.window;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.tests.components.AbstractReindeerTestUI;
  4. import com.vaadin.ui.UI;
  5. import com.vaadin.ui.Window;
  6. //Tests that invisible divs don't overlap windows and don't block mouse events
  7. public class WindowShadow extends AbstractReindeerTestUI {
  8. @Override
  9. protected void setup(VaadinRequest request) {
  10. Window wnd = createWindow();
  11. wnd.setId("topwindow");
  12. Window wnd2 = createWindow();
  13. wnd2.setId("botwindow");
  14. wnd.setPositionX(100);
  15. wnd.setPositionY(100);
  16. wnd2.setPositionX(100);
  17. // Pick ycoord, that the top div of the Window overlaps with its footer
  18. int yCoord = (int) (wnd.getPositionX() + wnd.getHeight() - 5);
  19. wnd2.setPositionY(yCoord);
  20. UI.getCurrent().addWindow(wnd);
  21. UI.getCurrent().addWindow(wnd2);
  22. }
  23. private Window createWindow() {
  24. Window wnd = new Window();
  25. wnd.setHeight("200");
  26. wnd.setWidth("200");
  27. return wnd;
  28. }
  29. @Override
  30. protected String getTestDescription() {
  31. return "Popup window has shadow div elemetns, which overlaps other elements and blocks mouse events";
  32. }
  33. @Override
  34. protected Integer getTicketNumber() {
  35. return 13885;
  36. }
  37. }