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.

DateFieldFocus.java 902B

1234567891011121314151617181920212223242526272829303132
  1. package com.vaadin.tests.components.datefield;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.tests.components.AbstractTestUIWithLog;
  4. import com.vaadin.ui.DateField;
  5. import com.vaadin.ui.TextField;
  6. public class DateFieldFocus extends AbstractTestUIWithLog {
  7. @Override
  8. protected void setup(VaadinRequest request) {
  9. DateField dateField = new DateField();
  10. dateField.addFocusListener(e -> log("focused"));
  11. dateField.addBlurListener(e -> log("blurred"));
  12. addComponent(dateField);
  13. TextField textField = new TextField();
  14. textField.setCaption("second");
  15. addComponent(textField);
  16. }
  17. @Override
  18. protected String getTestDescription() {
  19. return "DateField should not trigger events when nagivating between sub-components.";
  20. }
  21. @Override
  22. protected Integer getTicketNumber() {
  23. return 1008;
  24. }
  25. }