diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2017-03-22 08:32:34 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-03-22 08:32:34 +0200 |
commit | 9a679b57d13cce81dab5d6283767adba83e8c735 (patch) | |
tree | d912b443876ead90d80c969edcb8f165f18d7ff7 /server | |
parent | d1fa1a3efe08e0843a38947dcd8ffe65e04ed12c (diff) | |
download | vaadin-framework-9a679b57d13cce81dab5d6283767adba83e8c735.tar.gz vaadin-framework-9a679b57d13cce81dab5d6283767adba83e8c735.zip |
Deprecate old DnD functionality (#8864)
Closes #8795
Diffstat (limited to 'server')
9 files changed, 48 insertions, 5 deletions
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; |