diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-08-28 23:34:15 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-01-28 21:31:14 +0000 |
commit | 336299a558e74e7366482640c650716880886275 (patch) | |
tree | c8f6ef38ba9dd4efe76c882b2300a1a7ca21c04d /server/src | |
parent | 4ad7cefcc06e372df8b67a2456616d7410c768d8 (diff) | |
download | vaadin-framework-336299a558e74e7366482640c650716880886275.tar.gz vaadin-framework-336299a558e74e7366482640c650716880886275.zip |
Make getMouseEvent() method available in the TargetDetailsImpl (#13416).
Change-Id: I84f8e5485e5efcb39a9a22870a24354f4f2637a0
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/event/dd/TargetDetailsImpl.java | 10 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/Calendar.java | 3 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/DragAndDropWrapper.java | 9 |
3 files changed, 12 insertions, 10 deletions
diff --git a/server/src/com/vaadin/event/dd/TargetDetailsImpl.java b/server/src/com/vaadin/event/dd/TargetDetailsImpl.java index 1138215f3f..8a6ec506ba 100644 --- a/server/src/com/vaadin/event/dd/TargetDetailsImpl.java +++ b/server/src/com/vaadin/event/dd/TargetDetailsImpl.java @@ -18,6 +18,8 @@ package com.vaadin.event.dd; import java.util.HashMap; import java.util.Map; +import com.vaadin.shared.MouseEventDetails; + /** * A HashMap backed implementation of {@link TargetDetails} for terminal * implementation and for extension. @@ -41,6 +43,14 @@ public class TargetDetailsImpl implements TargetDetails { this.dropTarget = dropTarget; } + /** + * @return details about the actual event that caused the event details. + * Practically mouse move or mouse up. + */ + public MouseEventDetails getMouseEvent() { + return MouseEventDetails.deSerialize((String) getData("mouseEvent")); + } + @Override public Object getData(String key) { return data.get(key); diff --git a/server/src/com/vaadin/ui/Calendar.java b/server/src/com/vaadin/ui/Calendar.java index 206cc01d1a..e90d80072f 100644 --- a/server/src/com/vaadin/ui/Calendar.java +++ b/server/src/com/vaadin/ui/Calendar.java @@ -1457,7 +1457,7 @@ public class Calendar extends AbstractComponent implements @Override public TargetDetails translateDropTargetDetails( Map<String, Object> clientVariables) { - Map<String, Object> serverVariables = new HashMap<String, Object>(1); + Map<String, Object> serverVariables = new HashMap<String, Object>(); if (clientVariables.containsKey("dropSlotIndex")) { int slotIndex = (Integer) clientVariables.get("dropSlotIndex"); @@ -1477,6 +1477,7 @@ public class Calendar extends AbstractComponent implements currentCalendar.add(java.util.Calendar.DATE, dayIndex); serverVariables.put("dropDay", currentCalendar.getTime()); } + serverVariables.put("mouseEvent", clientVariables.get("mouseEvent")); CalendarTargetDetails td = new CalendarTargetDetails(serverVariables, this); diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java index 0e2e8f6d2f..6e4ec903d2 100644 --- a/server/src/com/vaadin/ui/DragAndDropWrapper.java +++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java @@ -132,15 +132,6 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, } /** - * @return details about the actual event that caused the event details. - * Practically mouse move or mouse up. - */ - public MouseEventDetails getMouseEvent() { - return MouseEventDetails - .deSerialize((String) getData("mouseEvent")); - } - - /** * @return a detail about the drags vertical position over the wrapper. */ public VerticalDropLocation getVerticalDropLocation() { |