aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/event
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin/event')
-rw-r--r--server/src/main/java/com/vaadin/event/dnd/DragEndEvent.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/event/dnd/DragEndEvent.java b/server/src/main/java/com/vaadin/event/dnd/DragEndEvent.java
index 7b304404de..5e0739d2d9 100644
--- a/server/src/main/java/com/vaadin/event/dnd/DragEndEvent.java
+++ b/server/src/main/java/com/vaadin/event/dnd/DragEndEvent.java
@@ -70,6 +70,17 @@ public class DragEndEvent<T extends AbstractComponent> extends Component.Event {
}
/**
+ * Returns whether the drag event was cancelled. This is a shorthand for
+ * {@code dropEffect == NONE}.
+ *
+ * @return {@code true} if the drop event was cancelled, {@code false}
+ * otherwise.
+ */
+ public boolean isCanceled() {
+ return getDropEffect() == DropEffect.NONE;
+ }
+
+ /**
* Returns the drag source component where the dragend event occurred.
*
* @return Component which was dragged.