|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.Calendar
public class Calendar
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.
Nested Class Summary | |
---|---|
static class |
Calendar.TimeFormat
Calendar can use either 12 hours clock or 24 hours clock. |
Nested classes/interfaces inherited from interface com.vaadin.ui.components.calendar.event.CalendarEventProvider |
---|
CalendarEventProvider.EventSetChangeEvent, CalendarEventProvider.EventSetChangeListener, CalendarEventProvider.EventSetChangeNotifier |
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.ClientConnector |
---|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener |
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
---|
Sizeable.Unit |
Field Summary | |
---|---|
protected java.util.Calendar |
currentCalendar
Internal calendar data source. |
protected Calendar.TimeFormat |
currentTimeFormat
Defines currently active format for time. |
protected java.text.DateFormat |
df_date
Date format that will be used in the UIDL for dates. |
protected java.text.DateFormat |
df_date_time
Date format that will be used in the UIDL for both date and time. |
protected java.text.DateFormat |
df_time
Time format that will be used in the UIDL for time. |
protected java.util.Date |
endDate
Defines the calendar's date range ending point. |
protected java.util.List<CalendarEvent> |
events
Internal buffer for the events that are retrieved from the event provider. |
protected java.util.Date |
startDate
Defines the calendar's date range starting point. |
protected java.util.TimeZone |
timezone
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 | |
---|---|
Calendar()
Construct a Vaadin Calendar with a BasicEventProvider and no caption. |
|
Calendar(CalendarEventProvider eventProvider)
Construct a Vaadin Calendar with event provider. |
|
Calendar(java.lang.String caption)
Construct a Vaadin Calendar with a BasicEventProvider and the provided caption. |
|
Calendar(java.lang.String caption,
CalendarEventProvider eventProvider)
Construct a Vaadin Calendar with event provider and a caption. |
Method Summary | |
---|---|
void |
addActionHandler(Action.Handler actionHandler)
Adds an action handler to the calender that handles event produced by the context menu. |
void |
addEvent(CalendarEvent event)
Adds an event to the event provider |
void |
beforeClientResponse(boolean initial)
Called before the shared state and RPC invocations are sent to the client. |
void |
changeVariables(java.lang.Object source,
java.util.Map<java.lang.String,java.lang.Object> variables)
Called when one or more variables handled by the implementing class are changed. |
void |
eventSetChange(CalendarEventProvider.EventSetChangeEvent changeEvent)
Called when the set of Events has changed. |
protected java.util.Date |
expandEndDate(java.util.Date end,
boolean expandToFullWeek)
Finds the last day of the week and returns a day representing the end of that day |
protected java.util.Date |
expandStartDate(java.util.Date start,
boolean expandToFullWeek)
Finds the first day of the week and returns a day representing the start of that day |
protected void |
fireDateClick(java.util.Date date)
Fires event when a date was clicked in the calendar. |
protected void |
fireEventClick(java.lang.Integer index)
Fires event when a date was clicked in the calendar. |
protected void |
fireEventMove(int index,
java.util.Date newFromDatetime)
Fires an event move event to all server side move listerners |
protected void |
fireEventResize(int index,
java.util.Date startTime,
java.util.Date endTime)
Fires an event resize event. |
protected void |
fireNavigationEvent(boolean forward)
Fires an event when the user selecing moving forward/backward in the calendar. |
protected void |
fireRangeSelect(java.util.Date from,
java.util.Date to,
boolean monthlyMode)
Fires an event range selected event. |
protected void |
fireWeekClick(int week,
int year)
Fires event when a week was clicked in the calendar. |
protected java.util.Collection<java.lang.String> |
getCustomAttributes()
Returns a collection of attributes that should not be handled by the basic implementation of the readDesign and writeDesign
methods. |
protected java.lang.String[] |
getDayNamesShort()
Localized display names for week days starting from sunday. |
DropHandler |
getDropHandler()
Get the currently active drop handler |
java.util.Date |
getEndDate()
Gets the calendar's end date. |
CalendarEventProvider |
getEventProvider()
|
java.util.List<CalendarEvent> |
getEvents(java.util.Date startDate,
java.util.Date endDate)
Gets all available events in the target date range between startDate and endDate. |
protected java.util.Date |
getFirstDateForWeek(java.util.Date date)
Gets a date that is first day in the week that target given date belongs to. |
int |
getFirstVisibleDayOfWeek()
Get the first visible day of the week. |
int |
getFirstVisibleHourOfDay()
Returns the first visible hour in the week view. |
java.util.EventListener |
getHandler(java.lang.String eventId)
Get the assigned event handler for the given eventId. |
java.util.Calendar |
getInternalCalendar()
Get the internally used Calendar instance. |
protected java.util.Date |
getLastDateForWeek(java.util.Date date)
Gets a date that is last day in the week that target given date belongs to. |
int |
getLastVisibleDayOfWeek()
Get the last visible day of the week. |
int |
getLastVisibleHourOfDay()
Returns the last visible hour in the week view. |
protected java.util.logging.Logger |
getLogger()
Returns the logger for the calendar |
protected java.lang.String[] |
getMonthNamesShort()
Localized display names for months starting from January. |
java.util.Date |
getStartDate()
Gets the calendar's start date. |
com.vaadin.shared.ui.calendar.CalendarState |
getState()
Returns the shared state bean with information to be sent from the server to the client. |
protected com.vaadin.shared.ui.calendar.CalendarState |
getState(boolean markAsDirty)
Returns the shared state for this connector. |
Calendar.TimeFormat |
getTimeFormat()
Gets currently active time format. |
java.util.TimeZone |
getTimeZone()
Returns a time zone that is currently used by this component. |
java.lang.String |
getWeeklyCaptionFormat()
Gets the date caption format for the weekly view. |
protected boolean |
isClientChangeAllowed()
Is the user allowed to trigger events which alters the events |
boolean |
isEventCaptionAsHtml()
Checks whether event captions are rendered as HTML |
protected boolean |
isEventClickAllowed()
Deprecated. As of 7.4, override fireEventClick(Integer) instead. |
boolean |
isMonthlyMode()
Is the calendar in a mode where all days of the month is shown |
void |
paintContent(PaintTarget target)
Paints the Paintable into a UIDL stream. |
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Reads the component state from the given design. |
void |
removeActionHandler(Action.Handler actionHandler)
Removes a previously registered action handler for the contents of this container. |
void |
removeEvent(CalendarEvent event)
Removes an event from the event provider |
void |
setContainerDataSource(Container.Indexed container)
Sets a container as a data source for the events in the calendar. |
void |
setContainerDataSource(Container.Indexed container,
java.lang.Object captionProperty,
java.lang.Object descriptionProperty,
java.lang.Object startDateProperty,
java.lang.Object endDateProperty,
java.lang.Object styleNameProperty)
Sets a container as a data source for the events in the calendar. |
protected void |
setDefaultHandlers()
Set all the wanted default handlers here. |
void |
setDropHandler(DropHandler dropHandler)
Set the drop handler for the calendar See DropHandler for
implementation details. |
void |
setEndDate(java.util.Date date)
Sets end date for the calendar. |
void |
setEventCaptionAsHtml(boolean eventCaptionAsHtml)
Sets whether the event captions are rendered as HTML. |
void |
setEventProvider(CalendarEventProvider calendarEventProvider)
Set the CalendarEventProvider to be used with this calendar. |
void |
setFirstVisibleDayOfWeek(int firstDay)
This method restricts the weekdays that are shown. |
void |
setFirstVisibleHourOfDay(int firstHour)
This method restricts the hours that are shown per day. |
void |
setHandler(CalendarComponentEvents.BackwardHandler listener)
Add a backward navigation listener. |
void |
setHandler(CalendarComponentEvents.DateClickHandler listener)
Add a date click listener. |
void |
setHandler(CalendarComponentEvents.EventClickHandler listener)
Add a event click listener. |
void |
setHandler(CalendarComponentEvents.EventMoveHandler listener)
Set the EventMoveHandler. |
void |
setHandler(CalendarComponentEvents.EventResizeHandler listener)
Set a EventResizeHandler. |
void |
setHandler(CalendarComponentEvents.ForwardHandler listener)
Add a forward navigation listener. |
void |
setHandler(CalendarComponentEvents.RangeSelectHandler listener)
Set the RangeSelectHandler that listens for drag-marking. |
void |
setHandler(CalendarComponentEvents.WeekClickHandler listener)
Add a week click listener. |
protected void |
setHandler(java.lang.String eventId,
java.lang.Class<?> eventType,
java.util.EventListener listener,
java.lang.reflect.Method listenerMethod)
Set the handler for the given type information. |
void |
setLastVisibleDayOfWeek(int lastDay)
This method restricts the weekdays that are shown. |
void |
setLastVisibleHourOfDay(int lastHour)
This method restricts the hours that are shown per day. |
void |
setLocale(java.util.Locale newLocale)
Sets the locale to be used in the Calendar component. |
void |
setStartDate(java.util.Date date)
Sets start date for the calendar. |
void |
setTimeFormat(Calendar.TimeFormat format)
Example: setTimeFormat(TimeFormat.Format12H); Set to
null, if you want the format being defined by the locale. |
void |
setTimeZone(java.util.TimeZone zone)
Set time zone that this component will use. |
void |
setWeeklyCaptionFormat(java.lang.String dateFormatPattern)
Sets custom date format for the weekly view. |
TargetDetails |
translateDropTargetDetails(java.util.Map<java.lang.String,java.lang.Object> clientVariables)
Called before the DragAndDropEvent is passed to
DropHandler . |
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Writes the component state to the given design. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.ui.LegacyComponent |
---|
markAsDirty |
Methods inherited from interface com.vaadin.server.VariableOwner |
---|
isEnabled, isImmediate |
Methods inherited from interface com.vaadin.ui.Component |
---|
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible |
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.shared.Connector |
---|
getConnectorId |
Methods inherited from interface com.vaadin.server.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined |
Field Detail |
---|
protected Calendar.TimeFormat currentTimeFormat
protected java.util.Calendar currentCalendar
protected java.util.TimeZone timezone
protected java.util.Date startDate
protected java.util.Date endDate
protected java.util.List<CalendarEvent> events
protected java.text.DateFormat df_date
protected java.text.DateFormat df_time
protected java.text.DateFormat df_date_time
Constructor Detail |
---|
public Calendar()
public Calendar(java.lang.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(java.lang.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.Method Detail |
---|
protected java.util.logging.Logger getLogger()
public com.vaadin.shared.ui.calendar.CalendarState getState()
AbstractComponent
getState
in class AbstractComponent
protected com.vaadin.shared.ui.calendar.CalendarState getState(boolean markAsDirty)
AbstractClientConnector
getState
in class AbstractComponent
markAsDirty
- true if the connector should automatically be marked dirty,
false otherwise
AbstractClientConnector.getState()
public void beforeClientResponse(boolean initial)
ClientConnector
beforeClientResponse
in interface ClientConnector
beforeClientResponse
in class AbstractComponent
initial
- true
if the client-side connector will be created
and initialized after this method has been invoked.
false
if there is already an initialized
client-side connector.protected void setDefaultHandlers()
public java.util.Date getStartDate()
public void setStartDate(java.util.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 java.util.Date getEndDate()
public void setEndDate(java.util.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(java.util.Locale newLocale)
setLocale
in class AbstractComponent
newLocale
- the locale to become this component's locale.AbstractComponent.setLocale(java.util.Locale)
public Calendar.TimeFormat getTimeFormat()
public void setTimeFormat(Calendar.TimeFormat format)
setTimeFormat(TimeFormat.Format12H);
Set to
null, if you want the format being defined by the locale.
format
- Set 12h or 24h format. Default is defined by the locale.public java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone zone)
zone
- Time zone to usepublic java.util.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_WEEK
Calendar.DAY_OF_WEEK
public 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_WEEK
Calendar.DAY_OF_WEEK
public 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)
.
firstHour
- the first hour of the day to show, between 0 and 23public int getFirstVisibleHourOfDay()
public void setLastVisibleHourOfDay(int lastHour)
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)
.
lastHour
- the first hour of the day to show, between 0 and 23public int getLastVisibleHourOfDay()
public java.lang.String getWeeklyCaptionFormat()
public void setWeeklyCaptionFormat(java.lang.String dateFormatPattern)
dateFormatPattern
- The date caption pattern.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, java.util.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(java.lang.Integer index)
index
- The index of the event in the event cache.protected void fireDateClick(java.util.Date date)
date
- The date and time that was clickedprotected void fireRangeSelect(java.util.Date from, java.util.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, java.util.Date startTime, java.util.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 java.lang.String[] getDayNamesShort()
protected java.lang.String[] getMonthNamesShort()
protected java.util.Date getFirstDateForWeek(java.util.Date date)
date
- Target date
protected java.util.Date getLastDateForWeek(java.util.Date date)
date
- Target date
protected java.util.Date expandStartDate(java.util.Date start, boolean expandToFullWeek)
start
- The actual dateexpandToFullWeek
- Should the returned date be moved to the start of the week
protected java.util.Date expandEndDate(java.util.Date end, boolean expandToFullWeek)
end
- The actual dateexpandToFullWeek
- Should the returned date be moved to the end of the week
public 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.EventSetChangeListener
eventSetChange
in interface CalendarEventProvider.EventSetChangeListener
protected void setHandler(java.lang.String eventId, java.lang.Class<?> eventType, java.util.EventListener listener, java.lang.reflect.Method listenerMethod)
addListener
from
AbstractComponent
eventId
- A unique id for the event. Usually one of
CalendarEventId
eventType
- The class of the event, most likely a subclass of
CalendarComponentEvent
listener
- 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.NavigationNotifier
setHandler
in interface CalendarComponentEvents.NavigationNotifier
listener
- ForwardHandler to be added.public void setHandler(CalendarComponentEvents.BackwardHandler listener)
CalendarComponentEvents.NavigationNotifier
setHandler
in interface CalendarComponentEvents.NavigationNotifier
listener
- BackwardHandler to be added.public void setHandler(CalendarComponentEvents.DateClickHandler listener)
CalendarComponentEvents.NavigationNotifier
setHandler
in interface CalendarComponentEvents.NavigationNotifier
listener
- DateClickHandler to be added.public void setHandler(CalendarComponentEvents.EventClickHandler listener)
CalendarComponentEvents.NavigationNotifier
setHandler
in interface CalendarComponentEvents.NavigationNotifier
listener
- EventClickHandler to be added.public void setHandler(CalendarComponentEvents.WeekClickHandler listener)
CalendarComponentEvents.NavigationNotifier
setHandler
in interface CalendarComponentEvents.NavigationNotifier
listener
- WeekClickHandler to be added.public void setHandler(CalendarComponentEvents.EventResizeHandler listener)
CalendarComponentEvents.EventResizeNotifier
setHandler
in interface CalendarComponentEvents.EventResizeNotifier
listener
- EventResizeHandler to be setpublic void setHandler(CalendarComponentEvents.RangeSelectHandler listener)
CalendarComponentEvents.RangeSelectNotifier
setHandler
in interface CalendarComponentEvents.RangeSelectNotifier
listener
- RangeSelectHandler to be added.public void setHandler(CalendarComponentEvents.EventMoveHandler listener)
CalendarComponentEvents.EventMoveNotifier
setHandler
in interface CalendarComponentEvents.EventMoveNotifier
listener
- EventMoveHandler to be addedpublic java.util.EventListener getHandler(java.lang.String eventId)
CalendarComponentEvents.CalendarEventNotifier
getHandler
in interface CalendarComponentEvents.CalendarEventNotifier
public DropHandler getDropHandler()
getDropHandler
in interface DropTarget
public void setDropHandler(DropHandler dropHandler)
DropHandler
for
implementation details.
dropHandler
- The drop handler to setpublic TargetDetails translateDropTargetDetails(java.util.Map<java.lang.String,java.lang.Object> clientVariables)
DropTarget
DragAndDropEvent
is passed to
DropHandler
. Implementation may for example translate the drop
target details provided by the client side (drop target) to meaningful
server side values. If null is returned the terminal implementation will
automatically create a TargetDetails
with raw client side data.
translateDropTargetDetails
in interface DropTarget
clientVariables
- data passed from the DropTargets client side counterpart.
DragSource.getTransferable(Map)
public 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(com.vaadin.data.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, java.lang.Object captionProperty, java.lang.Object descriptionProperty, java.lang.Object startDateProperty, java.lang.Object endDateProperty, java.lang.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 java.util.List<CalendarEvent> getEvents(java.util.Date startDate, java.util.Date endDate)
CalendarEventProvider
Gets 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 CalendarEventProvider
startDate
- Start dateendDate
- End date
public void addEvent(CalendarEvent event)
CalendarEditableEventProvider
addEvent
in interface CalendarEditableEventProvider
event
- The event to addpublic void removeEvent(CalendarEvent event)
CalendarEditableEventProvider
removeEvent
in interface CalendarEditableEventProvider
event
- 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:
CalendarEvent
Date
representing that slot
addActionHandler
in interface Action.Container
actionHandler
- the new handler to be added.public boolean isMonthlyMode()
public void removeActionHandler(Action.Handler actionHandler)
Action.Container
removeActionHandler
in interface Action.Container
actionHandler
- the handler to be removed.public void changeVariables(java.lang.Object source, java.util.Map<java.lang.String,java.lang.Object> variables)
VariableOwner
changeVariables
in interface VariableOwner
source
- the Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables
- the Mapping from variable names to new variable values.public void paintContent(PaintTarget target) throws PaintException
LegacyComponent
Paints the Paintable into a UIDL stream. This method creates the UIDL sequence describing it and outputs it to the given UIDL stream.
It is called when the contents of the component should be painted in response to the component first being shown or having been altered so that its visual representation is changed.
paintContent
in interface LegacyComponent
target
- the target UIDL stream where the component should paint itself
to.
PaintException
- if the paint operation failed.public 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.
captionAsHtml
- 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)
Component
The component is responsible not only for updating its own state but also for ensuring that its children update their state based on the design.
It is assumed that the component is in its default state when this method is called. Reading should only take into consideration attributes specified in the design and not reset any unspecified attributes to their defaults.
This method must not modify the design.
readDesign
in interface Component
readDesign
in class AbstractComponent
design
- The element to obtain the state fromdesignContext
- The DesignContext instance used for parsing the designpublic void writeDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Component
The component is responsible not only for writing its own state but also for ensuring that its children write their state to the design.
This method must not modify the component state.
writeDesign
in interface Component
writeDesign
in class AbstractComponent
design
- The element to write the component state to. Any previous
attributes or child nodes are not cleared.designContext
- The DesignContext instance used for writing the designprotected java.util.Collection<java.lang.String> getCustomAttributes()
AbstractComponent
readDesign
and writeDesign
methods. Typically these are handled in a custom way in the overridden
versions of the above methods
getCustomAttributes
in class AbstractComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |