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 713B

1234567891011121314151617181920212223242526272829303132333435
  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. public boolean accept(DragAndDropEvent dragEvent) {
  27. return true;
  28. }
  29. }