diff options
Diffstat (limited to 'src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java')
-rw-r--r-- | src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java b/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java new file mode 100644 index 0000000000..3916d8e7e6 --- /dev/null +++ b/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java @@ -0,0 +1,37 @@ +/* +@ITMillApache2LicenseForJavaFiles@ + */ +/** + * + */ +package com.vaadin.event.dd.acceptCriteria; + +import com.vaadin.event.dd.DragAndDropEvent; +import com.vaadin.terminal.gwt.client.ui.dd.VAcceptAll; + +/** + * Criterion that accepts all drops anywhere on the component. + * <p> + * Note! Class is singleton, use {@link #get()} method to get the instance. + * + * + * @since 6.3 + * + */ +@ClientCriterion(VAcceptAll.class) +public final class AcceptAll extends ClientSideCriterion { + + private static final long serialVersionUID = 7406683402153141461L; + private static AcceptCriterion singleton = new AcceptAll(); + + private AcceptAll() { + } + + public static AcceptCriterion get() { + return singleton; + } + + public boolean accept(DragAndDropEvent dragEvent) { + return true; + } +}
\ No newline at end of file |