From fc011f6a8a08064f48fd5f4280f1d4d3647ab7f1 Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 14 Dec 2016 13:50:06 +0200 Subject: Provide configuration for events order in month and week views --- .../v7/shared/ui/calendar/CalendarState.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'compatibility-shared/src/main') diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java index dd15c09b7f..646c7eed44 100644 --- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java +++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java @@ -40,6 +40,32 @@ public class CalendarState extends AbstractLegacyComponentState { public List actions; public boolean eventCaptionAsHtml; + public EventSortOrder eventSortOrder = EventSortOrder.DURATION_DESC; + + /** + * Defines sort strategy for events in calendar month view and week view. In + * month view events will be sorted from top to bottom using the order in + * day cell. In week view events inside same day will be sorted from left to + * right using the order if their intervals are overlapping. + *

+ *

+ */ + public enum EventSortOrder { + UNSORTED, START_DATE_DESC, START_DATE_ASC, DURATION_DESC, DURATION_ASC; + } + public static class Day implements java.io.Serializable { public String date; public String localizedDateFormat; -- cgit v1.2.3