Interface CalendarEvent
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
EditableCalendarEvent
- All Known Implementing Classes:
BasicEvent
public interface CalendarEvent extends Serializable
Event in the calendar. Customize your own event by implementing this interface.
- Start and end fields are mandatory.
- In "allDay" events longer than one day, starting and ending clock times are omitted in UI and only dates are shown.
- Since:
- 7.1.0
- Author:
- Vaadin Ltd.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCalendarEvent.EventChangeEventEvent to signal that an event has changed.static interfaceCalendarEvent.EventChangeListenerListener for EventSetChange events.static interfaceCalendarEvent.EventChangeNotifierNotifier interface for EventChange events.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetCaption()Gets caption of event.StringgetDescription()Gets description of event.DategetEnd()Get end date of event.DategetStart()Gets start date of event.StringgetStyleName()Gets style name of event.booleanisAllDay()An all-day event typically does not occur at a specific time but targets a whole day or days.
-
-
-
Method Detail
-
getStart
Date getStart()
Gets start date of event.- Returns:
- Start date.
-
getEnd
Date getEnd()
Get end date of event.- Returns:
- End date;
-
getCaption
String getCaption()
Gets caption of event.- Returns:
- Caption text
-
getDescription
String getDescription()
Gets description of event. Shown as a tooltip over the event.- Returns:
- Description text.
-
getStyleName
String getStyleName()
Gets style name of event. In the client, style name will be set to the event's element class name and can be styled by CSS
Styling example:
Java code:
event.setStyleName("color1");
CSS:
.v-calendar-event-color1 {
background-color: #9effae;
}- Returns:
- Style name.
-
isAllDay
boolean isAllDay()
An all-day event typically does not occur at a specific time but targets a whole day or days. The rendering of all-day events differs from normal events.- Returns:
- true if this event is an all-day event, false otherwise
-
-