@Deprecated public class BasicEvent extends Object implements EditableCalendarEvent, CalendarEvent.EventChangeNotifier
CalendarEvent
. Has setters for all required fields and fires events when
this event is changed.CalendarEvent.EventChangeEvent, CalendarEvent.EventChangeListener, CalendarEvent.EventChangeNotifier
Constructor and Description |
---|
BasicEvent()
Deprecated.
Default constructor.
|
BasicEvent(String caption,
String description,
Date date)
Deprecated.
Constructor for creating an event with the same start and end date.
|
BasicEvent(String caption,
String description,
Date startDate,
Date endDate)
Deprecated.
Constructor for creating an event with a start date and an end date.
|
Modifier and Type | Method and Description |
---|---|
void |
addEventChangeListener(CalendarEvent.EventChangeListener listener)
Deprecated.
Add a listener to listen for EventChangeEvents.
|
protected void |
fireEventChange()
Deprecated.
Fires an event change event to the listeners.
|
String |
getCaption()
Deprecated.
Gets caption of event.
|
String |
getDescription()
Deprecated.
Gets description of event.
|
Date |
getEnd()
Deprecated.
Get end date of event.
|
Date |
getStart()
Deprecated.
Gets start date of event.
|
String |
getStyleName()
Deprecated.
Gets style name of event.
|
boolean |
isAllDay()
Deprecated.
An all-day event typically does not occur at a specific time but targets
a whole day or days.
|
void |
removeEventChangeListener(CalendarEvent.EventChangeListener listener)
Deprecated.
Remove a listener from the event provider.
|
void |
setAllDay(boolean isAllDay)
Deprecated.
Does the event span the whole day.
|
void |
setCaption(String caption)
Deprecated.
Set the visible text in the calendar for the event.
|
void |
setDescription(String description)
Deprecated.
Set the description of the event.
|
void |
setEnd(Date end)
Deprecated.
Set the end date of the event.
|
void |
setStart(Date start)
Deprecated.
Set the start date for the event.
|
void |
setStyleName(String styleName)
Deprecated.
Set the style name for the event used for styling the event cells.
|
public BasicEvent()
public BasicEvent(String caption, String description, Date date)
caption
- The caption for the eventdescription
- The description for the eventdate
- The date the event occurredpublic BasicEvent(String caption, String description, Date startDate, Date endDate)
caption
- The caption for the eventdescription
- The description for the eventstartDate
- The start date of the eventendDate
- The end date of the eventpublic String getCaption()
CalendarEvent
getCaption
in interface CalendarEvent
public String getDescription()
CalendarEvent
getDescription
in interface CalendarEvent
public Date getEnd()
CalendarEvent
getEnd
in interface CalendarEvent
public Date getStart()
CalendarEvent
getStart
in interface CalendarEvent
public String getStyleName()
CalendarEvent
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;
}
getStyleName
in interface CalendarEvent
public boolean isAllDay()
CalendarEvent
isAllDay
in interface CalendarEvent
public void setCaption(String caption)
EditableCalendarEvent
setCaption
in interface EditableCalendarEvent
caption
- The text to show in the calendarpublic void setDescription(String description)
EditableCalendarEvent
setDescription
in interface EditableCalendarEvent
description
- The text which describes the eventpublic void setEnd(Date end)
EditableCalendarEvent
setEnd
in interface EditableCalendarEvent
end
- The end date to setpublic void setStart(Date start)
EditableCalendarEvent
setStart
in interface EditableCalendarEvent
start
- The start date of the eventpublic void setStyleName(String styleName)
EditableCalendarEvent
setStyleName
in interface EditableCalendarEvent
styleName
- The stylename to usepublic void setAllDay(boolean isAllDay)
EditableCalendarEvent
setAllDay
in interface EditableCalendarEvent
isAllDay
- True if the event spans the whole day. In this case the start
and end times are ignored.public void addEventChangeListener(CalendarEvent.EventChangeListener listener)
CalendarEvent.EventChangeNotifier
addEventChangeListener
in interface CalendarEvent.EventChangeNotifier
listener
- The listener to addpublic void removeEventChangeListener(CalendarEvent.EventChangeListener listener)
CalendarEvent.EventChangeNotifier
removeEventChangeListener
in interface CalendarEvent.EventChangeNotifier
listener
- The listener to removeprotected void fireEventChange()
Copyright © 2020 Vaadin Ltd. All rights reserved.