com.vaadin.ui.components.calendar.event
Interface CalendarEvent

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
EditableCalendarEvent
All Known Implementing Classes:
BasicEvent

public interface CalendarEvent
extends java.io.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
    static class CalendarEvent.EventChangeEvent
              Event to signal that an event has changed.
    static interface CalendarEvent.EventChangeListener
              Listener for EventSetChange events.
    static interface CalendarEvent.EventChangeNotifier
              Notifier interface for EventChange events.
     
    Method Summary
     java.lang.String getCaption()
              Gets caption of event.
     java.lang.String getDescription()
              Gets description of event.
     java.util.Date getEnd()
              Get end date of event.
     java.util.Date getStart()
              Gets start date of event.
     java.lang.String getStyleName()
               Gets style name of event.
     boolean isAllDay()
              An all-day event typically does not occur at a specific time but targets a whole day or days.
     

    Method Detail

    getStart

    java.util.Date getStart()
    Gets start date of event.

    Returns:
    Start date.

    getEnd

    java.util.Date getEnd()
    Get end date of event.

    Returns:
    End date;

    getCaption

    java.lang.String getCaption()
    Gets caption of event.

    Returns:
    Caption text

    getDescription

    java.lang.String getDescription()
    Gets description of event. Shown as a tooltip over the event.

    Returns:
    Description text.

    getStyleName

    java.lang.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


    Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.