From 1ac4f9724106fcf4abaab892210122231710c6be Mon Sep 17 00:00:00 2001 From: Adam Wagner Date: Thu, 16 Mar 2017 20:35:46 +0200 Subject: Make it possible to drop things on top of Grid rows (#8747) Fixes #8400 --- .../tests/components/grid/GridDragAndDrop.java | 31 +++++++++++++--------- .../widgetset/client/grid/EscalatorProxy.java | 9 +++++++ 2 files changed, 27 insertions(+), 13 deletions(-) (limited to 'uitest/src') diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java index a6036acac8..0c532e8762 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java @@ -20,28 +20,25 @@ import java.util.Arrays; import java.util.List; import java.util.stream.IntStream; -import com.vaadin.annotations.Widgetset; -import com.vaadin.event.dnd.DropTargetExtension; +import com.vaadin.event.dnd.grid.GridDropListener; +import com.vaadin.server.Page; import com.vaadin.server.VaadinRequest; -import com.vaadin.shared.ui.grid.GridDragSourceExtensionState; import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.ui.ComboBox; import com.vaadin.ui.Grid; import com.vaadin.ui.GridDragSourceExtension; +import com.vaadin.ui.GridDropTargetExtension; import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.Label; import com.vaadin.ui.Layout; import elemental.json.Json; import elemental.json.JsonObject; -@Widgetset("com.vaadin.DefaultWidgetSet") public class GridDragAndDrop extends AbstractTestUIWithLog { @Override protected void setup(VaadinRequest request) { - // Drag source + // Drag source Grid Grid dragSourceComponent = new Grid<>(); - dragSourceComponent.setItems(createItems(50)); dragSourceComponent.addColumn(Bean::getId).setCaption("ID"); dragSourceComponent.addColumn(Bean::getValue).setCaption("Value"); @@ -54,15 +51,20 @@ public class GridDragAndDrop extends AbstractTestUIWithLog { return ret; }); - Label dropTargetComponent = new Label("Drop here"); - DropTargetExtension