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.

AcceptAll.java 727B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. /**
  5. *
  6. */
  7. package com.vaadin.event.dd.acceptcriteria;
  8. import com.vaadin.event.dd.DragAndDropEvent;
  9. /**
  10. * Criterion that accepts all drops anywhere on the component.
  11. * <p>
  12. * Note! Class is singleton, use {@link #get()} method to get the instance.
  13. *
  14. *
  15. * @since 6.3
  16. *
  17. */
  18. public final class AcceptAll extends ClientSideCriterion {
  19. private static final long serialVersionUID = 7406683402153141461L;
  20. private static AcceptCriterion singleton = new AcceptAll();
  21. private AcceptAll() {
  22. }
  23. public static AcceptCriterion get() {
  24. return singleton;
  25. }
  26. @Override
  27. public boolean accept(DragAndDropEvent dragEvent) {
  28. return true;
  29. }
  30. }