@Deprecated public class Calendar extends AbstractLegacyComponent implements CalendarComponentEvents.NavigationNotifier, CalendarComponentEvents.EventMoveNotifier, CalendarComponentEvents.RangeSelectNotifier, CalendarComponentEvents.EventResizeNotifier, CalendarEventProvider.EventSetChangeListener, DropTarget, CalendarEditableEventProvider, Action.Container, LegacyComponent
Vaadin Calendar is for visualizing events in a calendar. Calendar events can be visualized in the variable length view depending on the start and end dates.
setStartDate(Date)
and setEndDate(Date) methods. Calendar has a default date range of
one weekCalendarEventProvider. By
default, a BasicEventProvider is used.| Modifier and Type | Class and Description |
|---|---|
static class |
Calendar.TimeFormat
Deprecated.
|
CalendarEventProvider.EventSetChangeEvent, CalendarEventProvider.EventSetChangeListener, CalendarEventProvider.EventSetChangeNotifierComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.Unit| Modifier and Type | Field and Description |
|---|---|
protected Calendar |
currentCalendar
Deprecated.
Internal calendar data source.
|
protected Calendar.TimeFormat |
currentTimeFormat
Deprecated.
Defines currently active format for time.
|
protected DateFormat |
df_date
Deprecated.
Date format that will be used in the UIDL for dates.
|
protected DateFormat |
df_date_time
Deprecated.
Date format that will be used in the UIDL for both date and time.
|
protected DateFormat |
df_time
Deprecated.
Time format that will be used in the UIDL for time.
|
protected Date |
endDate
Deprecated.
Defines the calendar's date range ending point.
|
protected List<CalendarEvent> |
events
Deprecated.
Internal buffer for the events that are retrieved from the event
provider.
|
protected Date |
startDate
Deprecated.
Defines the calendar's date range starting point.
|
protected TimeZone |
timezone
Deprecated.
Defines the component's active time zone.
|
DESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
Calendar()
Deprecated.
Construct a Vaadin Calendar with a BasicEventProvider and no caption.
|
Calendar(CalendarEventProvider eventProvider)
Deprecated.
Construct a Vaadin Calendar with event provider.
|
Calendar(String caption)
Deprecated.
Construct a Vaadin Calendar with a BasicEventProvider and the provided
caption.
|
Calendar(String caption,
CalendarEventProvider eventProvider)
Deprecated.
Construct a Vaadin Calendar with event provider and a caption.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionHandler(Action.Handler actionHandler)
Deprecated.
Adds an action handler to the calendar that handles event produced by the
context menu.
|
void |
addEvent(CalendarEvent event)
Deprecated.
Adds an event to the event provider.
|
void |
autoScaleVisibleHoursOfDay()
Deprecated.
Sets the displayed start and end time to fit all current events that were
retrieved from the last call to getEvents().
|
void |
beforeClientResponse(boolean initial)
Deprecated.
|
void |
changeVariables(Object source,
Map<String,Object> variables)
Deprecated.
|
void |
eventSetChange(CalendarEventProvider.EventSetChangeEvent changeEvent)
Deprecated.
Called when the set of Events has changed.
|
protected Date |
expandEndDate(Date end,
boolean expandToFullWeek)
Deprecated.
Finds the last day of the week and returns a day representing the end of
that day.
|
protected Date |
expandStartDate(Date start,
boolean expandToFullWeek)
Deprecated.
Finds the first day of the week and returns a day representing the start
of that day.
|
protected void |
fireDateClick(Date date)
Deprecated.
Fires event when a date was clicked in the calendar.
|
protected void |
fireEventClick(Integer index)
Deprecated.
Fires event when a date was clicked in the calendar.
|
protected void |
fireEventMove(int index,
Date newFromDatetime)
Deprecated.
Fires an event move event to all server side move listeners.
|
protected void |
fireEventResize(int index,
Date startTime,
Date endTime)
Deprecated.
Fires an event resize event.
|
protected void |
fireNavigationEvent(boolean forward)
Deprecated.
Fires an event when the user selecing moving forward/backward in the
calendar.
|
protected void |
fireRangeSelect(Date from,
Date to,
boolean monthlyMode)
Deprecated.
Fires an event range selected event.
|
protected void |
fireWeekClick(int week,
int year)
Deprecated.
Fires event when a week was clicked in the calendar.
|
protected Collection<String> |
getCustomAttributes()
Deprecated.
|
protected String[] |
getDayNamesShort()
Deprecated.
Localized display names for week days starting from sunday.
|
DropHandler |
getDropHandler()
Deprecated.
Get the currently active drop handler.
|
Date |
getEndDate()
Deprecated.
Gets the calendar's end date.
|
CalendarEventProvider |
getEventProvider()
Deprecated.
|
List<CalendarEvent> |
getEvents(Date startDate,
Date endDate)
Deprecated.
Gets all available events in the target date range between startDate and
endDate.
|
CalendarState.EventSortOrder |
getEventSortOrder()
Deprecated.
Returns sort order for events.
|
protected Date |
getFirstDateForWeek(Date date)
Deprecated.
Gets a date that is first day in the week that target given date belongs
to.
|
int |
getFirstVisibleDayOfWeek()
Deprecated.
Get the first visible day of the week.
|
int |
getFirstVisibleHourOfDay()
Deprecated.
Returns the first visible hour in the week view.
|
EventListener |
getHandler(String eventId)
Deprecated.
Get the assigned event handler for the given eventId.
|
Calendar |
getInternalCalendar()
Deprecated.
Get the internally used Calendar instance.
|
protected Date |
getLastDateForWeek(Date date)
Deprecated.
Gets a date that is last day in the week that target given date belongs
to.
|
int |
getLastVisibleDayOfWeek()
Deprecated.
Get the last visible day of the week.
|
int |
getLastVisibleHourOfDay()
Deprecated.
Returns the last visible hour in the week view.
|
protected Logger |
getLogger()
Deprecated.
Returns the logger for the calendar.
|
protected String[] |
getMonthNamesShort()
Deprecated.
Localized display names for months starting from January.
|
Date |
getStartDate()
Deprecated.
Gets the calendar's start date.
|
CalendarState |
getState()
Deprecated.
|
protected CalendarState |
getState(boolean markAsDirty)
Deprecated.
|
Calendar.TimeFormat |
getTimeFormat()
Deprecated.
Gets currently active time format.
|
TimeZone |
getTimeZone()
Deprecated.
Returns a time zone that is currently used by this component.
|
String |
getWeeklyCaptionFormat()
Deprecated.
Gets the date caption format for the weekly view.
|
protected boolean |
isClientChangeAllowed()
Deprecated.
Is the user allowed to trigger events which alters the events.
|
boolean |
isEventCaptionAsHtml()
Deprecated.
Checks whether event captions are rendered as HTML
|
protected boolean |
isEventClickAllowed()
Deprecated.
As of 7.4, override
fireEventClick(Integer) instead. |
boolean |
isMonthlyMode()
Deprecated.
Is the calendar in a mode where all days of the month is shown.
|
void |
paintContent(PaintTarget target)
Deprecated.
|
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Deprecated.
|
void |
removeActionHandler(Action.Handler actionHandler)
Deprecated.
|
void |
removeEvent(CalendarEvent event)
Deprecated.
Removes an event from the event provider.
|
void |
resetVisibleHoursOfDay()
Deprecated.
Resets the
setFirstVisibleHourOfDay(int) and
setLastVisibleHourOfDay(int) to the default values, 0 and 23
respectively. |
void |
setContainerDataSource(Container.Indexed container)
Deprecated.
Sets a container as a data source for the events in the calendar.
|
void |
setContainerDataSource(Container.Indexed container,
Object captionProperty,
Object descriptionProperty,
Object startDateProperty,
Object endDateProperty,
Object styleNameProperty)
Deprecated.
Sets a container as a data source for the events in the calendar.
|
protected void |
setDefaultHandlers()
Deprecated.
Set all the wanted default handlers here.
|
void |
setDropHandler(DropHandler dropHandler)
Deprecated.
Set the drop handler for the calendar See
DropHandler for
implementation details. |
void |
setEndDate(Date date)
Deprecated.
Sets end date for the calendar.
|
void |
setEventCaptionAsHtml(boolean eventCaptionAsHtml)
Deprecated.
Sets whether the event captions are rendered as HTML.
|
void |
setEventProvider(CalendarEventProvider calendarEventProvider)
Deprecated.
Set the
CalendarEventProvider to be used with this calendar. |
void |
setEventSortOrder(CalendarState.EventSortOrder order)
Deprecated.
Sets sort order for events.
|
void |
setFirstDayOfWeek(Integer dayOfWeek)
Deprecated.
Allow setting first day of week independent of Locale.
|
void |
setFirstVisibleDayOfWeek(int firstDay)
Deprecated.
This method restricts the weekdays that are shown.
|
void |
setFirstVisibleHourOfDay(int firstHour)
Deprecated.
This method restricts the hours that are shown per day.
|
void |
setHandler(CalendarComponentEvents.BackwardHandler listener)
Deprecated.
Add a backward navigation listener.
|
void |
setHandler(CalendarComponentEvents.DateClickHandler listener)
Deprecated.
Add a date click listener.
|
void |
setHandler(CalendarComponentEvents.EventClickHandler listener)
Deprecated.
Add a event click listener.
|
void |
setHandler(CalendarComponentEvents.EventMoveHandler listener)
Deprecated.
Set the EventMoveHandler.
|
void |
setHandler(CalendarComponentEvents.EventResizeHandler listener)
Deprecated.
Set a EventResizeHandler.
|
void |
setHandler(CalendarComponentEvents.ForwardHandler listener)
Deprecated.
Add a forward navigation listener.
|
void |
setHandler(CalendarComponentEvents.RangeSelectHandler listener)
Deprecated.
Set the RangeSelectHandler that listens for drag-marking.
|
void |
setHandler(CalendarComponentEvents.WeekClickHandler listener)
Deprecated.
Add a week click listener.
|
protected void |
setHandler(String eventId,
Class<?> eventType,
EventListener listener,
Method listenerMethod)
Deprecated.
Set the handler for the given type information.
|
void |
setLastVisibleDayOfWeek(int lastDay)
Deprecated.
This method restricts the weekdays that are shown.
|
void |
setLastVisibleHourOfDay(int lastHour)
Deprecated.
This method restricts the hours that are shown per day.
|
void |
setLocale(Locale newLocale)
Deprecated.
Sets the locale to be used in the Calendar component.
|
void |
setStartDate(Date date)
Deprecated.
Sets start date for the calendar.
|
void |
setTimeFormat(Calendar.TimeFormat format)
Deprecated.
Example:
setTimeFormat(TimeFormat.Format12H);Set to null, if you want the format being defined by the locale. |
void |
setTimeZone(TimeZone zone)
Deprecated.
Set time zone that this component will use.
|
void |
setWeeklyCaptionFormat(String dateFormatPattern)
Deprecated.
Sets custom date format for the weekly view.
|
TargetDetails |
translateDropTargetDetails(Map<String,Object> clientVariables)
Deprecated.
|
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Deprecated.
|
getExplicitImmediateValue, isImmediate, isReadOnly, setImmediate, setReadOnlyaddContextClickListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitmarkAsDirtyisEnabledaddListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedprotected Calendar.TimeFormat currentTimeFormat
protected Calendar currentCalendar
protected TimeZone timezone
protected Date startDate
protected Date endDate
protected List<CalendarEvent> events
protected DateFormat df_date
protected DateFormat df_time
protected DateFormat df_date_time
public Calendar()
public Calendar(String caption)
caption - public Calendar(CalendarEventProvider eventProvider)
Construct a Vaadin Calendar with event provider. Event provider is obligatory, because calendar component will query active events through it.
By default, Vaadin Calendar will show dates from the start of the current
week to the end of the current week. Use setStartDate(Date) and
setEndDate(Date) to change this.
eventProvider - Event provider, cannot be null.public Calendar(String caption, CalendarEventProvider eventProvider)
Construct a Vaadin Calendar with event provider and a caption. Event provider is obligatory, because calendar component will query active events through it.
By default, Vaadin Calendar will show dates from the start of the current
week to the end of the current week. Use setStartDate(Date) and
setEndDate(Date) to change this.
eventProvider - Event provider, cannot be null.protected Logger getLogger()
public CalendarState getState()
getState in class AbstractLegacyComponentprotected CalendarState getState(boolean markAsDirty)
getState in class AbstractLegacyComponentpublic void beforeClientResponse(boolean initial)
beforeClientResponse in interface ClientConnectorbeforeClientResponse in class AbstractLegacyComponentprotected void setDefaultHandlers()
public Date getStartDate()
public void setStartDate(Date date)
setEndDate(Date)
control the range of dates visible on the component. The default range is
one week.date - First visible date to show.public Date getEndDate()
public void setEndDate(Date date)
setStartDate(Date) control the range of dates visible
on the component. The default range is one week.date - Last visible date to show.public void setLocale(Locale newLocale)
setLocale in class AbstractComponentAbstractComponent.setLocale(java.util.Locale)public void autoScaleVisibleHoursOfDay()
If no events exist, nothing happens.
NOTE: triggering this method only does this once for the current events - events that are not in the current visible range, are ignored!
public void resetVisibleHoursOfDay()
setFirstVisibleHourOfDay(int) and
setLastVisibleHourOfDay(int) to the default values, 0 and 23
respectively.public Calendar.TimeFormat getTimeFormat()
public void setTimeFormat(Calendar.TimeFormat format)
setTimeFormat(TimeFormat.Format12H);format - Set 12h or 24h format. Default is defined by the locale.public TimeZone getTimeZone()
public void setTimeZone(TimeZone zone)
zone - Time zone to usepublic Calendar getInternalCalendar()
Calendar but is bound to change during the
lifetime of the component.public void setFirstVisibleDayOfWeek(int firstDay)
This method restricts the weekdays that are shown. This affects both the monthly and the weekly view. The general contract is that firstDay < lastDay.
Note that this only affects the rendering process. Events are still
requested by the dates set by setStartDate(Date) and
setEndDate(Date).
firstDay - the first day of the week to show, between 1 and 7public int getFirstVisibleDayOfWeek()
Calendar.DAY_OF_WEEKCalendar.DAY_OF_WEEKpublic void setLastVisibleDayOfWeek(int lastDay)
This method restricts the weekdays that are shown. This affects both the monthly and the weekly view. The general contract is that firstDay < lastDay.
Note that this only affects the rendering process. Events are still
requested by the dates set by setStartDate(Date) and
setEndDate(Date).
lastDay - the first day of the week to show, between 1 and 7public int getLastVisibleDayOfWeek()
Calendar.DAY_OF_WEEKCalendar.DAY_OF_WEEKpublic void setFirstVisibleHourOfDay(int firstHour)
This method restricts the hours that are shown per day. This affects the weekly view. The general contract is that firstHour < lastHour.
Note that this only affects the rendering process. Events are still
requested by the dates set by setStartDate(Date) and
setEndDate(Date).
autoScaleVisibleHoursOfDay() for automatic scaling
of the visible hours based on current events.firstHour - the first hour of the day to show, between 0 and 23autoScaleVisibleHoursOfDay()public int getFirstVisibleHourOfDay()
public void setLastVisibleHourOfDay(int lastHour)
Note that this only affects the rendering process. Events are still
requested by the dates set by setStartDate(Date) and
setEndDate(Date).
You can use autoScaleVisibleHoursOfDay() for automatic scaling
of the visible hours based on current events.
lastHour - the first hour of the day to show, between 0 and 23autoScaleVisibleHoursOfDay()public int getLastVisibleHourOfDay()
public String getWeeklyCaptionFormat()
public void setWeeklyCaptionFormat(String dateFormatPattern)
dateFormatPattern - The date caption pattern.public void setEventSortOrder(CalendarState.EventSortOrder order)
CalendarState.EventSortOrder.DURATION_DESC.order - sort strategy for eventspublic CalendarState.EventSortOrder getEventSortOrder()
protected boolean isClientChangeAllowed()
isEventClickAllowed()@Deprecated protected boolean isEventClickAllowed()
fireEventClick(Integer) instead.true by
default. Subclass can override this method to disallow firing event
clicks got from the client side.isClientChangeAllowed()protected void fireNavigationEvent(boolean forward)
forward - True if the calendar moved forward else backward is assumed.protected void fireEventMove(int index,
Date newFromDatetime)
index - The index of the event in the events listnewFromDatetime - The changed from date timeprotected void fireWeekClick(int week,
int year)
week - The week that was clickedyear - The year of the weekprotected void fireEventClick(Integer index)
index - The index of the event in the event cache.protected void fireDateClick(Date date)
date - The date and time that was clickedprotected void fireRangeSelect(Date from, Date to, boolean monthlyMode)
from - The start date and time of the highlighted areato - The end date and time of the highlighted areamonthlyMode - Is the calendar in monthly modeprotected void fireEventResize(int index,
Date startTime,
Date endTime)
index - The index of the event in the event cachestartTime - The new start date and time of the eventendTime - The new end date and time of the eventprotected String[] getDayNamesShort()
protected String[] getMonthNamesShort()
protected Date getFirstDateForWeek(Date date)
date - Target dateprotected Date getLastDateForWeek(Date date)
date - Target dateprotected Date expandStartDate(Date start, boolean expandToFullWeek)
start - The actual dateexpandToFullWeek - Should the returned date be moved to the start of the weekprotected Date expandEndDate(Date end, boolean expandToFullWeek)
end - The actual dateexpandToFullWeek - Should the returned date be moved to the end of the weekpublic void setEventProvider(CalendarEventProvider calendarEventProvider)
CalendarEventProvider to be used with this calendar. The
EventProvider is used to query for events to show, and must be non-null.
By default a BasicEventProvider is used.calendarEventProvider - the calendarEventProvider to set. Cannot be null.public CalendarEventProvider getEventProvider()
CalendarEventProvider currently usedpublic void eventSetChange(CalendarEventProvider.EventSetChangeEvent changeEvent)
CalendarEventProvider.EventSetChangeListenereventSetChange in interface CalendarEventProvider.EventSetChangeListenerprotected void setHandler(String eventId, Class<?> eventType, EventListener listener, Method listenerMethod)
addListener from
AbstractComponenteventId - A unique id for the event. Usually one of
CalendarEventIdeventType - The class of the event, most likely a subclass of
CalendarComponentEventlistener - A listener that listens to the given eventlistenerMethod - The method on the lister to call when the event is triggeredpublic void setHandler(CalendarComponentEvents.ForwardHandler listener)
CalendarComponentEvents.NavigationNotifiersetHandler in interface CalendarComponentEvents.NavigationNotifierlistener - ForwardHandler to be added.public void setHandler(CalendarComponentEvents.BackwardHandler listener)
CalendarComponentEvents.NavigationNotifiersetHandler in interface CalendarComponentEvents.NavigationNotifierlistener - BackwardHandler to be added.public void setHandler(CalendarComponentEvents.DateClickHandler listener)
CalendarComponentEvents.NavigationNotifiersetHandler in interface CalendarComponentEvents.NavigationNotifierlistener - DateClickHandler to be added.public void setHandler(CalendarComponentEvents.EventClickHandler listener)
CalendarComponentEvents.NavigationNotifiersetHandler in interface CalendarComponentEvents.NavigationNotifierlistener - EventClickHandler to be added.public void setHandler(CalendarComponentEvents.WeekClickHandler listener)
CalendarComponentEvents.NavigationNotifiersetHandler in interface CalendarComponentEvents.NavigationNotifierlistener - WeekClickHandler to be added.public void setHandler(CalendarComponentEvents.EventResizeHandler listener)
CalendarComponentEvents.EventResizeNotifiersetHandler in interface CalendarComponentEvents.EventResizeNotifierlistener - EventResizeHandler to be setpublic void setHandler(CalendarComponentEvents.RangeSelectHandler listener)
CalendarComponentEvents.RangeSelectNotifiersetHandler in interface CalendarComponentEvents.RangeSelectNotifierlistener - RangeSelectHandler to be added.public void setHandler(CalendarComponentEvents.EventMoveHandler listener)
CalendarComponentEvents.EventMoveNotifiersetHandler in interface CalendarComponentEvents.EventMoveNotifierlistener - EventMoveHandler to be addedpublic EventListener getHandler(String eventId)
CalendarComponentEvents.CalendarEventNotifiergetHandler in interface CalendarComponentEvents.CalendarEventNotifierpublic DropHandler getDropHandler()
getDropHandler in interface DropTargetpublic void setDropHandler(DropHandler dropHandler)
DropHandler for
implementation details.dropHandler - The drop handler to setpublic TargetDetails translateDropTargetDetails(Map<String,Object> clientVariables)
translateDropTargetDetails in interface DropTargetpublic void setContainerDataSource(Container.Indexed container)
Calendar.setEventProvider(new ContainerEventProvider(container))
Use this method if you are adding a container which uses the default
property ids like BeanItemContainer for instance. If you are
using custom properties instead use
setContainerDataSource(Container.Indexed, Object, Object, Object, Object, Object)
Please note that the container must be sorted by date!container - The container to use as a datasourcepublic void setContainerDataSource(Container.Indexed container, Object captionProperty, Object descriptionProperty, Object startDateProperty, Object endDateProperty, Object styleNameProperty)
Calendar.setEventProvider(new ContainerEventProvider(container))
Please note that the container must be sorted by date!container - The container to use as a data sourcecaptionProperty - The property that has the caption, null if no caption property
is presentdescriptionProperty - The property that has the description, null if no description
property is presentstartDateProperty - The property that has the starting dateendDateProperty - The property that has the ending datestyleNameProperty - The property that has the stylename, null if no stylname
property is presentpublic List<CalendarEvent> getEvents(Date startDate, Date endDate)
CalendarEventProviderGets all available events in the target date range between startDate and endDate. The Vaadin Calendar queries the events from the range that is shown, which is not guaranteed to be the same as the date range that is set.
For example, if you set the date range to be monday 22.2.2010 - wednesday 24.2.2010, the used Event Provider will be queried for events between monday 22.2.2010 00:00 and sunday 28.2.2010 23:59. Generally you can expect the date range to be expanded to whole days and whole weeks.
getEvents in interface CalendarEventProviderstartDate - Start dateendDate - End datepublic void addEvent(CalendarEvent event)
CalendarEditableEventProvideraddEvent in interface CalendarEditableEventProviderevent - The event to addpublic void removeEvent(CalendarEvent event)
CalendarEditableEventProviderremoveEvent in interface CalendarEditableEventProviderevent - The eventpublic void addActionHandler(Action.Handler actionHandler)
The Action.Handler.getActions(Object, Object) parameters depend on what
view the Calendar is in:
CalendarDateRange with a range of
half-an-hour. The Action.Handler.getActions(Object, Object) method will
be called once per half-hour slot.CalendarDateRange with a range of one day. The
Action.Handler.getActions(Object, Object) will be called once for each
day.
CalendarDateRange are in the same
timezone as the calendar is.
The Action.Handler.handleAction(Action, Object, Object) parameters
depend on what the context menu is called upon:
CalendarEventDate representing that slot
addActionHandler in interface Action.Containerpublic boolean isMonthlyMode()
public void removeActionHandler(Action.Handler actionHandler)
removeActionHandler in interface Action.Containerpublic void changeVariables(Object source, Map<String,Object> variables)
changeVariables in interface VariableOwnerpublic void paintContent(PaintTarget target) throws PaintException
paintContent in interface LegacyComponentPaintExceptionpublic void setEventCaptionAsHtml(boolean eventCaptionAsHtml)
If set to true, the captions are rendered in the browser as HTML and the developer is responsible for ensuring no harmful HTML is used. If set to false, the caption is rendered in the browser as plain text.
The default is false, i.e. to render that caption as plain text.
eventCaptionAsHtml - true if the captions are rendered as HTML,
false if rendered as plain textpublic boolean isEventCaptionAsHtml()
The default is false, i.e. to render that caption as plain text.
public void readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
readDesign in interface ComponentreadDesign in class AbstractLegacyComponentpublic void writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
writeDesign in interface ComponentwriteDesign in class AbstractLegacyComponentprotected Collection<String> getCustomAttributes()
getCustomAttributes in class AbstractComponentpublic void setFirstDayOfWeek(Integer dayOfWeek)
dayOfWeek - any of java.util.Calendar.SUNDAY..java.util.Calendar.SATURDAY
or null to revert to default first day of week by localeCopyright © 2019 Vaadin Ltd. All rights reserved.