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

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. @ITMillApache2LicenseForJavaFiles@
  3. */
  4. /**
  5. *
  6. */
  7. package com.vaadin.event.dd.acceptCriteria;
  8. import com.vaadin.event.dd.DragAndDropEvent;
  9. import com.vaadin.terminal.gwt.client.ui.dd.VAcceptAll;
  10. /**
  11. * Criterion that accepts all drops anywhere on the component.
  12. *
  13. * @since 6.3
  14. *
  15. */
  16. @ClientCriterion(VAcceptAll.class)
  17. public final class AcceptAll extends ClientSideCriterion {
  18. private static AcceptCriterion singleton = new AcceptAll();
  19. private AcceptAll() {
  20. }
  21. public static AcceptCriterion get() {
  22. return singleton;
  23. }
  24. public boolean accepts(DragAndDropEvent dragEvent) {
  25. return true;
  26. }
  27. }