summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Hyvönen <pekka@vaadin.com>2017-03-22 08:32:34 +0200
committerHenri Sara <henri.sara@gmail.com>2017-03-22 08:32:34 +0200
commit9a679b57d13cce81dab5d6283767adba83e8c735 (patch)
treed912b443876ead90d80c969edcb8f165f18d7ff7
parentd1fa1a3efe08e0843a38947dcd8ffe65e04ed12c (diff)
downloadvaadin-framework-9a679b57d13cce81dab5d6283767adba83e8c735.tar.gz
vaadin-framework-9a679b57d13cce81dab5d6283767adba83e8c735.zip
Deprecate old DnD functionality (#8864)
Closes #8795
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java11
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAnd.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java5
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VNot.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VOr.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java9
-rw-r--r--server/src/main/java/com/vaadin/event/Transferable.java6
-rw-r--r--server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java4
-rw-r--r--server/src/main/java/com/vaadin/event/dd/DragSource.java4
-rw-r--r--server/src/main/java/com/vaadin/event/dd/DropHandler.java4
-rw-r--r--server/src/main/java/com/vaadin/event/dd/DropTarget.java3
-rw-r--r--server/src/main/java/com/vaadin/event/dd/TargetDetails.java5
-rw-r--r--server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java4
-rw-r--r--server/src/main/java/com/vaadin/server/DragAndDropService.java9
-rw-r--r--server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java14
36 files changed, 231 insertions, 16 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java b/client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java
index c459f78756..6d4e3df74f 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java
@@ -23,6 +23,7 @@ import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.Event.NativePreviewEvent;
import com.vaadin.client.WidgetUtil;
+import com.vaadin.client.extensions.DropTargetExtensionConnector;
import com.vaadin.client.ui.dd.VDragAndDropManager.DDManagerMediator;
/**
@@ -32,7 +33,9 @@ import com.vaadin.client.ui.dd.VDragAndDropManager.DDManagerMediator;
*
* @author Vaadin Ltd
* @since 7.4.4
+ * @deprecated Replaced in 8.1 with {@link DropTargetExtensionConnector}
*/
+@Deprecated
public class DDEventHandleStrategy {
/**
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java b/client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java
index a7ff8902bb..0438c99b7f 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java
@@ -16,6 +16,7 @@
package com.vaadin.client.ui.dd;
import com.google.gwt.dom.client.Element;
+import com.vaadin.client.extensions.DragSourceExtensionConnector;
/**
* Interface implemented by widgets if the drag image used for drag'n'drop
@@ -25,7 +26,10 @@ import com.google.gwt.dom.client.Element;
*
* @since 7.2
* @author Vaadin Ltd
+ * @deprecated Since 8.1, no direct replacement, see
+ * {@link DragSourceExtensionConnector}
*/
+@Deprecated
public interface DragImageModifier {
/**
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java b/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java
index 367de5523a..883b5e5164 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java
@@ -20,10 +20,17 @@ import java.util.Iterator;
import com.google.gwt.user.client.Command;
import com.vaadin.client.ComponentConnector;
import com.vaadin.client.UIDL;
+import com.vaadin.client.extensions.DropTargetExtensionConnector;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.DropTarget;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with {@link DropTargetExtensionConnector}
+ */
+@Deprecated
public abstract class VAbstractDropHandler implements VDropHandler {
private UIDL criterioUIDL;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java
index a743c3bae9..315adc6e29 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java
@@ -17,8 +17,19 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
import com.vaadin.event.dd.acceptcriteria.AcceptAll;
+import com.vaadin.event.dnd.DragSourceExtension;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DragSourceExtension#setEffectAllowed(com.vaadin.shared.ui.dnd.EffectAllowed)}
+ * and
+ * {@link DropTargetExtension#setDropEffect(com.vaadin.shared.ui.dnd.DropEffect)}
+ */
+@Deprecated
@AcceptCriterion(AcceptAll.class)
final public class VAcceptAll extends VAcceptCriterion {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java
index 6c919dd6ef..b112d6987e 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java
@@ -15,6 +15,15 @@
*/
package com.vaadin.client.ui.dd;
+import com.vaadin.client.extensions.DropTargetExtensionConnector;
+
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Since 8.1, no direct replacement, see
+ * {@link DropTargetExtensionConnector}
+ */
+@Deprecated
public interface VAcceptCallback {
/**
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java
index 45e614a17b..f13b23e3a4 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java
@@ -16,10 +16,16 @@
package com.vaadin.client.ui.dd;
import com.google.gwt.core.client.GWT;
+import com.vaadin.event.dnd.DropTargetExtension;
/**
* A class via all AcceptCriteria instances are fetched by an identifier.
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
*/
+@Deprecated
public class VAcceptCriteria {
private static VAcceptCriterionFactory impl;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java
index ba2b8729c5..e23346d582 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java
@@ -16,7 +16,16 @@
package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
+import com.vaadin.event.dnd.DropTargetExtension;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
+ *
+ */
+@Deprecated
public abstract class VAcceptCriterion {
/**
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java
index 37304223e1..ea9858b8ef 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java
@@ -15,10 +15,17 @@
*/
package com.vaadin.client.ui.dd;
+import com.vaadin.event.dnd.DropTargetExtension;
+
/**
* Generated by
- * {@link com.vaadin.server.widgetsetutils.AcceptCriteriaFactoryGenerator}
+ * {@link com.vaadin.server.widgetsetutils.AcceptCriteriaFactoryGenerator}.
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
*/
+@Deprecated
public abstract class VAcceptCriterionFactory {
public abstract VAcceptCriterion get(String name);
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java b/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java
index 5fda3b0d39..94cddaafc6 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java
@@ -17,8 +17,16 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
import com.vaadin.event.dd.acceptcriteria.And;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
+ */
+@Deprecated
@AcceptCriterion(And.class)
final public class VAnd extends VAcceptCriterion implements VAcceptCallback {
private boolean b1;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java b/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java
index 1250632e80..fde060951d 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java
@@ -17,8 +17,16 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
import com.vaadin.event.dd.acceptcriteria.ContainsDataFlavor;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
+ */
+@Deprecated
@AcceptCriterion(ContainsDataFlavor.class)
final public class VContainsDataFlavor extends VAcceptCriterion {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java
index 7a6185e9f1..824bcd25f9 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java
@@ -39,6 +39,8 @@ import com.vaadin.client.UIDL;
import com.vaadin.client.VConsole;
import com.vaadin.client.ValueMap;
import com.vaadin.client.WidgetUtil;
+import com.vaadin.client.extensions.DragSourceExtensionConnector;
+import com.vaadin.client.extensions.DropTargetExtensionConnector;
import com.vaadin.client.ui.VOverlay;
import com.vaadin.shared.ApplicationConstants;
import com.vaadin.shared.MouseEventDetails;
@@ -54,7 +56,12 @@ import com.vaadin.shared.ui.dd.DragEventType;
* {@link #get()} to get instance.
*
* TODO cancel drag and drop if more than one touches !?
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with {@link DropTargetExtensionConnector} and
+ * {@link DragSourceExtensionConnector}
*/
+@Deprecated
public class VDragAndDropManager {
public static final String ACTIVE_DRAG_SOURCE_STYLENAME = "v-active-drag-source";
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java
index 7d281186c4..b2127c5b94 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java
@@ -31,13 +31,16 @@ import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.EventListener;
import com.vaadin.client.BrowserInfo;
import com.vaadin.client.WidgetUtil;
+import com.vaadin.client.extensions.DropTargetExtensionConnector;
/**
* DragEvent used by Vaadin client side engine. Supports components, items,
* properties and custom payload (HTML5 style).
*
- *
+ * @deprecated Since 8.1, no direct replacement, see
+ * {@link DropTargetExtensionConnector}
*/
+@Deprecated
public class VDragEvent {
private static final int DEFAULT_OFFSET = 10;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java
index 414b6997e6..e8c1fefae0 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java
@@ -16,7 +16,14 @@
package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
+import com.vaadin.shared.ui.dnd.DropTargetRpc;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 {@link DropTargetRpc}
+ */
+@Deprecated
public interface VDragEventServerCallback {
public void handleResponse(boolean accepted, UIDL response);
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java
index 615a02cbe5..a75fb8e771 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java
@@ -19,13 +19,17 @@ import com.vaadin.client.ComponentConnector;
import com.vaadin.client.ConnectorMap;
import com.vaadin.client.UIDL;
import com.vaadin.event.dd.acceptcriteria.SourceIs;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
/**
- * TODO Javadoc!
*
* @since 6.3
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
*/
+@Deprecated
@AcceptCriterion(SourceIs.class)
final public class VDragSourceIs extends VAcceptCriterion {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java b/client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java
index b3327ec5d2..a674a5839e 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java
@@ -17,11 +17,17 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.ApplicationConnection;
import com.vaadin.client.ComponentConnector;
+import com.vaadin.event.dnd.DropListener;
+import com.vaadin.event.dnd.DropTargetExtension;
/**
* Vaadin Widgets that want to receive something via drag and drop implement
* this interface.
+ *
+ * @deprecated Replaced in 8.1 with {@link DropListener} and
+ * {@link DropTargetExtension}
*/
+@Deprecated
public interface VDropHandler {
/**
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java b/client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java
index c1d829d75a..f860af6160 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java
@@ -16,6 +16,7 @@
package com.vaadin.client.ui.dd;
import com.vaadin.client.ComponentConnector;
+import com.vaadin.client.extensions.DropTargetExtensionConnector;
/**
* Used to detect Widget from widget tree that has {@link #getDropHandler()}
@@ -23,7 +24,10 @@ import com.vaadin.client.ComponentConnector;
* Decide whether to get rid of this class. If so, {@link VAbstractDropHandler}
* must extend {@link ComponentConnector}.
*
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with {@link DropTargetExtensionConnector}
*/
+@Deprecated
public interface VHasDropHandler {
public VDropHandler getDropHandler();
}
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java
index 340be2eb85..195229b478 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java
@@ -17,12 +17,16 @@ package com.vaadin.client.ui.dd;
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.dom.client.NativeEvent;
+import com.vaadin.client.extensions.DropTargetExtensionConnector;
/**
* Helper class to access html5 style drag events.
*
- * TODO Gears support ?
+ * @author Vaadin Ltd
+ * @deprecated Since 8.1, no direct replacement currently, see
+ * {@link DropTargetExtensionConnector}
*/
+@Deprecated
public class VHtml5DragEvent extends NativeEvent {
protected VHtml5DragEvent() {
}
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java
index 3cd2cf1076..5dcf0ce630 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java
@@ -19,7 +19,13 @@ import com.google.gwt.core.client.JavaScriptObject;
/**
* Wrapper for html5 File object.
+ *
+ * @author Vaadin Ltd
+ * @deprecated Since 8.1, will be replaced by FileDropTargetExtensionConnector
+ * and FileDropTargetExtension,
+ * https://github.com/vaadin/framework/issues/8891
*/
+@Deprecated
public class VHtml5File extends JavaScriptObject {
protected VHtml5File() {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java b/client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java
index d04f24c136..6ea88d57f9 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java
@@ -18,10 +18,16 @@ package com.vaadin.client.ui.dd;
import java.util.HashSet;
import com.vaadin.client.UIDL;
+import com.vaadin.event.dnd.DropTargetExtension;
/**
*
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDragOverCriteria(String)} and
+ * {@link DropTargetExtension#setDropCriteria(String)}
*/
+@Deprecated
public class VLazyInitItemIdentifiers extends VAcceptCriterion {
private boolean loaded = false;
private HashSet<String> hashSet;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VNot.java b/client/src/main/java/com/vaadin/client/ui/dd/VNot.java
index a6f8b72e15..3a79da5fb6 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VNot.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VNot.java
@@ -18,14 +18,18 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
import com.vaadin.client.VConsole;
import com.vaadin.event.dd.acceptcriteria.Not;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
/**
- * TODO implementation could now be simplified/optimized
*
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
*/
+@Deprecated
@AcceptCriterion(Not.class)
-final public class VNot extends VAcceptCriterion {
+public final class VNot extends VAcceptCriterion {
private boolean b1;
private VAcceptCriterion crit1;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VOr.java b/client/src/main/java/com/vaadin/client/ui/dd/VOr.java
index 73fb192127..fd17c44bef 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VOr.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VOr.java
@@ -17,13 +17,18 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
import com.vaadin.event.dd.acceptcriteria.Or;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
/**
*
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
*/
+@Deprecated
@AcceptCriterion(Or.class)
-final public class VOr extends VAcceptCriterion implements VAcceptCallback {
+public final class VOr extends VAcceptCriterion implements VAcceptCallback {
private boolean accepted;
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java b/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java
index 13542933de..7e2476acc9 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java
@@ -16,7 +16,15 @@
package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
+import com.vaadin.event.dnd.DropTargetExtension;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Since 8.1, no direct replacement, see {@link DropTargetExtension}
+ * and extending classes
+ */
+@Deprecated
final public class VOverTreeNode extends VAcceptCriterion {
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java b/client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java
index 6ff0cc1e19..78a37bd16d 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java
@@ -17,10 +17,17 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with {@link DropTargetExtension}
+ */
+@Deprecated
@AcceptCriterion(ServerSideCriterion.class)
-final public class VServerAccept extends VAcceptCriterion {
+public final class VServerAccept extends VAcceptCriterion {
@Override
public void accept(final VDragEvent drag, UIDL configuration,
final VAcceptCallback callback) {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java b/client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java
index 1ddad16189..9c989c4f40 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java
@@ -18,10 +18,18 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.ComponentConnector;
import com.vaadin.client.UIDL;
import com.vaadin.event.dd.acceptcriteria.SourceIsTarget;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
+ */
+@Deprecated
@AcceptCriterion(SourceIsTarget.class)
-final public class VSourceIsTarget extends VAcceptCriterion {
+public final class VSourceIsTarget extends VAcceptCriterion {
@Override
protected boolean accept(VDragEvent drag, UIDL configuration) {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java b/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
index 16bd15bab3..908613ee1b 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
@@ -17,10 +17,18 @@ package com.vaadin.client.ui.dd;
import com.vaadin.client.UIDL;
import com.vaadin.event.dd.acceptcriteria.TargetDetailIs;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ui.dd.AcceptCriterion;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with
+ * {@link DropTargetExtension#setDropCriteria(String)}
+ */
+@Deprecated
@AcceptCriterion(TargetDetailIs.class)
-final public class VTargetDetailIs extends VAcceptCriterion {
+public final class VTargetDetailIs extends VAcceptCriterion {
@Override
protected boolean accept(VDragEvent drag, UIDL configuration) {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java b/client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java
index 804d9c1bcb..6f3ca4495a 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java
@@ -20,12 +20,16 @@ import java.util.HashMap;
import java.util.Map;
import com.vaadin.client.ComponentConnector;
+import com.vaadin.client.extensions.DragSourceExtensionConnector;
import com.vaadin.event.dd.DragSource;
/**
- * Client side counterpart for Transferable in com.vaadin.event.Transferable
+ * Client side counterpart for Transferable in com.vaadin.event.Transferable.
*
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with {@link DragSourceExtensionConnector}
*/
+@Deprecated
public class VTransferable {
private ComponentConnector component;
diff --git a/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java b/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
index 038d58afd0..47fb1ad682 100644
--- a/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
@@ -26,6 +26,8 @@ import com.vaadin.client.ConnectorMap;
import com.vaadin.client.Paintable;
import com.vaadin.client.UIDL;
import com.vaadin.client.VConsole;
+import com.vaadin.client.extensions.DragSourceExtensionConnector;
+import com.vaadin.client.extensions.DropTargetExtensionConnector;
import com.vaadin.client.ui.VDragAndDropWrapper;
import com.vaadin.client.ui.customcomponent.CustomComponentConnector;
import com.vaadin.shared.ui.Connect;
@@ -33,6 +35,13 @@ import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperConstants;
import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperServerRpc;
import com.vaadin.ui.DragAndDropWrapper;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with {@link DragSourceExtensionConnector} and
+ * {@link DropTargetExtensionConnector}.
+ */
+@Deprecated
@Connect(DragAndDropWrapper.class)
public class DragAndDropWrapperConnector extends CustomComponentConnector
implements Paintable, VDragAndDropWrapper.UploadHandler {
diff --git a/server/src/main/java/com/vaadin/event/Transferable.java b/server/src/main/java/com/vaadin/event/Transferable.java
index 706086de28..f75974a1cc 100644
--- a/server/src/main/java/com/vaadin/event/Transferable.java
+++ b/server/src/main/java/com/vaadin/event/Transferable.java
@@ -18,6 +18,8 @@ package com.vaadin.event;
import java.io.Serializable;
import java.util.Collection;
+import com.vaadin.event.dnd.DragSourceExtension;
+import com.vaadin.event.dnd.DropEvent;
import com.vaadin.ui.Component;
/**
@@ -25,7 +27,11 @@ import com.vaadin.ui.Component;
* Currently Transferable is only used for drag and drop.
*
* @since 6.3
+ * @deprecated Since 8.1 replaced by
+ * {@link DragSourceExtension#setTransferData(String, String)},
+ * {@link DropEvent#getTransferData(String)}.
*/
+@Deprecated
public interface Transferable extends Serializable {
/**
diff --git a/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java b/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java
index 93491b4274..6f66036e5a 100644
--- a/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java
+++ b/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java
@@ -19,6 +19,7 @@ import java.io.Serializable;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
+import com.vaadin.event.dnd.DropEvent;
/**
* DragAndDropEvent wraps information related to drag and drop operation. It is
@@ -31,8 +32,9 @@ import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
* current drop event in {@link TargetDetails} (generated by {@link DropTarget}.
*
* @since 6.3
- *
+ * @deprecated Replaced in 8.1 by {@link DropEvent}
*/
+@Deprecated
public class DragAndDropEvent implements Serializable {
private final Transferable transferable;
private final TargetDetails dropTargetDetails;
diff --git a/server/src/main/java/com/vaadin/event/dd/DragSource.java b/server/src/main/java/com/vaadin/event/dd/DragSource.java
index bf5983e502..8a3c8c32dc 100644
--- a/server/src/main/java/com/vaadin/event/dd/DragSource.java
+++ b/server/src/main/java/com/vaadin/event/dd/DragSource.java
@@ -19,6 +19,7 @@ import java.util.Map;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
+import com.vaadin.event.dnd.DragSourceExtension;
import com.vaadin.ui.Component;
/**
@@ -34,8 +35,9 @@ import com.vaadin.ui.Component;
* extend the data that will be available for {@link DropHandler}.
*
* @since 6.3
- *
+ * @deprecated Replaced in 8.1 by {@link DragSourceExtension}
*/
+@Deprecated
public interface DragSource extends Component {
/**
diff --git a/server/src/main/java/com/vaadin/event/dd/DropHandler.java b/server/src/main/java/com/vaadin/event/dd/DropHandler.java
index 9dd79277c8..d6183940e9 100644
--- a/server/src/main/java/com/vaadin/event/dd/DropHandler.java
+++ b/server/src/main/java/com/vaadin/event/dd/DropHandler.java
@@ -21,6 +21,7 @@ import com.vaadin.event.Transferable;
import com.vaadin.event.dd.acceptcriteria.AcceptAll;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
+import com.vaadin.event.dnd.DropListener;
/**
* DropHandlers contain the actual business logic for drag and drop operations.
@@ -31,8 +32,9 @@ import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
* all.
*
* @since 6.3
- *
+ * @deprecated Replaced in 8.1 by {@link DropListener}
*/
+@Deprecated
public interface DropHandler extends Serializable {
/**
diff --git a/server/src/main/java/com/vaadin/event/dd/DropTarget.java b/server/src/main/java/com/vaadin/event/dd/DropTarget.java
index 8a742b9c32..3d346418c0 100644
--- a/server/src/main/java/com/vaadin/event/dd/DropTarget.java
+++ b/server/src/main/java/com/vaadin/event/dd/DropTarget.java
@@ -17,6 +17,7 @@ package com.vaadin.event.dd;
import java.util.Map;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.ui.Component;
/**
@@ -25,7 +26,9 @@ import com.vaadin.ui.Component;
* and provide a {@link DropHandler} which will handle the actual drop event.
*
* @since 6.3
+ * @deprecated Replaced in 8.1 by {@link DropTargetExtension}.
*/
+@Deprecated
public interface DropTarget extends Component {
/**
diff --git a/server/src/main/java/com/vaadin/event/dd/TargetDetails.java b/server/src/main/java/com/vaadin/event/dd/TargetDetails.java
index b30d902dce..4a22958952 100644
--- a/server/src/main/java/com/vaadin/event/dd/TargetDetails.java
+++ b/server/src/main/java/com/vaadin/event/dd/TargetDetails.java
@@ -17,6 +17,8 @@ package com.vaadin.event.dd;
import java.io.Serializable;
+import com.vaadin.event.dnd.DropEvent;
+
/**
* TargetDetails wraps drop target related information about
* {@link DragAndDropEvent}.
@@ -27,8 +29,9 @@ import java.io.Serializable;
* drop target specific API.
*
* @since 6.3
- *
+ * @deprecated Replaced in 8.1 by {@link DropEvent#getTransferData(String)}
*/
+@Deprecated
public interface TargetDetails extends Serializable {
/**
diff --git a/server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java b/server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java
index 42bff9c007..fadc1877cf 100644
--- a/server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java
+++ b/server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java
@@ -18,6 +18,7 @@ package com.vaadin.event.dd;
import java.util.HashMap;
import java.util.Map;
+import com.vaadin.event.dnd.DropEvent;
import com.vaadin.shared.MouseEventDetails;
/**
@@ -25,8 +26,9 @@ import com.vaadin.shared.MouseEventDetails;
* implementation and for extension.
*
* @since 6.3
- *
+ * @deprecated Replaced in 8.1 by {@link DropEvent#getTransferData(String)}
*/
+@Deprecated
@SuppressWarnings("serial")
public class TargetDetailsImpl implements TargetDetails {
diff --git a/server/src/main/java/com/vaadin/server/DragAndDropService.java b/server/src/main/java/com/vaadin/server/DragAndDropService.java
index f43c68fd6f..11b830352f 100644
--- a/server/src/main/java/com/vaadin/server/DragAndDropService.java
+++ b/server/src/main/java/com/vaadin/server/DragAndDropService.java
@@ -33,6 +33,8 @@ import com.vaadin.event.dd.DropTarget;
import com.vaadin.event.dd.TargetDetails;
import com.vaadin.event.dd.TargetDetailsImpl;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
+import com.vaadin.event.dnd.DragSourceExtension;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.shared.ApplicationConstants;
import com.vaadin.shared.Registration;
import com.vaadin.shared.communication.SharedState;
@@ -42,6 +44,13 @@ import com.vaadin.ui.UI;
import elemental.json.JsonObject;
+/**
+ *
+ * @author Vaadin Ltd
+ * @deprecated Since 8.1, no direct replacement, see {@link DragSourceExtension}
+ * and {@link DropTargetExtension}.
+ */
+@Deprecated
public class DragAndDropService implements VariableOwner, ClientConnector {
private int lastVisitId;
diff --git a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
index d2079d8609..591cee6be5 100644
--- a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
+++ b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
@@ -33,6 +33,8 @@ import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.DropTarget;
import com.vaadin.event.dd.TargetDetails;
import com.vaadin.event.dd.TargetDetailsImpl;
+import com.vaadin.event.dnd.DragSourceExtension;
+import com.vaadin.event.dnd.DropTargetExtension;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.server.StreamVariable;
@@ -44,10 +46,22 @@ import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperServerRpc;
import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperState;
import com.vaadin.ui.declarative.DesignContext;
+/**
+ * @author Vaadin Ltd
+ * @deprecated Replaced in 8.1 with {@link DragSourceExtension} and
+ * {@link DropTargetExtension}.
+ */
@SuppressWarnings("serial")
+@Deprecated
public class DragAndDropWrapper extends CustomComponent
implements DropTarget, DragSource, LegacyComponent {
+ /**
+ * @deprecated Since 8.1, will be replaced by FileDropTargetExtension and
+ * FileDropEvent,
+ * https://github.com/vaadin/framework/issues/8891
+ */
+ @Deprecated
public class WrapperTransferable extends TransferableImpl {
private Html5File[] files;