Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

SubWindowPositionUpdate.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package com.vaadin.tests.components.window;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.Window;
  4. import com.vaadin.v7.ui.ProgressIndicator;
  5. public class SubWindowPositionUpdate extends TestBase {
  6. static int delay = 400;
  7. @Override
  8. protected void setup() {
  9. Window subWindow = new Window("Draggable sub window") {
  10. @Override
  11. public void setPositionX(int positionX) {
  12. try {
  13. Thread.sleep(delay);
  14. } catch (InterruptedException e) {
  15. e.printStackTrace();
  16. }
  17. super.setPositionX(positionX);
  18. }
  19. };
  20. getMainWindow().addWindow(subWindow);
  21. ProgressIndicator pi = new ProgressIndicator();
  22. pi.setIndeterminate(true);
  23. pi.setPollingInterval(delay);
  24. addComponent(pi);
  25. }
  26. @Override
  27. protected String getDescription() {
  28. return "The window position should not jump inconsistently while "
  29. + "dragging, even though external UIDL updates are sent and "
  30. + "received by the progress indicator. A small delay is used "
  31. + "on the server side to surface the issue (" + delay + "ms).";
  32. }
  33. @Override
  34. protected Integer getTicketNumber() {
  35. return 4427;
  36. }
  37. }