com.vaadin.v7.shared.ui.calendar.CalendarState Maven / Gradle / Ivy
/*
* Copyright (C) 2000-2024 Vaadin Ltd
*
* This program is available under Vaadin Commercial License and Service Terms.
*
* See for the full
* license.
*/
package com.vaadin.v7.shared.ui.calendar;
import java.util.List;
import com.vaadin.v7.shared.AbstractLegacyComponentState;
/**
* @since 7.1.0
* @author Vaadin Ltd.
*/
public class CalendarState extends AbstractLegacyComponentState {
public boolean format24H;
public String[] dayNames;
public String[] monthNames;
public int firstVisibleDayOfWeek = 1;
public int lastVisibleDayOfWeek = 7;
public int firstHourOfDay = 0;
public int lastHourOfDay = 23;
public int firstDayOfWeek;
public int scroll;
public String now;
public List days;
public List events;
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.
*
*
* - {@code UNSORTED} means no sort. Events will be in the order provided
* by com.vaadin.ui.components.calendar.event.CalendarEventProvider.
*
- {@code START_DATE_DESC} means descending sort by events start date
* (earlier event are shown first).
*
- {@code DURATION_DESC} means descending sort by duration (longer event
* are shown first).
*
- {@code START_DATE_ASC} means ascending sort by events start date
* (later event are shown first).
*
- {@code DURATION_ASC} means ascending sort by duration (shorter event
* are shown first).
*
*
*/
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;
public int dayOfWeek;
public int week;
public int yearOfWeek;
}
public static class Action implements java.io.Serializable {
public String caption;
public String iconKey;
public String actionKey;
public String startDate;
public String endDate;
}
public static class Event implements java.io.Serializable {
public int index;
public String caption;
public String dateFrom;
public String dateTo;
public String timeFrom;
public String timeTo;
public String styleName;
public String description;
public boolean allDay;
}
}