summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-05-30 16:19:47 +0300
committerVaadin Code Review <review@vaadin.com>2013-06-03 11:07:19 +0000
commit84bf5a77e678f6d8a73f71d42fea2300b4f174cc (patch)
tree2ed75e51eeea42700edccf2ba571fac7ab6c6a77 /server
parent03830aeb46d93d675fa01c35ce3700e30a4a9c7d (diff)
downloadvaadin-framework-84bf5a77e678f6d8a73f71d42fea2300b4f174cc.tar.gz
vaadin-framework-84bf5a77e678f6d8a73f71d42fea2300b4f174cc.zip
Enabled drag & drop to Calendar #11048
Change-Id: I2dcc1f7159a6283cfbc0baafe6cba66530bf0a45
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/ui/Calendar.java31
1 files changed, 30 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/Calendar.java b/server/src/com/vaadin/ui/Calendar.java
index 38fa355dd8..c3385baa2c 100644
--- a/server/src/com/vaadin/ui/Calendar.java
+++ b/server/src/com/vaadin/ui/Calendar.java
@@ -45,6 +45,8 @@ import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.DropTarget;
import com.vaadin.event.dd.TargetDetails;
import com.vaadin.server.KeyMapper;
+import com.vaadin.server.PaintException;
+import com.vaadin.server.PaintTarget;
import com.vaadin.shared.ui.calendar.CalendarEventId;
import com.vaadin.shared.ui.calendar.CalendarServerRpc;
import com.vaadin.shared.ui.calendar.CalendarState;
@@ -114,7 +116,7 @@ public class Calendar extends AbstractComponent implements
CalendarComponentEvents.RangeSelectNotifier,
CalendarComponentEvents.EventResizeNotifier,
CalendarEventProvider.EventSetChangeListener, DropTarget,
- CalendarEditableEventProvider, Action.Container {
+ CalendarEditableEventProvider, Action.Container, LegacyComponent {
/**
* Calendar can use either 12 hours clock or 24 hours clock.
@@ -1842,4 +1844,31 @@ public class Calendar extends AbstractComponent implements
}
}
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.server.VariableOwner#changeVariables(java.lang.Object,
+ * java.util.Map)
+ */
+ @Override
+ public void changeVariables(Object source, Map<String, Object> variables) {
+ /*
+ * Only defined to fulfill the LegacyComponent interface used for
+ * calendar drag & drop. No implementation required.
+ */
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.vaadin.ui.LegacyComponent#paintContent(com.vaadin.server.PaintTarget)
+ */
+ @Override
+ public void paintContent(PaintTarget target) throws PaintException {
+ if (dropHandler != null) {
+ dropHandler.getAcceptCriterion().paint(target);
+ }
+ }
} \ No newline at end of file