diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-08-17 18:04:11 +0300 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2014-10-16 15:47:50 +0300 |
commit | c3219ae8636181c1dd60373304515d85fc3b7d40 (patch) | |
tree | 6b2455633ae34afcd15d810f5023956448f0d107 /server/src | |
parent | 33f3e452fba575d7be58e46d6f79dde1e571a89f (diff) | |
download | vaadin-framework-c3219ae8636181c1dd60373304515d85fc3b7d40.tar.gz vaadin-framework-c3219ae8636181c1dd60373304515d85fc3b7d40.zip |
All day property support is added to ContainerEventProvider (#14178).
Change-Id: I8d5580895a218440a8295ed79453d6cbe24195b1
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java b/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java index a8804caedb..8dff224627 100644 --- a/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java +++ b/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java @@ -61,6 +61,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, public static final String STARTDATE_PROPERTY = "start"; public static final String ENDDATE_PROPERTY = "end"; public static final String STYLENAME_PROPERTY = "styleName"; + public static final String ALL_DAY_PROPERTY = "allDay"; /** * Internal class to keep the container index which item this event @@ -106,6 +107,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, private Object startDateProperty = STARTDATE_PROPERTY; private Object endDateProperty = ENDDATE_PROPERTY; private Object styleNameProperty = STYLENAME_PROPERTY; + private Object allDayProperty = ALL_DAY_PROPERTY; /** * Constructor @@ -227,6 +229,11 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, basicEvent.setStyleName(String.valueOf(item.getItemProperty( styleNameProperty).getValue())); } + if (allDayProperty != null + && item.getItemPropertyIds().contains(allDayProperty)) { + basicEvent.setAllDay((Boolean) item.getItemProperty( + allDayProperty).getValue()); + } event = basicEvent; } return event; @@ -433,6 +440,20 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, this.styleNameProperty = styleNameProperty; } + /** + * Set the all day property for the event + */ + public void setAllDayProperty(Object allDayProperty) { + this.allDayProperty = allDayProperty; + } + + /** + * Get the all day property for the event + */ + public Object getAllDayProperty() { + return allDayProperty; + } + /* * (non-Javadoc) * |