Class Calendar
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.v7.ui.AbstractLegacyComponent
-
- com.vaadin.v7.ui.Calendar
-
- All Implemented Interfaces:
Action.Container,ConnectorEventListener,ContextClickEvent.ContextClickNotifier,DropTarget,MethodEventSource,SerializableEventListener,ClientConnector,Sizeable,VariableOwner,com.vaadin.shared.Connector,Component,LegacyComponent,CalendarComponentEvents.CalendarEventNotifier,CalendarComponentEvents.EventMoveNotifier,CalendarComponentEvents.EventResizeNotifier,CalendarComponentEvents.NavigationNotifier,CalendarComponentEvents.RangeSelectNotifier,CalendarEditableEventProvider,CalendarEventProvider,CalendarEventProvider.EventSetChangeListener,Serializable,EventListener
@Deprecated public class Calendar extends AbstractLegacyComponent implements CalendarComponentEvents.NavigationNotifier, CalendarComponentEvents.EventMoveNotifier, CalendarComponentEvents.RangeSelectNotifier, CalendarComponentEvents.EventResizeNotifier, CalendarEventProvider.EventSetChangeListener, DropTarget, CalendarEditableEventProvider, Action.Container, LegacyComponent
Deprecated.As of 8.0, no replacement available.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.
- You can set the viewable date range with the
setStartDate(Date)andsetEndDate(Date)methods. Calendar has a default date range of one week - Calendar has two kind of views: monthly and weekly view
- If date range is seven days or shorter, the weekly view is used.
- Calendar queries its events by using a
CalendarEventProvider. By default, aBasicEventProvideris used.
- Since:
- 7.1
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCalendar.TimeFormatDeprecated.-
Nested classes/interfaces inherited from interface com.vaadin.v7.ui.components.calendar.event.CalendarEventProvider
CalendarEventProvider.EventSetChangeEvent, CalendarEventProvider.EventSetChangeListener, CalendarEventProvider.EventSetChangeNotifier
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
Fields Modifier and Type Field Description protected CalendarcurrentCalendarDeprecated.Internal calendar data source.protected Calendar.TimeFormatcurrentTimeFormatDeprecated.Defines currently active format for time. 12H/24H.protected DateFormatdf_dateDeprecated.Date format that will be used in the UIDL for dates.protected DateFormatdf_date_timeDeprecated.Date format that will be used in the UIDL for both date and time.protected DateFormatdf_timeDeprecated.Time format that will be used in the UIDL for time.protected DateendDateDeprecated.Defines the calendar's date range ending point.protected List<CalendarEvent>eventsDeprecated.Internal buffer for the events that are retrieved from the event provider.protected DatestartDateDeprecated.Defines the calendar's date range starting point.protected TimeZonetimezoneDeprecated.Defines the component's active time zone.-
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
-
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddActionHandler(Action.Handler actionHandler)Deprecated.Adds an action handler to the calendar that handles event produced by the context menu.voidaddEvent(CalendarEvent event)Deprecated.Adds an event to the event provider.voidautoScaleVisibleHoursOfDay()Deprecated.Sets the displayed start and end time to fit all current events that were retrieved from the last call to getEvents().voidbeforeClientResponse(boolean initial)Deprecated.voidchangeVariables(Object source, Map<String,Object> variables)Deprecated.voideventSetChange(CalendarEventProvider.EventSetChangeEvent changeEvent)Deprecated.Called when the set of Events has changed.protected DateexpandEndDate(Date end, boolean expandToFullWeek)Deprecated.Finds the last day of the week and returns a day representing the end of that day.protected DateexpandStartDate(Date start, boolean expandToFullWeek)Deprecated.Finds the first day of the week and returns a day representing the start of that day.protected voidfireDateClick(Date date)Deprecated.Fires event when a date was clicked in the calendar.protected voidfireEventClick(Integer index)Deprecated.Fires event when a date was clicked in the calendar.protected voidfireEventMove(int index, Date newFromDatetime)Deprecated.Fires an event move event to all server side move listeners.protected voidfireEventResize(int index, Date startTime, Date endTime)Deprecated.Fires an event resize event.protected voidfireNavigationEvent(boolean forward)Deprecated.Fires an event when the user selecing moving forward/backward in the calendar.protected voidfireRangeSelect(Date from, Date to, boolean monthlyMode)Deprecated.Fires an event range selected event.protected voidfireWeekClick(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.DropHandlergetDropHandler()Deprecated.Get the currently active drop handler.DategetEndDate()Deprecated.Gets the calendar's end date.CalendarEventProvidergetEventProvider()Deprecated.List<CalendarEvent>getEvents(Date startDate, Date endDate)Deprecated.Gets all available events in the target date range between startDate and endDate.CalendarState.EventSortOrdergetEventSortOrder()Deprecated.Returns sort order for events.protected DategetFirstDateForWeek(Date date)Deprecated.Gets a date that is first day in the week that target given date belongs to.intgetFirstVisibleDayOfWeek()Deprecated.Get the first visible day of the week.intgetFirstVisibleHourOfDay()Deprecated.Returns the first visible hour in the week view.EventListenergetHandler(String eventId)Deprecated.Get the assigned event handler for the given eventId.CalendargetInternalCalendar()Deprecated.Get the internally used Calendar instance.protected DategetLastDateForWeek(Date date)Deprecated.Gets a date that is last day in the week that target given date belongs to.intgetLastVisibleDayOfWeek()Deprecated.Get the last visible day of the week.intgetLastVisibleHourOfDay()Deprecated.Returns the last visible hour in the week view.protected LoggergetLogger()Deprecated.Returns the logger for the calendar.protected String[]getMonthNamesShort()Deprecated.Localized display names for months starting from January.DategetStartDate()Deprecated.Gets the calendar's start date.CalendarStategetState()Deprecated.protected CalendarStategetState(boolean markAsDirty)Deprecated.Calendar.TimeFormatgetTimeFormat()Deprecated.Gets currently active time format.TimeZonegetTimeZone()Deprecated.Returns a time zone that is currently used by this component.StringgetWeeklyCaptionFormat()Deprecated.Gets the date caption format for the weekly view.protected booleanisClientChangeAllowed()Deprecated.Is the user allowed to trigger events which alters the events.booleanisEventCaptionAsHtml()Deprecated.Checks whether event captions are rendered as HTMLprotected booleanisEventClickAllowed()Deprecated.As of 7.4, overridefireEventClick(Integer)instead.booleanisMonthlyMode()Deprecated.Is the calendar in a mode where all days of the month is shown.voidpaintContent(PaintTarget target)Deprecated.voidreadDesign(org.jsoup.nodes.Element design, DesignContext designContext)Deprecated.voidremoveActionHandler(Action.Handler actionHandler)Deprecated.voidremoveEvent(CalendarEvent event)Deprecated.Removes an event from the event provider.voidresetVisibleHoursOfDay()Deprecated.Resets thesetFirstVisibleHourOfDay(int)andsetLastVisibleHourOfDay(int)to the default values, 0 and 23 respectively.voidsetContainerDataSource(Container.Indexed container)Deprecated.Sets a container as a data source for the events in the calendar.voidsetContainerDataSource(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 voidsetDefaultHandlers()Deprecated.Set all the wanted default handlers here.voidsetDropHandler(DropHandler dropHandler)Deprecated.Set the drop handler for the calendar SeeDropHandlerfor implementation details.voidsetEndDate(Date date)Deprecated.Sets end date for the calendar.voidsetEventCaptionAsHtml(boolean eventCaptionAsHtml)Deprecated.Sets whether the event captions are rendered as HTML.voidsetEventProvider(CalendarEventProvider calendarEventProvider)Deprecated.Set theCalendarEventProviderto be used with this calendar.voidsetEventSortOrder(CalendarState.EventSortOrder order)Deprecated.Sets sort order for events.voidsetFirstDayOfWeek(Integer dayOfWeek)Deprecated.Allow setting first day of week independent of Locale.voidsetFirstVisibleDayOfWeek(int firstDay)Deprecated.This method restricts the weekdays that are shown.voidsetFirstVisibleHourOfDay(int firstHour)Deprecated.This method restricts the hours that are shown per day.voidsetHandler(CalendarComponentEvents.BackwardHandler listener)Deprecated.Add a backward navigation listener.voidsetHandler(CalendarComponentEvents.DateClickHandler listener)Deprecated.Add a date click listener.voidsetHandler(CalendarComponentEvents.EventClickHandler listener)Deprecated.Add a event click listener.voidsetHandler(CalendarComponentEvents.EventMoveHandler listener)Deprecated.Set the EventMoveHandler.voidsetHandler(CalendarComponentEvents.EventResizeHandler listener)Deprecated.Set a EventResizeHandler.voidsetHandler(CalendarComponentEvents.ForwardHandler listener)Deprecated.Add a forward navigation listener.voidsetHandler(CalendarComponentEvents.RangeSelectHandler listener)Deprecated.Set the RangeSelectHandler that listens for drag-marking.voidsetHandler(CalendarComponentEvents.WeekClickHandler listener)Deprecated.Add a week click listener.protected voidsetHandler(String eventId, Class<?> eventType, SerializableEventListener listener, Method listenerMethod)Deprecated.Set the handler for the given type information.voidsetLastVisibleDayOfWeek(int lastDay)Deprecated.This method restricts the weekdays that are shown.voidsetLastVisibleHourOfDay(int lastHour)Deprecated.This method restricts the hours that are shown per day.voidsetLocale(Locale newLocale)Deprecated.Sets the locale to be used in the Calendar component.voidsetStartDate(Date date)Deprecated.Sets start date for the calendar.voidsetTimeFormat(Calendar.TimeFormat format)Deprecated.Example:setTimeFormat(TimeFormat.Format12H);
Set to null, if you want the format being defined by the locale.voidsetTimeZone(TimeZone zone)Deprecated.Set time zone that this component will use.voidsetWeeklyCaptionFormat(String dateFormatPattern)Deprecated.Sets custom date format for the weekly view.TargetDetailstranslateDropTargetDetails(Map<String,Object> clientVariables)Deprecated.voidwriteDesign(org.jsoup.nodes.Element design, DesignContext designContext)Deprecated.-
Methods inherited from class com.vaadin.v7.ui.AbstractLegacyComponent
getExplicitImmediateValue, isImmediate, isReadOnly, setImmediate, setReadOnly
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, 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, setHeightFull, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, 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, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, 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, setVisible
-
Methods inherited from interface com.vaadin.ui.LegacyComponent
markAsDirty
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from interface com.vaadin.server.VariableOwner
isEnabled
-
-
-
-
Field Detail
-
currentTimeFormat
protected Calendar.TimeFormat currentTimeFormat
Deprecated.Defines currently active format for time. 12H/24H.
-
currentCalendar
protected Calendar currentCalendar
Deprecated.Internal calendar data source.
-
timezone
protected TimeZone timezone
Deprecated.Defines the component's active time zone.
-
startDate
protected Date startDate
Deprecated.Defines the calendar's date range starting point.
-
endDate
protected Date endDate
Deprecated.Defines the calendar's date range ending point.
-
events
protected List<CalendarEvent> events
Deprecated.Internal buffer for the events that are retrieved from the event provider.
-
df_date
protected DateFormat df_date
Deprecated.Date format that will be used in the UIDL for dates.
-
df_time
protected DateFormat df_time
Deprecated.Time format that will be used in the UIDL for time.
-
df_date_time
protected DateFormat df_date_time
Deprecated.Date format that will be used in the UIDL for both date and time.
-
-
Constructor Detail
-
Calendar
public Calendar()
Deprecated.Construct a Vaadin Calendar with a BasicEventProvider and no caption. Default date range is one week.
-
Calendar
public Calendar(String caption)
Deprecated.Construct a Vaadin Calendar with a BasicEventProvider and the provided caption. Default date range is one week.- Parameters:
caption-
-
Calendar
public Calendar(CalendarEventProvider eventProvider)
Deprecated.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)andsetEndDate(Date)to change this.- Parameters:
eventProvider- Event provider, cannot be null.
-
Calendar
public Calendar(String caption, CalendarEventProvider eventProvider)
Deprecated.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)andsetEndDate(Date)to change this.- Parameters:
eventProvider- Event provider, cannot be null.
-
-
Method Detail
-
getLogger
protected Logger getLogger()
Deprecated.Returns the logger for the calendar.
-
getState
public CalendarState getState()
Deprecated.- Overrides:
getStatein classAbstractLegacyComponent
-
getState
protected CalendarState getState(boolean markAsDirty)
Deprecated.- Overrides:
getStatein classAbstractLegacyComponent
-
beforeClientResponse
public void beforeClientResponse(boolean initial)
Deprecated.- Specified by:
beforeClientResponsein interfaceClientConnector- Overrides:
beforeClientResponsein classAbstractLegacyComponent
-
setDefaultHandlers
protected void setDefaultHandlers()
Deprecated.Set all the wanted default handlers here. This is always called after constructing this object. All other events have default handlers except range and event click.
-
getStartDate
public Date getStartDate()
Deprecated.Gets the calendar's start date.- Returns:
- First visible date.
-
setStartDate
public void setStartDate(Date date)
Deprecated.Sets start date for the calendar. This andsetEndDate(Date)control the range of dates visible on the component. The default range is one week.- Parameters:
date- First visible date to show.
-
getEndDate
public Date getEndDate()
Deprecated.Gets the calendar's end date.- Returns:
- Last visible date.
-
setEndDate
public void setEndDate(Date date)
Deprecated.Sets end date for the calendar. Starting from startDate, only six weeks will be shown if duration to endDate is longer than six weeks. This andsetStartDate(Date)control the range of dates visible on the component. The default range is one week.- Parameters:
date- Last visible date to show.
-
setLocale
public void setLocale(Locale newLocale)
Deprecated.Sets the locale to be used in the Calendar component.- Overrides:
setLocalein classAbstractComponent- See Also:
AbstractComponent.setLocale(java.util.Locale)
-
autoScaleVisibleHoursOfDay
public void autoScaleVisibleHoursOfDay()
Deprecated.Sets the displayed start and end time to fit all current events that were retrieved from the last call to getEvents().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!
-
resetVisibleHoursOfDay
public void resetVisibleHoursOfDay()
Deprecated.Resets thesetFirstVisibleHourOfDay(int)andsetLastVisibleHourOfDay(int)to the default values, 0 and 23 respectively.
-
getTimeFormat
public Calendar.TimeFormat getTimeFormat()
Deprecated.Gets currently active time format. Value is either TimeFormat.Format12H or TimeFormat.Format24H.- Returns:
- TimeFormat Format for the time.
-
setTimeFormat
public void setTimeFormat(Calendar.TimeFormat format)
Deprecated.Example:setTimeFormat(TimeFormat.Format12H);
Set to null, if you want the format being defined by the locale.- Parameters:
format- Set 12h or 24h format. Default is defined by the locale.
-
getTimeZone
public TimeZone getTimeZone()
Deprecated.Returns a time zone that is currently used by this component.- Returns:
- Component's Time zone
-
setTimeZone
public void setTimeZone(TimeZone zone)
Deprecated.Set time zone that this component will use. Null value sets the default time zone.- Parameters:
zone- Time zone to use
-
getInternalCalendar
public Calendar getInternalCalendar()
Deprecated.Get the internally used Calendar instance. This is the currently used instance ofCalendarbut is bound to change during the lifetime of the component.- Returns:
- the currently used java calendar
-
setFirstVisibleDayOfWeek
public void setFirstVisibleDayOfWeek(int firstDay)
Deprecated.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)andsetEndDate(Date).- Parameters:
firstDay- the first day of the week to show, between 1 and 7
-
getFirstVisibleDayOfWeek
public int getFirstVisibleDayOfWeek()
Deprecated.Get the first visible day of the week. Returns the weekdays as integers represented byCalendar.DAY_OF_WEEK- Returns:
- An integer representing the week day according to
Calendar.DAY_OF_WEEK
-
setLastVisibleDayOfWeek
public void setLastVisibleDayOfWeek(int lastDay)
Deprecated.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)andsetEndDate(Date).- Parameters:
lastDay- the first day of the week to show, between 1 and 7
-
getLastVisibleDayOfWeek
public int getLastVisibleDayOfWeek()
Deprecated.Get the last visible day of the week. Returns the weekdays as integers represented byCalendar.DAY_OF_WEEK- Returns:
- An integer representing the week day according to
Calendar.DAY_OF_WEEK
-
setFirstVisibleHourOfDay
public void setFirstVisibleHourOfDay(int firstHour)
Deprecated.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
You can usesetStartDate(Date)andsetEndDate(Date).autoScaleVisibleHoursOfDay()for automatic scaling of the visible hours based on current events.- Parameters:
firstHour- the first hour of the day to show, between 0 and 23- See Also:
autoScaleVisibleHoursOfDay()
-
getFirstVisibleHourOfDay
public int getFirstVisibleHourOfDay()
Deprecated.Returns the first visible hour in the week view. Returns the hour using a 24h time format
-
setLastVisibleHourOfDay
public void setLastVisibleHourOfDay(int lastHour)
Deprecated.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)andsetEndDate(Date).You can use
autoScaleVisibleHoursOfDay()for automatic scaling of the visible hours based on current events.- Parameters:
lastHour- the first hour of the day to show, between 0 and 23- See Also:
autoScaleVisibleHoursOfDay()
-
getLastVisibleHourOfDay
public int getLastVisibleHourOfDay()
Deprecated.Returns the last visible hour in the week view. Returns the hour using a 24h time format
-
getWeeklyCaptionFormat
public String getWeeklyCaptionFormat()
Deprecated.Gets the date caption format for the weekly view.- Returns:
- The pattern used in caption of dates in weekly view.
-
setWeeklyCaptionFormat
public void setWeeklyCaptionFormat(String dateFormatPattern)
Deprecated.Sets custom date format for the weekly view. This is the caption of the date. Format could be like "mmm MM/dd".- Parameters:
dateFormatPattern- The date caption pattern.
-
setEventSortOrder
public void setEventSortOrder(CalendarState.EventSortOrder order)
Deprecated.Sets sort order for events. By default sort order isCalendarState.EventSortOrder.DURATION_DESC.- Parameters:
order- sort strategy for events
-
getEventSortOrder
public CalendarState.EventSortOrder getEventSortOrder()
Deprecated.Returns sort order for events.- Returns:
- currently active sort strategy
-
isClientChangeAllowed
protected boolean isClientChangeAllowed()
Deprecated.Is the user allowed to trigger events which alters the events.- Returns:
- true if the client is allowed to send changes to server
- See Also:
isEventClickAllowed()
-
isEventClickAllowed
@Deprecated protected boolean isEventClickAllowed()
Deprecated.As of 7.4, overridefireEventClick(Integer)instead.Is the user allowed to trigger click events. Returnstrueby default. Subclass can override this method to disallow firing event clicks got from the client side.- Returns:
- true if the client is allowed to click events
- See Also:
isClientChangeAllowed()
-
fireNavigationEvent
protected void fireNavigationEvent(boolean forward)
Deprecated.Fires an event when the user selecing moving forward/backward in the calendar.- Parameters:
forward- True if the calendar moved forward else backward is assumed.
-
fireEventMove
protected void fireEventMove(int index, Date newFromDatetime)Deprecated.Fires an event move event to all server side move listeners.- Parameters:
index- The index of the event in the events listnewFromDatetime- The changed from date time
-
fireWeekClick
protected void fireWeekClick(int week, int year)Deprecated.Fires event when a week was clicked in the calendar.- Parameters:
week- The week that was clickedyear- The year of the week
-
fireEventClick
protected void fireEventClick(Integer index)
Deprecated.Fires event when a date was clicked in the calendar. Uses an existing event from the event cache.- Parameters:
index- The index of the event in the event cache.
-
fireDateClick
protected void fireDateClick(Date date)
Deprecated.Fires event when a date was clicked in the calendar. Creates a new event for the date and passes it to the listener.- Parameters:
date- The date and time that was clicked
-
fireRangeSelect
protected void fireRangeSelect(Date from, Date to, boolean monthlyMode)
Deprecated.Fires an event range selected event. The event is fired when a user highlights an area in the calendar. The highlighted areas start and end dates are returned as arguments.- Parameters:
from- The start date and time of the highlighted areato- The end date and time of the highlighted areamonthlyMode- Is the calendar in monthly mode
-
fireEventResize
protected void fireEventResize(int index, Date startTime, Date endTime)Deprecated.Fires an event resize event. The event is fired when a user resizes the event in the calendar causing the time range of the event to increase or decrease. The new start and end times are returned as arguments to this method.- Parameters:
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 event
-
getDayNamesShort
protected String[] getDayNamesShort()
Deprecated.Localized display names for week days starting from sunday. Returned array's length is always 7.- Returns:
- Array of localized weekday names.
-
getMonthNamesShort
protected String[] getMonthNamesShort()
Deprecated.Localized display names for months starting from January. Returned array's length is always 12.- Returns:
- Array of localized month names.
-
getFirstDateForWeek
protected Date getFirstDateForWeek(Date date)
Deprecated.Gets a date that is first day in the week that target given date belongs to.- Parameters:
date- Target date- Returns:
- Date that is first date in same week that given date is.
-
getLastDateForWeek
protected Date getLastDateForWeek(Date date)
Deprecated.Gets a date that is last day in the week that target given date belongs to.- Parameters:
date- Target date- Returns:
- Date that is last date in same week that given date is.
-
expandStartDate
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.- Parameters:
start- The actual dateexpandToFullWeek- Should the returned date be moved to the start of the week- Returns:
- If expandToFullWeek is set then it returns the first day of the week, else it returns a clone of the actual date with the time set to the start of the day
-
expandEndDate
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.- Parameters:
end- The actual dateexpandToFullWeek- Should the returned date be moved to the end of the week- Returns:
- If expandToFullWeek is set then it returns the last day of the week, else it returns a clone of the actual date with the time set to the end of the day
-
setEventProvider
public void setEventProvider(CalendarEventProvider calendarEventProvider)
Deprecated.Set theCalendarEventProviderto be used with this calendar. The EventProvider is used to query for events to show, and must be non-null. By default aBasicEventProvideris used.- Parameters:
calendarEventProvider- the calendarEventProvider to set. Cannot be null.
-
getEventProvider
public CalendarEventProvider getEventProvider()
Deprecated.- Returns:
- the
CalendarEventProvidercurrently used
-
eventSetChange
public void eventSetChange(CalendarEventProvider.EventSetChangeEvent changeEvent)
Deprecated.Description copied from interface:CalendarEventProvider.EventSetChangeListenerCalled when the set of Events has changed.- Specified by:
eventSetChangein interfaceCalendarEventProvider.EventSetChangeListener
-
setHandler
protected void setHandler(String eventId, Class<?> eventType, SerializableEventListener listener, Method listenerMethod)
Deprecated.Set the handler for the given type information. MirrorsaddListenerfrom AbstractComponent- Parameters:
eventId- A unique id for the event. Usually one ofCalendarEventIdeventType- The class of the event, most likely a subclass ofCalendarComponentEventlistener- A listener that listens to the given eventlistenerMethod- The method on the lister to call when the event is triggered
-
setHandler
public void setHandler(CalendarComponentEvents.ForwardHandler listener)
Deprecated.Description copied from interface:CalendarComponentEvents.NavigationNotifierAdd a forward navigation listener.- Specified by:
setHandlerin interfaceCalendarComponentEvents.NavigationNotifier- Parameters:
listener- ForwardHandler to be added.
-
setHandler
public void setHandler(CalendarComponentEvents.BackwardHandler listener)
Deprecated.Description copied from interface:CalendarComponentEvents.NavigationNotifierAdd a backward navigation listener.- Specified by:
setHandlerin interfaceCalendarComponentEvents.NavigationNotifier- Parameters:
listener- BackwardHandler to be added.
-
setHandler
public void setHandler(CalendarComponentEvents.DateClickHandler listener)
Deprecated.Description copied from interface:CalendarComponentEvents.NavigationNotifierAdd a date click listener.- Specified by:
setHandlerin interfaceCalendarComponentEvents.NavigationNotifier- Parameters:
listener- DateClickHandler to be added.
-
setHandler
public void setHandler(CalendarComponentEvents.EventClickHandler listener)
Deprecated.Description copied from interface:CalendarComponentEvents.NavigationNotifierAdd a event click listener.- Specified by:
setHandlerin interfaceCalendarComponentEvents.NavigationNotifier- Parameters:
listener- EventClickHandler to be added.
-
setHandler
public void setHandler(CalendarComponentEvents.WeekClickHandler listener)
Deprecated.Description copied from interface:CalendarComponentEvents.NavigationNotifierAdd a week click listener.- Specified by:
setHandlerin interfaceCalendarComponentEvents.NavigationNotifier- Parameters:
listener- WeekClickHandler to be added.
-
setHandler
public void setHandler(CalendarComponentEvents.EventResizeHandler listener)
Deprecated.Description copied from interface:CalendarComponentEvents.EventResizeNotifierSet a EventResizeHandler.- Specified by:
setHandlerin interfaceCalendarComponentEvents.EventResizeNotifier- Parameters:
listener- EventResizeHandler to be set
-
setHandler
public void setHandler(CalendarComponentEvents.RangeSelectHandler listener)
Deprecated.Description copied from interface:CalendarComponentEvents.RangeSelectNotifierSet the RangeSelectHandler that listens for drag-marking.- Specified by:
setHandlerin interfaceCalendarComponentEvents.RangeSelectNotifier- Parameters:
listener- RangeSelectHandler to be added.
-
setHandler
public void setHandler(CalendarComponentEvents.EventMoveHandler listener)
Deprecated.Description copied from interface:CalendarComponentEvents.EventMoveNotifierSet the EventMoveHandler.- Specified by:
setHandlerin interfaceCalendarComponentEvents.EventMoveNotifier- Parameters:
listener- EventMoveHandler to be added
-
getHandler
public EventListener getHandler(String eventId)
Deprecated.Description copied from interface:CalendarComponentEvents.CalendarEventNotifierGet the assigned event handler for the given eventId.- Specified by:
getHandlerin interfaceCalendarComponentEvents.CalendarEventNotifier- Returns:
- the assigned eventHandler, or null if no handler is assigned
-
getDropHandler
public DropHandler getDropHandler()
Deprecated.Get the currently active drop handler.- Specified by:
getDropHandlerin interfaceDropTarget
-
setDropHandler
public void setDropHandler(DropHandler dropHandler)
Deprecated.Set the drop handler for the calendar SeeDropHandlerfor implementation details.- Parameters:
dropHandler- The drop handler to set
-
translateDropTargetDetails
public TargetDetails translateDropTargetDetails(Map<String,Object> clientVariables)
Deprecated.- Specified by:
translateDropTargetDetailsin interfaceDropTarget
-
setContainerDataSource
public void setContainerDataSource(Container.Indexed container)
Deprecated.Sets a container as a data source for the events in the calendar. Equivalent for doingCalendar.setEventProvider(new ContainerEventProvider(container))Use this method if you are adding a container which uses the default property ids likeBeanItemContainerfor instance. If you are using custom properties instead usesetContainerDataSource(Container.Indexed, Object, Object, Object, Object, Object)Please note that the container must be sorted by date!- Parameters:
container- The container to use as a datasource
-
setContainerDataSource
public 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. Equivalent for doingCalendar.setEventProvider(new ContainerEventProvider(container))Please note that the container must be sorted by date!- Parameters:
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 present
-
getEvents
public List<CalendarEvent> getEvents(Date startDate, Date endDate)
Deprecated.Description copied from interface: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.
- Specified by:
getEventsin interfaceCalendarEventProvider- Parameters:
startDate- Start dateendDate- End date- Returns:
- List of events
-
addEvent
public void addEvent(CalendarEvent event)
Deprecated.Description copied from interface:CalendarEditableEventProviderAdds an event to the event provider.- Specified by:
addEventin interfaceCalendarEditableEventProvider- Parameters:
event- The event to add
-
removeEvent
public void removeEvent(CalendarEvent event)
Deprecated.Description copied from interface:CalendarEditableEventProviderRemoves an event from the event provider.- Specified by:
removeEventin interfaceCalendarEditableEventProvider- Parameters:
event- The event
-
addActionHandler
public void addActionHandler(Action.Handler actionHandler)
Deprecated.Adds an action handler to the calendar that handles event produced by the context menu.
TheAction.Handler.getActions(Object, Object)parameters depend on what view the Calendar is in:- If the Calendar is in Day or Week View then the target
parameter will be a
CalendarDateRangewith a range of half-an-hour. TheAction.Handler.getActions(Object, Object)method will be called once per half-hour slot. - If the Calendar is in Month View then the target parameter
will be a
CalendarDateRangewith a range of one day. TheAction.Handler.getActions(Object, Object)will be called once for each day.
The Dates passed into the
TheCalendarDateRangeare in the same timezone as the calendar is.Action.Handler.handleAction(Action, Object, Object)parameters depend on what the context menu is called upon:- If the context menu is called upon an event then the target parameter
is the event, i.e. instanceof
CalendarEvent - If the context menu is called upon an empty slot then the target is a
Daterepresenting that slot
- Specified by:
addActionHandlerin interfaceAction.Container
- If the Calendar is in Day or Week View then the target
parameter will be a
-
isMonthlyMode
public boolean isMonthlyMode()
Deprecated.Is the calendar in a mode where all days of the month is shown.- Returns:
- Returns true if calendar is in monthly mode and false if it is in weekly mode
-
removeActionHandler
public void removeActionHandler(Action.Handler actionHandler)
Deprecated.- Specified by:
removeActionHandlerin interfaceAction.Container
-
changeVariables
public void changeVariables(Object source, Map<String,Object> variables)
Deprecated.- Specified by:
changeVariablesin interfaceVariableOwner
-
paintContent
public void paintContent(PaintTarget target) throws PaintException
Deprecated.- Specified by:
paintContentin interfaceLegacyComponent- Throws:
PaintException
-
setEventCaptionAsHtml
public void setEventCaptionAsHtml(boolean eventCaptionAsHtml)
Deprecated.Sets whether the event captions are rendered as HTML.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.
- Parameters:
eventCaptionAsHtml-trueif the captions are rendered as HTML,falseif rendered as plain text
-
isEventCaptionAsHtml
public boolean isEventCaptionAsHtml()
Deprecated.Checks whether event captions are rendered as HTMLThe default is false, i.e. to render that caption as plain text.
- Returns:
- true if the captions are rendered as HTML, false if rendered as plain text
-
readDesign
public void readDesign(org.jsoup.nodes.Element design, DesignContext designContext)Deprecated.- Specified by:
readDesignin interfaceComponent- Overrides:
readDesignin classAbstractLegacyComponent
-
writeDesign
public void writeDesign(org.jsoup.nodes.Element design, DesignContext designContext)Deprecated.- Specified by:
writeDesignin interfaceComponent- Overrides:
writeDesignin classAbstractLegacyComponent
-
getCustomAttributes
protected Collection<String> getCustomAttributes()
Deprecated.- Overrides:
getCustomAttributesin classAbstractComponent
-
setFirstDayOfWeek
public void setFirstDayOfWeek(Integer dayOfWeek)
Deprecated.Allow setting first day of week independent of Locale. Set to null if you want first day of week being defined by the locale- Parameters:
dayOfWeek- any of java.util.Calendar.SUNDAY..java.util.Calendar.SATURDAY or null to revert to default first day of week by locale- Since:
- 7.6
-
-