Class CalendarEvent
- All Implemented Interfaces:
HasHandlers
Record
which represents an event to occur at a specific time, displayed
within the calendar.- See Also:
-
Field Summary
Fields inherited from class com.smartgwt.client.core.RefDataClass
id
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
ConstructorDescriptionCalendarEvent
(int eventId, String name, String description, Date startDate, int duration, TimeUnit durationUnit) CalendarEvent
(int eventId, String name, String description, Date startDate, int duration, TimeUnit durationUnit, String styleName) CalendarEvent
(int eventId, String name, String description, Date startDate, int duration, TimeUnit durationUnit, String styleName, String lane) CalendarEvent
(int eventId, String name, String description, Date startDate, int duration, TimeUnit durationUnit, String styleName, String lane, String sublane) CalendarEvent
(int eventId, String name, String description, Date startDate, Date endDate) CalendarEvent
(int eventId, String name, String description, Date startDate, Date endDate, boolean canEdit) CalendarEvent
(int eventId, String name, String description, Date startDate, Date endDate, boolean canEdit, String eventWindowStyle) CalendarEvent
(int eventId, String name, String description, Date startDate, Date endDate, boolean canEdit, String eventWindowStyle, String lane) CalendarEvent
(int eventId, String name, String description, Date startDate, Date endDate, boolean canEdit, String eventWindowStyle, String lane, String sublane) CalendarEvent
(int eventId, String name, String description, Date startDate, Date endDate, String lane) CalendarEvent
(JavaScriptObject jsObj) -
Method Summary
Modifier and TypeMethodDescriptionAn optional background color for the body portion ofcanvases
representing this event in the variouscalendar views
.An optional border color for the body portion ofcanvases
representing this event in the variouscalendar views
.Optional boolean value controlling whether this event can be dragged with the mouse.Optional boolean value controlling the editability of this particular calendarEvent.Boolean indicating whether this event can be moved between lanes.Boolean indicating whether this event can be moved between lanes.Optional boolean value controlling whether this event can be drag-resized with the mouse.String which represents the description of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.descriptionField
The duration of this event.When aduration
is set for this event, this is the unit of that duration.Date object which represents the end date of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.endDateField
Deprecated.An optional background color for the header portion ofcanvases
representing this event in the variouscalendar views
.An optional border color for the header portion ofcanvases
representing this event in the variouscalendar views
.An optional text color for the header portion ofcanvases
representing this event in the variouscalendar views
.getLane()
When in Timeline mode, or whenCalendar.showDayLanes
is true, a string that represents the name of thelane
thisCalendarEvent
should sit in.getName()
String which represents the name of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.nameField
static CalendarEvent
getOrCreateRef
(JavaScriptObject jsObj) Date object which represents the start date of aCalendarEvent
.CSS style series to use forcanvas instances
that represent this event in the variouscalendar views
.When in Timeline mode, or whenCalendar.showDayLanes
is true, a string that represents the name of thesublane
thisCalendarEvent
should sit in.An optional text color for the body portion ofcanvases
representing this event in the variouscalendar views
.setBackgroundColor
(String backgroundColor) An optional background color for the body portion ofcanvases
representing this event in the variouscalendar views
.setBorderColor
(String borderColor) An optional border color for the body portion ofcanvases
representing this event in the variouscalendar views
.setCanDrag
(Boolean canDrag) Optional boolean value controlling whether this event can be dragged with the mouse.void
setCanEdit
(Boolean canEdit) Optional boolean value controlling the editability of this particular calendarEvent.setCanEditLane
(Boolean canEditLane) Boolean indicating whether this event can be moved between lanes.setCanEditSublane
(Boolean canEditSublane) Boolean indicating whether this event can be moved between lanes.setCanResize
(Boolean canResize) Optional boolean value controlling whether this event can be drag-resized with the mouse.setDescription
(String description) String which represents the description of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.descriptionField
setDuration
(Integer duration) The duration of this event.setDurationUnit
(TimeUnit durationUnit) When aduration
is set for this event, this is the unit of that duration.setEndDate
(Date endDate) Date object which represents the end date of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.endDateField
void
setEventId
(Integer eventId) setEventWindowStyle
(String eventWindowStyle) Deprecated.in favor ofstyleName
setHeaderBackgroundColor
(String headerBackgroundColor) An optional background color for the header portion ofcanvases
representing this event in the variouscalendar views
.setHeaderBorderColor
(String headerBorderColor) An optional border color for the header portion ofcanvases
representing this event in the variouscalendar views
.setHeaderTextColor
(String headerTextColor) An optional text color for the header portion ofcanvases
representing this event in the variouscalendar views
.When in Timeline mode, or whenCalendar.showDayLanes
is true, a string that represents the name of thelane
thisCalendarEvent
should sit in.String which represents the name of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.nameField
setStartDate
(Date startDate) Date object which represents the start date of aCalendarEvent
.setStyleName
(String styleName) CSS style series to use forcanvas instances
that represent this event in the variouscalendar views
.setSublane
(String sublane) When in Timeline mode, or whenCalendar.showDayLanes
is true, a string that represents the name of thesublane
thisCalendarEvent
should sit in.setTextColor
(String textColor) An optional text color for the body portion ofcanvases
representing this event in the variouscalendar views
.Methods inherited from class com.smartgwt.client.data.Record
convertToRecordArray, copyAttributes, copyAttributesInto, getAttributeAsRecordArray, getAttributeAsRecordList, getPaletteDefaults, isARecord, toMap
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetID
Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
CalendarEvent
public CalendarEvent() -
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
CalendarEvent
-
-
Method Details
-
getOrCreateRef
-
setBackgroundColor
An optional background color for the body portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Parameters:
backgroundColor
- New backgroundColor value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getBackgroundColor
An optional background color for the body portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Returns:
- Current backgroundColor value. Default value is null
-
setBorderColor
An optional border color for the body portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Parameters:
borderColor
- New borderColor value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getBorderColor
An optional border color for the body portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Returns:
- Current borderColor value. Default value is null
-
setCanDrag
Optional boolean value controlling whether this event can be dragged with the mouse. The name of this field within the CalendarEvent can be changed viaCalendar.canDragEventField
. Only has an effect whenediting
is enabled.You can separately disallow drag-resize via
canResize
.- Parameters:
canDrag
- New canDrag value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getCanDrag
Optional boolean value controlling whether this event can be dragged with the mouse. The name of this field within the CalendarEvent can be changed viaCalendar.canDragEventField
. Only has an effect whenediting
is enabled.You can separately disallow drag-resize via
canResize
.- Returns:
- Current canDrag value. Default value is null
-
setCanEditLane
Boolean indicating whether this event can be moved between lanes. Can also be set at thecalendar level
.The name of this field within the CalendarEvent can be changed via
Calendar.canEditLaneField
.- Parameters:
canEditLane
- New canEditLane value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getCanEditLane
Boolean indicating whether this event can be moved between lanes. Can also be set at thecalendar level
.The name of this field within the CalendarEvent can be changed via
Calendar.canEditLaneField
.- Returns:
- Current canEditLane value. Default value is null
-
setCanEditSublane
Boolean indicating whether this event can be moved between lanes. Can also be set at thecalendar level
.The name of this field within the CalendarEvent can be changed via
Calendar.canEditSublaneField
.- Parameters:
canEditSublane
- New canEditSublane value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getCanEditSublane
Boolean indicating whether this event can be moved between lanes. Can also be set at thecalendar level
.The name of this field within the CalendarEvent can be changed via
Calendar.canEditSublaneField
.- Returns:
- Current canEditSublane value. Default value is null
-
setCanResize
Optional boolean value controlling whether this event can be drag-resized with the mouse. The name of this field within the CalendarEvent can be changed viaCalendar.canResizeEventField
.Only has an effect if
editing
anddragging
are also enabled.- Parameters:
canResize
- New canResize value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getCanResize
Optional boolean value controlling whether this event can be drag-resized with the mouse. The name of this field within the CalendarEvent can be changed viaCalendar.canResizeEventField
.Only has an effect if
editing
anddragging
are also enabled.- Returns:
- Current canResize value. Default value is null
-
setDescription
String which represents the description of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.descriptionField
- Parameters:
description
- New description value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getDescription
String which represents the description of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.descriptionField
- Returns:
- Current description value. Default value is null
-
setDuration
The duration of this event. May be specified instead of anend date
and implies that this is a "Period" type event. If set to zero, implies an "Instant" type event - an event with a start date but no length.- Parameters:
duration
- New duration value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getDuration
The duration of this event. May be specified instead of anend date
and implies that this is a "Period" type event. If set to zero, implies an "Instant" type event - an event with a start date but no length.- Returns:
- Current duration value. Default value is null
-
setDurationUnit
When aduration
is set for this event, this is the unit of that duration. The default is minutes.- Parameters:
durationUnit
- New durationUnit value. Default value is "minute"- Returns:
CalendarEvent
instance, for chaining setter calls
-
getDurationUnit
When aduration
is set for this event, this is the unit of that duration. The default is minutes.- Returns:
- Current durationUnit value. Default value is "minute"
-
setEndDate
Date object which represents the end date of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.endDateField
- Parameters:
endDate
- New endDate value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getEndDate
Date object which represents the end date of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.endDateField
- Returns:
- Current endDate value. Default value is null
-
setEventWindowStyle
Deprecated.in favor ofstyleName
CSS style series to use for the draggable event window that represents this event. If specified, overridesCalendar.eventWindowStyle
for this specific event.The name of this field within the CalendarEvent can be changed via
Calendar.eventWindowStyleField
- Parameters:
eventWindowStyle
- New eventWindowStyle value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls- See Also:
-
getEventWindowStyle
Deprecated.in favor ofstyleName
CSS style series to use for the draggable event window that represents this event. If specified, overridesCalendar.eventWindowStyle
for this specific event.The name of this field within the CalendarEvent can be changed via
Calendar.eventWindowStyleField
- Returns:
- Current eventWindowStyle value. Default value is null
- See Also:
-
setHeaderBackgroundColor
An optional background color for the header portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Parameters:
headerBackgroundColor
- New headerBackgroundColor value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getHeaderBackgroundColor
An optional background color for the header portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Returns:
- Current headerBackgroundColor value. Default value is null
-
setHeaderBorderColor
An optional border color for the header portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Parameters:
headerBorderColor
- New headerBorderColor value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getHeaderBorderColor
An optional border color for the header portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Returns:
- Current headerBorderColor value. Default value is null
-
setHeaderTextColor
An optional text color for the header portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Parameters:
headerTextColor
- New headerTextColor value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getHeaderTextColor
An optional text color for the header portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Returns:
- Current headerTextColor value. Default value is null
-
setLane
When in Timeline mode, or whenCalendar.showDayLanes
is true, a string that represents the name of thelane
thisCalendarEvent
should sit in. The name of this field within the CalendarEvent can be changed viaCalendar.laneNameField
.- Parameters:
lane
- New lane value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getLane
When in Timeline mode, or whenCalendar.showDayLanes
is true, a string that represents the name of thelane
thisCalendarEvent
should sit in. The name of this field within the CalendarEvent can be changed viaCalendar.laneNameField
.- Returns:
- Current lane value. Default value is null
-
setName
String which represents the name of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.nameField
- Parameters:
name
- New name value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getName
String which represents the name of aCalendarEvent
The name of this field within the CalendarEvent can be changed viaCalendar.nameField
- Returns:
- Current name value. Default value is null
-
setStartDate
Date object which represents the start date of aCalendarEvent
. The name of this field within the CalendarEvent can be changed viaCalendar.startDateField
- Parameters:
startDate
- New startDate value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getStartDate
Date object which represents the start date of aCalendarEvent
. The name of this field within the CalendarEvent can be changed viaCalendar.startDateField
- Returns:
- Current startDate value. Default value is null
-
setStyleName
CSS style series to use forcanvas instances
that represent this event in the variouscalendar views
. The basic series should include three classes - the base style and others suffixed "Header" and "Body".If not specified on the event, the style can be specified on the
calendar
, theview
or individually on eachlane
orsublane
.The name of this field within the CalendarEvent can be changed via
Calendar.eventStyleNameField
- Parameters:
styleName
- New styleName value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls- See Also:
-
getStyleName
CSS style series to use forcanvas instances
that represent this event in the variouscalendar views
. The basic series should include three classes - the base style and others suffixed "Header" and "Body".If not specified on the event, the style can be specified on the
calendar
, theview
or individually on eachlane
orsublane
.The name of this field within the CalendarEvent can be changed via
Calendar.eventStyleNameField
- Returns:
- Current styleName value. Default value is null
- See Also:
-
setSublane
When in Timeline mode, or whenCalendar.showDayLanes
is true, a string that represents the name of thesublane
thisCalendarEvent
should sit in. The name of this field within the CalendarEvent can be changed viaCalendar.sublaneNameField
.- Parameters:
sublane
- New sublane value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getSublane
When in Timeline mode, or whenCalendar.showDayLanes
is true, a string that represents the name of thesublane
thisCalendarEvent
should sit in. The name of this field within the CalendarEvent can be changed viaCalendar.sublaneNameField
.- Returns:
- Current sublane value. Default value is null
-
setTextColor
An optional text color for the body portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Parameters:
textColor
- New textColor value. Default value is null- Returns:
CalendarEvent
instance, for chaining setter calls
-
getTextColor
An optional text color for the body portion ofcanvases
representing this event in the variouscalendar views
.Note that the recommended approach for styling events is to set a
custom CSS style
, which allows more complete customization of both header and body portions.- Returns:
- Current textColor value. Default value is null
-
setEventId
-
getEventId
-
setCanEdit
Optional boolean value controlling the editability of this particular calendarEvent. The name of this field within the CalendarEvent can be changed viacanEditField
.- Parameters:
canEdit
- canEdit Default value is null
-
getCanEdit
Optional boolean value controlling the editability of this particular calendarEvent. The name of this field within the CalendarEvent can be changed viacanEditField
.- Returns:
- String
-
styleName