diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-13 18:34:33 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-13 19:18:33 +0300 |
commit | e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569 (patch) | |
tree | 9ab6f13f7188cab44bbd979b1cf620f15328a03f /src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java | |
parent | 14dd4d0b28c76eb994b181a4570f3adec53342e6 (diff) | |
download | vaadin-framework-e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569.tar.gz vaadin-framework-e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569.zip |
Moved server files to a server src folder (#9299)
Diffstat (limited to 'src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java')
-rw-r--r-- | src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java b/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java deleted file mode 100644 index a644b858e2..0000000000 --- a/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java +++ /dev/null @@ -1,51 +0,0 @@ -/* -@VaadinApache2LicenseForJavaFiles@ - */ -/** - * - */ -package com.vaadin.event.dd.acceptcriteria; - -import com.vaadin.event.Transferable; -import com.vaadin.event.TransferableImpl; -import com.vaadin.event.dd.DragAndDropEvent; -import com.vaadin.event.dd.DropTarget; -import com.vaadin.ui.Component; -import com.vaadin.ui.Table; -import com.vaadin.ui.Tree; - -/** - * - * A criterion that ensures the drag source is the same as drop target. Eg. - * {@link Tree} or {@link Table} could support only re-ordering of items, but no - * {@link Transferable}s coming outside. - * <p> - * Note! Class is singleton, use {@link #get()} method to get the instance. - * - * @since 6.3 - * - */ -public class SourceIsTarget extends ClientSideCriterion { - - private static final long serialVersionUID = -451399314705532584L; - private static SourceIsTarget instance = new SourceIsTarget(); - - private SourceIsTarget() { - } - - @Override - public boolean accept(DragAndDropEvent dragEvent) { - if (dragEvent.getTransferable() instanceof TransferableImpl) { - Component sourceComponent = ((TransferableImpl) dragEvent - .getTransferable()).getSourceComponent(); - DropTarget target = dragEvent.getTargetDetails().getTarget(); - return sourceComponent == target; - } - return false; - } - - public static synchronized SourceIsTarget get() { - return instance; - } - -}
\ No newline at end of file |