Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

AcceptAll.java 804B

12345678910111213141516171819202122232425262728293031323334353637
  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. * <p>
  13. * Note! Class is singleton, use {@link #get()} method to get the instance.
  14. *
  15. *
  16. * @since 6.3
  17. *
  18. */
  19. @ClientCriterion(VAcceptAll.class)
  20. public final class AcceptAll extends ClientSideCriterion {
  21. private static final long serialVersionUID = 7406683402153141461L;
  22. private static AcceptCriterion singleton = new AcceptAll();
  23. private AcceptAll() {
  24. }
  25. public static AcceptCriterion get() {
  26. return singleton;
  27. }
  28. public boolean accept(DragAndDropEvent dragEvent) {
  29. return true;
  30. }
  31. }