diff options
author | Adam Wagner <wbadam@users.noreply.github.com> | 2017-03-30 13:18:10 +0300 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-04-12 14:58:11 +0300 |
commit | 659313e8c35e68d14fe2599b9bbb4dbba35fb4a3 (patch) | |
tree | 17c1c3c9bcad4043c79c7499262f076a56c96374 /shared/src | |
parent | 1ac4f9724106fcf4abaab892210122231710c6be (diff) | |
download | vaadin-framework-659313e8c35e68d14fe2599b9bbb4dbba35fb4a3.tar.gz vaadin-framework-659313e8c35e68d14fe2599b9bbb4dbba35fb4a3.zip |
Provide dragged Grid items in server side (#8950)
Fixes #8931
Diffstat (limited to 'shared/src')
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java | 2 | ||||
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceExtensionRpc.java | 50 |
2 files changed, 51 insertions, 1 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java b/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java index 4faf7ca139..1f016d5908 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java +++ b/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java @@ -27,7 +27,7 @@ import com.vaadin.shared.communication.ServerRpc; public interface DragSourceRpc extends ServerRpc { /** - * Called when dragsource event happens on client side. + * Called when dragstart event happens on client side. */ public void dragStart(); diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceExtensionRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceExtensionRpc.java new file mode 100644 index 0000000000..c0e24fe847 --- /dev/null +++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceExtensionRpc.java @@ -0,0 +1,50 @@ +/* + * Copyright 2000-2016 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.shared.ui.grid; + +import java.util.List; + +import com.vaadin.shared.communication.ServerRpc; +import com.vaadin.shared.ui.dnd.DropEffect; + +/** + * RPC for firing server side drag start and drag end events when the + * corresponding client side events happen on the drag source Grid. + * + * @author Vaadin Ltd. + * @since + */ +public interface GridDragSourceExtensionRpc extends ServerRpc { + + /** + * Called when dragstart event happens on client side. + * + * @param draggedItemKeys + * Keys of the items in Grid being dragged. + */ + public void dragStart(List<String> draggedItemKeys); + + /** + * Called when dragend event happens on client side. + * + * @param dropEffect + * Drop effect of the dragend event, extracted from {@code + * DataTransfer.dropEffect} parameter. + * @param draggedItemKeys + * Keys of the items in Grid having been dragged. + */ + public void dragEnd(DropEffect dropEffect, List<String> draggedItemKeys); +} |