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.

PopupTimeClosingWithEsc.java 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package com.vaadin.tests.components.datefield;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.shared.ui.datefield.DateTimeResolution;
  4. import com.vaadin.tests.components.AbstractReindeerTestUI;
  5. import com.vaadin.ui.DateTimeField;
  6. import com.vaadin.ui.VerticalLayout;
  7. public class PopupTimeClosingWithEsc extends AbstractReindeerTestUI {
  8. @Override
  9. protected void setup(VaadinRequest request) {
  10. DateTimeField secondResolution = new DateTimeField("Second");
  11. secondResolution.setId("second");
  12. secondResolution.setResolution(DateTimeResolution.SECOND);
  13. DateTimeField minuteResolution = new DateTimeField("Minute");
  14. minuteResolution.setId("minute");
  15. minuteResolution.setResolution(DateTimeResolution.MINUTE);
  16. DateTimeField hourResolution = new DateTimeField("Hour");
  17. hourResolution.setId("hour");
  18. hourResolution.setResolution(DateTimeResolution.HOUR);
  19. DateTimeField month = new DateTimeField("Month");
  20. month.setId("month");
  21. month.setResolution(DateTimeResolution.MONTH);
  22. VerticalLayout layout = new VerticalLayout();
  23. layout.setMargin(true);
  24. layout.setSpacing(true);
  25. layout.addComponents(secondResolution, minuteResolution, hourResolution,
  26. month);
  27. setContent(layout);
  28. }
  29. @Override
  30. protected String getTestDescription() {
  31. return "Testing that the DateField popup can be closed with ESC key.";
  32. }
  33. @Override
  34. protected Integer getTicketNumber() {
  35. return 12317;
  36. }
  37. }