Class CalendarEvent
- All Implemented Interfaces:
- HasHandlers
Record which represents an event to occur at a specific time, displayed
 within the calendar.- See Also:
- 
Field SummaryFields inherited from class com.smartgwt.client.core.RefDataClassidFields inherited from class com.smartgwt.client.core.DataClassfactoryCreated, factoryProperties
- 
Constructor SummaryConstructorsConstructorDescriptionCalendarEvent(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 SummaryModifier and TypeMethodDescriptionAn optional background color for the body portion ofcanvasesrepresenting this event in the variouscalendar views.An optional border color for the body portion ofcanvasesrepresenting 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 aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.descriptionFieldThe duration of this event.When adurationis set for this event, this is the unit of that duration.Date object which represents the end date of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.endDateFieldDeprecated.An optional background color for the header portion ofcanvasesrepresenting this event in the variouscalendar views.An optional border color for the header portion ofcanvasesrepresenting this event in the variouscalendar views.An optional text color for the header portion ofcanvasesrepresenting this event in the variouscalendar views.getLane()When in Timeline mode, or whenCalendar.showDayLanesis true, a string that represents the name of thelanethisCalendarEventshould sit in.getName()String which represents the name of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.nameFieldstatic CalendarEventgetOrCreateRef(JavaScriptObject jsObj) Date object which represents the start date of aCalendarEvent.CSS style series to use forcanvas instancesthat represent this event in the variouscalendar views.When in Timeline mode, or whenCalendar.showDayLanesis true, a string that represents the name of thesublanethisCalendarEventshould sit in.An optional text color for the body portion ofcanvasesrepresenting this event in the variouscalendar views.setBackgroundColor(String backgroundColor) An optional background color for the body portion ofcanvasesrepresenting this event in the variouscalendar views.setBorderColor(String borderColor) An optional border color for the body portion ofcanvasesrepresenting this event in the variouscalendar views.setCanDrag(Boolean canDrag) Optional boolean value controlling whether this event can be dragged with the mouse.voidsetCanEdit(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 aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.descriptionFieldsetDuration(Integer duration) The duration of this event.setDurationUnit(TimeUnit durationUnit) When adurationis set for this event, this is the unit of that duration.setEndDate(Date endDate) Date object which represents the end date of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.endDateFieldvoidsetEventId(Integer eventId) setEventWindowStyle(String eventWindowStyle) Deprecated.in favor ofstyleNamesetHeaderBackgroundColor(String headerBackgroundColor) An optional background color for the header portion ofcanvasesrepresenting this event in the variouscalendar views.setHeaderBorderColor(String headerBorderColor) An optional border color for the header portion ofcanvasesrepresenting this event in the variouscalendar views.setHeaderTextColor(String headerTextColor) An optional text color for the header portion ofcanvasesrepresenting this event in the variouscalendar views.When in Timeline mode, or whenCalendar.showDayLanesis true, a string that represents the name of thelanethisCalendarEventshould sit in.String which represents the name of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.nameFieldsetStartDate(Date startDate) Date object which represents the start date of aCalendarEvent.setStyleName(String styleName) CSS style series to use forcanvas instancesthat represent this event in the variouscalendar views.setSublane(String sublane) When in Timeline mode, or whenCalendar.showDayLanesis true, a string that represents the name of thesublanethisCalendarEventshould sit in.setTextColor(String textColor) An optional text color for the body portion ofcanvasesrepresenting this event in the variouscalendar views.Methods inherited from class com.smartgwt.client.data.RecordconvertToRecordArray, copyAttributes, copyAttributesInto, getAttributeAsRecordArray, getAttributeAsRecordList, getPaletteDefaults, isARecord, toMapMethods inherited from class com.smartgwt.client.core.RefDataClassgetRef, getRef, internalSetIDMethods inherited from class com.smartgwt.client.core.DataClassapplyFactoryProperties, 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- 
CalendarEventpublic CalendarEvent()
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
- 
CalendarEvent
 
- 
- 
Method Details- 
getOrCreateRef
- 
setBackgroundColorAn optional background color for the body portion ofcanvasesrepresenting 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getBackgroundColorAn optional background color for the body portion ofcanvasesrepresenting 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
 
- 
setBorderColorAn optional border color for the body portion ofcanvasesrepresenting 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getBorderColorAn optional border color for the body portion ofcanvasesrepresenting 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
 
- 
setCanDragOptional 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 wheneditingis enabled.You can separately disallow drag-resize via canResize.- Parameters:
- canDrag- New canDrag value. Default value is null
- Returns:
- CalendarEventinstance, for chaining setter calls
 
- 
getCanDragOptional 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 wheneditingis enabled.You can separately disallow drag-resize via canResize.- Returns:
- Current canDrag value. Default value is null
 
- 
setCanEditLaneBoolean 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getCanEditLaneBoolean 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
 
- 
setCanEditSublaneBoolean 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getCanEditSublaneBoolean 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
 
- 
setCanResizeOptional 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 editinganddraggingare also enabled.- Parameters:
- canResize- New canResize value. Default value is null
- Returns:
- CalendarEventinstance, for chaining setter calls
 
- 
getCanResizeOptional 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 editinganddraggingare also enabled.- Returns:
- Current canResize value. Default value is null
 
- 
setDescriptionString which represents the description of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.descriptionField- Parameters:
- description- New description value. Default value is null
- Returns:
- CalendarEventinstance, for chaining setter calls
 
- 
getDescriptionString which represents the description of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.descriptionField- Returns:
- Current description value. Default value is null
 
- 
setDurationThe duration of this event. May be specified instead of anend dateand 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getDurationThe duration of this event. May be specified instead of anend dateand 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
 
- 
setDurationUnitWhen adurationis 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getDurationUnitWhen adurationis set for this event, this is the unit of that duration. The default is minutes.- Returns:
- Current durationUnit value. Default value is "minute"
 
- 
setEndDateDate object which represents the end date of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.endDateField- Parameters:
- endDate- New endDate value. Default value is null
- Returns:
- CalendarEventinstance, for chaining setter calls
 
- 
getEndDateDate object which represents the end date of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.endDateField- Returns:
- Current endDate value. Default value is null
 
- 
setEventWindowStyleDeprecated.in favor ofstyleNameCSS style series to use for the draggable event window that represents this event. If specified, overridesCalendar.eventWindowStylefor 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:
- CalendarEventinstance, for chaining setter calls
- See Also:
 
- 
getEventWindowStyleDeprecated.in favor ofstyleNameCSS style series to use for the draggable event window that represents this event. If specified, overridesCalendar.eventWindowStylefor 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:
 
- 
setHeaderBackgroundColorAn optional background color for the header portion ofcanvasesrepresenting 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getHeaderBackgroundColorAn optional background color for the header portion ofcanvasesrepresenting 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
 
- 
setHeaderBorderColorAn optional border color for the header portion ofcanvasesrepresenting 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getHeaderBorderColorAn optional border color for the header portion ofcanvasesrepresenting 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
 
- 
setHeaderTextColorAn optional text color for the header portion ofcanvasesrepresenting 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getHeaderTextColorAn optional text color for the header portion ofcanvasesrepresenting 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
 
- 
setLaneWhen in Timeline mode, or whenCalendar.showDayLanesis true, a string that represents the name of thelanethisCalendarEventshould 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getLaneWhen in Timeline mode, or whenCalendar.showDayLanesis true, a string that represents the name of thelanethisCalendarEventshould sit in. The name of this field within the CalendarEvent can be changed viaCalendar.laneNameField.- Returns:
- Current lane value. Default value is null
 
- 
setNameString which represents the name of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.nameField- Parameters:
- name- New name value. Default value is null
- Returns:
- CalendarEventinstance, for chaining setter calls
 
- 
getNameString which represents the name of aCalendarEventThe name of this field within the CalendarEvent can be changed viaCalendar.nameField- Returns:
- Current name value. Default value is null
 
- 
setStartDateDate 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getStartDateDate 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
 
- 
setStyleNameCSS style series to use forcanvas instancesthat 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, theviewor individually on eachlaneorsublane.The name of this field within the CalendarEvent can be changed via Calendar.eventStyleNameField- Parameters:
- styleName- New styleName value. Default value is null
- Returns:
- CalendarEventinstance, for chaining setter calls
- See Also:
 
- 
getStyleNameCSS style series to use forcanvas instancesthat 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, theviewor individually on eachlaneorsublane.The name of this field within the CalendarEvent can be changed via Calendar.eventStyleNameField- Returns:
- Current styleName value. Default value is null
- See Also:
 
- 
setSublaneWhen in Timeline mode, or whenCalendar.showDayLanesis true, a string that represents the name of thesublanethisCalendarEventshould 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getSublaneWhen in Timeline mode, or whenCalendar.showDayLanesis true, a string that represents the name of thesublanethisCalendarEventshould sit in. The name of this field within the CalendarEvent can be changed viaCalendar.sublaneNameField.- Returns:
- Current sublane value. Default value is null
 
- 
setTextColorAn optional text color for the body portion ofcanvasesrepresenting 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:
- CalendarEventinstance, for chaining setter calls
 
- 
getTextColorAn optional text color for the body portion ofcanvasesrepresenting 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
- 
setCanEditOptional 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
 
- 
getCanEditOptional boolean value controlling the editability of this particular calendarEvent. The name of this field within the CalendarEvent can be changed viacanEditField.- Returns:
- String
 
 
- 
styleName