public class CalendarAPI
The CalendarAPI
is a BBj Custom Class that facilitates creating calendar objects, accessing constants, and is used in combination with the BBjCalendarWidget
.
Modifier and Type | Method and Description |
---|---|
static BBjString | CALENDAR_ENTRY_DISPLAY_AUTO() A constant value that defines the entry's display style as 'auto' (the default display value). When in daygrid view, it renders the entry as a solid rectangle if it is all-day or multi-day. If it's a timed entry, it renders the entry as a colored a dot. When in other views, the entry will render normally. |
static BBjString | CALENDAR_ENTRY_DISPLAY_BACKGROUND() A constant value that defines the entry's display style as 'background' to highlight the entry's background. This modifies the background of the entry's date/time frame in the calendar. |
static BBjString | CALENDAR_ENTRY_DISPLAY_BLOCK() A constant value that defines the entry's display style as 'block' When in daygrid view, it renders the entry as a solid rectangle. When in other views, the entry will render normally. |
static BBjString | CALENDAR_ENTRY_DISPLAY_INVERSE_BACKGROUND() A constant value that defines the entry's display style as 'inverse-background' to inversely highlight the entry's background. This inversely modifies the background of the entry's date/time frame in the calendar. |
static BBjString | CALENDAR_ENTRY_DISPLAY_LIST_ITEM() A constant value that defines the entry's display style as 'list-item' When in daygrid view, it renders the entry as a colored dot. When in other views, the entry will render normally. |
static BBjString | CALENDAR_ENTRY_DISPLAY_NONE() A constant value that defines the entry's display style as 'none' prevent the entry from being displayed. This hides the entry on the calendar. |
static BBjString | CALENDAR_TOOLBAR_ALIGNMENT_CENTER() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_ALIGNMENT_END() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_ALIGNMENT_START() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_BUTTON_DAY() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_BUTTON_LIST() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_BUTTON_MONTH() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_BUTTON_TODAY() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_BUTTON_WEEK() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_OBJECT_NEXT() A constant value for the toolbar's next button object that's used for moving the calendar forward one month/week/day. |
static BBjString | CALENDAR_TOOLBAR_OBJECT_NEXT_YEAR() A constant value for the toolbar's next year button object that's used for moving the calendar forward one year. |
static BBjString | CALENDAR_TOOLBAR_OBJECT_PREV() A constant value for the toolbar's previous button object that's used for moving the calendar back one month/week/day. |
static BBjString | CALENDAR_TOOLBAR_OBJECT_PREV_YEAR() A constant value for the toolbar's previous year button object that's used for moving the calendar back one year. |
static BBjString | CALENDAR_TOOLBAR_OBJECT_TITLE() A constant value for the toolbar's title object that contains the current month/week/day. |
static BBjString | CALENDAR_TOOLBAR_OBJECT_TODAY() A constant value for the toolbar's today button object that moves the calendar to the current month/week/day. |
static BBjString | CALENDAR_TOOLBAR_POSITION_BOTTOM() A constant value that's used with the |
static BBjString | CALENDAR_TOOLBAR_POSITION_TOP() A constant value that's used with the |
static BBjString | CALENDAR_VIEW_DAY_GRID_MONTH() A constant value that defines the |
static BBjString | CALENDAR_VIEW_DAY_GRID_WEEK() A constant value that defines the |
static BBjString | CALENDAR_VIEW_LIST_DAY() A constant value that defines the |
static BBjString | CALENDAR_VIEW_LIST_MONTH() A constant value that defines the |
static BBjString | CALENDAR_VIEW_LIST_WEEK() A constant value that defines the |
static BBjString | CALENDAR_VIEW_LIST_YEAR() A constant value that defines the |
static BBjString | CALENDAR_VIEW_TIME_GRID_DAY() A constant value that defines the |
static BBjString | CALENDAR_VIEW_TIME_GRID_WEEK() A constant value that defines the |
static BBjCalendarWidget | createBBjCalendarWidget(BBjWindow wnd!) Creates a |
static BBjCalendarWidget | createBBjCalendarWidget(BBjWindow wnd!, BBjNumber debug!) Creates a |
static BBjCalendarWidget | createBBjCalendarWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!) Creates a |
static BBjCalendarWidget | createBBjCalendarWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!, CalendarOptions options!) Creates a |
static BBjCalendarWidget | createBBjCalendarWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!, CalendarOptions options!, BBjString template!, BBjNumber debug!) Creates a
If you choose to provide your own HTML template, you may want to base it off of the default index.html file that can be found in the BBjCalendarWidget's |
static CalendarEntry | createCalendarEntry(JsonObject json!) Creates a |
static CalendarEntry | createCalendarEntry(BBjString title!, BBjString start!) Creates a |
static CalendarEntry | createCalendarEntry(BBjString title!, BBjString start!, BBjString end!) Creates a |
static CalendarEntrySource | createCalendarEntrySource() Creates a |
static CalendarEntrySource | createCalendarEntrySource(BBjString id!, BBjString url!) Creates a |
static CalendarEntrySource | createCalendarEntrySource(BBjString id!, BBjString url!, BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!) Creates a
Note: Colors may be specified as any valid CSS color, so
Note: You may pass in a |
static CalendarEntrySourceGoogle | createCalendarEntrySourceGoogle(BBjString id!, BBjString calendarId!) Contructs a |
static CalendarEntrySourceGoogle | createCalendarEntrySourceGoogle(BBjString id!, BBjString calendarId!, BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!) Creates a
Note: In order to access public Google calendars programmatically, you need to
sign up for a developer's account and generate an API key. See the
Note: Colors may be specified as any valid CSS color, so
Note: You may pass in a |
static CalendarEntrySourceiCalendar | createCalendarEntrySourceiCalendar(BBjString id!, BBjString url!) Creates a |
static CalendarEntrySourceiCalendar | createCalendarEntrySourceiCalendar(BBjString id!, BBjString url!, BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!) Creates a
Note: Colors may be specified as any valid CSS color, so
Note: You may pass in a |
static CalendarOptions | createCalendarOptions() Creates an instance of the |
static CalendarToolbar | createCalendarToolbar() Creates a |
static CalendarToolbar | createCalendarToolbar(BBjString position!) Creates a |
static CalendarToolbar | createCalendarToolbar(BBjString position!, CalendarToolbarSection startSection!, CalendarToolbarSection centerSection!, CalendarToolbarSection endSection!) Creates a |
static CalendarToolbar | createCalendarToolbar(BBjString position!, BBjString startSection!, BBjString centerSection!, BBjString endSection!) Creates a |
static CalendarToolbarSection | createCalendarToolbarSection(BBjString alignment!) Creates a
|
static CalendarToolbarSection | createCalendarToolbarSection(BBjString alignment!, BBjString objects!) Creates a
|
static CalendarView | createCalendarView(BBjString type!) Creates a |
static CalendarView | createCalendarView(JsonObject json!) Creates a |
static BBjVector | getAllViewTypes() Returns a BBjVector filled with all possible calendar view type constants such as |
static JsonArray | getBBjVectorAsJsonArray(BBjVector vector!) Returns a JSON array version of the supplied BBjVector. |
static BBjVector | getJsonArrayAsBBjVector(JsonArray array!) Returns a BBjVector version of the supplied JSON array. |
static BBjString | getJsonObjectAsFormattedString(JsonObject json!) Returns a formatted, or pretty-printed version of the supplied JSON object sorted alphabetically by key. |
static BBjNumber | getLocalTimeZoneOffsetFromUtc() DEPRECATED Returns the difference between the client's local time and UTC in minutes. For example, if your time zone is UTC+10, then -600 will be returned because UTC is 600 minutes behind the local time zone. Another way to view it is that the return value is the number of minutes that should be added to the local time in order to find UTC. Note that daylight savings time prevents this value from being a constant. |
static BBjString | getValidDateString(BBjString dateString!) DEPRECATED Returns a formatted date string if the provided date string can be parsed into a valid date, or null() if the date string is invalid. |
static BBjString | getValidDateTimeString(BBjString dateTimeString!) DEPRECATED Returns an ISO 8601 formatted date/time string if the provided date/time string can be parsed into a valid date, or null() if the date string is invalid. |
static BBjString | getValidTimeString(BBjString timeString!) DEPRECATED Returns a formatted time string if the provided time string can be parsed into a valid time, or null() if the time string is invalid. |
static BBjNumber | ON_CALENDAR_DATE_CLICK() A constant value that's used with the Note that ON_CALENDAR_DATE_CLICK event is not fired when the user clicks a day heading in a list view.
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_DATES_SET() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_DROP() A constant value that's used with the Note: This event has not yet been implemented. |
static BBjNumber | ON_CALENDAR_ENTRIES_SET() A constant value that's used with the
When responding to this event, the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_ADD() A constant value that's used with the Note: If you set a callback for this event, then add several events to the calendar, your callback routine may be flooded.
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_CHANGE() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_CLICK() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_DRAG_START() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_DRAG_STOP() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_DROP() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_LEAVE() A constant value that's used with the Note: This event has not yet been implemented. |
static BBjNumber | ON_CALENDAR_ENTRY_MOUSE_ENTER() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_MOUSE_LEAVE() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_RECEIVE() A constant value that's used with the Note: This event has not yet been implemented. |
static BBjNumber | ON_CALENDAR_ENTRY_REMOVE() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_RESIZE() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_RESIZE_START() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_RESIZE_STOP() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_SOURCE_FAILURE() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_ENTRY_SOURCE_SUCCESS() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_READY() A constant value that's used with the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_SELECT() A constant value that's used with the
Note: You must configure the calendar to enable user selections via the
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_UNSELECT() A constant value that's used with the
Note: You must configure the calendar to enable user selections via the A selection might be cleared for a number of reasons:
The
Setting a callback for this event type will result in your application getting a |
static BBjNumber | ON_CALENDAR_VIEW_CHANGE() A constant value that's used with the
Note: This only fires when the type of view changes, not when the user changes the view from one subtype to another. For example,
the event will be triggered when the user switches from the
Setting a callback for this event type will result in your application getting a |
public static BBjString CALENDAR_ENTRY_DISPLAY_AUTO()
A constant value that defines the entry's display style as 'auto' (the default display value).
When in daygrid view, it renders the entry as a solid rectangle if it is all-day or multi-day. If it's a timed entry, it renders the entry as a colored a dot. When in other views, the entry will render normally.
public static BBjString CALENDAR_ENTRY_DISPLAY_BACKGROUND()
A constant value that defines the entry's display style as 'background' to highlight the entry's background.
This modifies the background of the entry's date/time frame in the calendar.
public static BBjString CALENDAR_ENTRY_DISPLAY_BLOCK()
A constant value that defines the entry's display style as 'block'
When in daygrid view, it renders the entry as a solid rectangle. When in other views, the entry will render normally.
public static BBjString CALENDAR_ENTRY_DISPLAY_INVERSE_BACKGROUND()
A constant value that defines the entry's display style as 'inverse-background' to inversely highlight the entry's background.
This inversely modifies the background of the entry's date/time frame in the calendar.
public static BBjString CALENDAR_ENTRY_DISPLAY_LIST_ITEM()
A constant value that defines the entry's display style as 'list-item'
When in daygrid view, it renders the entry as a colored dot. When in other views, the entry will render normally.
public static BBjString CALENDAR_ENTRY_DISPLAY_NONE()
A constant value that defines the entry's display style as 'none' prevent the entry from being displayed.
This hides the entry on the calendar.
public static BBjString CALENDAR_TOOLBAR_ALIGNMENT_CENTER()
A constant value that's used with the CalendarToolbarSection
constructor that indicates the center section of the toolbar to be defined.
public static BBjString CALENDAR_TOOLBAR_ALIGNMENT_END()
A constant value that's used with the CalendarToolbarSection
constructor that indicates the ending, or right, section of the toolbar to be defined.
public static BBjString CALENDAR_TOOLBAR_ALIGNMENT_START()
A constant value that's used with the CalendarToolbarSection
constructor that indicates the starting, or left, section of the toolbar to be defined.
public static BBjString CALENDAR_TOOLBAR_BUTTON_DAY()
A constant value that's used with the CalendarOptions::setButtonText()
method that uniquely identifies the 'day' toolbar button .
public static BBjString CALENDAR_TOOLBAR_BUTTON_LIST()
A constant value that's used with the CalendarOptions::setButtonText()
method that uniquely identifies the 'list' toolbar button .
public static BBjString CALENDAR_TOOLBAR_BUTTON_MONTH()
A constant value that's used with the CalendarOptions::setButtonText()
method that uniquely identifies the 'month' toolbar button .
public static BBjString CALENDAR_TOOLBAR_BUTTON_TODAY()
A constant value that's used with the CalendarOptions::setButtonText()
method that uniquely identifies the 'today' toolbar button .
public static BBjString CALENDAR_TOOLBAR_BUTTON_WEEK()
A constant value that's used with the CalendarOptions::setButtonText()
method that uniquely identifies the 'week' toolbar button .
public static BBjString CALENDAR_TOOLBAR_OBJECT_NEXT()
A constant value for the toolbar's next button object that's used for moving the calendar forward one month/week/day.
public static BBjString CALENDAR_TOOLBAR_OBJECT_NEXT_YEAR()
A constant value for the toolbar's next year button object that's used for moving the calendar forward one year.
public static BBjString CALENDAR_TOOLBAR_OBJECT_PREV()
A constant value for the toolbar's previous button object that's used for moving the calendar back one month/week/day.
public static BBjString CALENDAR_TOOLBAR_OBJECT_PREV_YEAR()
A constant value for the toolbar's previous year button object that's used for moving the calendar back one year.
public static BBjString CALENDAR_TOOLBAR_OBJECT_TITLE()
A constant value for the toolbar's title object that contains the current month/week/day.
public static BBjString CALENDAR_TOOLBAR_OBJECT_TODAY()
A constant value for the toolbar's today button object that moves the calendar to the current month/week/day.
public static BBjString CALENDAR_TOOLBAR_POSITION_BOTTOM()
A constant value that's used with the setPosition()
method that indicates that the toolbar should be below the calendar.
public static BBjString CALENDAR_TOOLBAR_POSITION_TOP()
A constant value that's used with the setPosition()
method that indicates that the toolbar should be above the calendar.
public static BBjString CALENDAR_VIEW_DAY_GRID_MONTH()
A constant value that defines the dayGridMonth
(grid view for the month) calendar view.
public static BBjString CALENDAR_VIEW_DAY_GRID_WEEK()
A constant value that defines the dayGridWeek
(grid view for the week) calendar view.
public static BBjString CALENDAR_VIEW_LIST_DAY()
A constant value that defines the listDay
(agenda for the day) calendar view.
public static BBjString CALENDAR_VIEW_LIST_MONTH()
A constant value that defines the listMonth
(agenda for the month) calendar view.
public static BBjString CALENDAR_VIEW_LIST_WEEK()
A constant value that defines the listWeek
(agenda for the week) calendar view.
public static BBjString CALENDAR_VIEW_LIST_YEAR()
A constant value that defines the listYear
(agenda for the year) calendar view.
public static BBjString CALENDAR_VIEW_TIME_GRID_DAY()
A constant value that defines the timeGridDay
(time grid view for the day) calendar view.
public static BBjString CALENDAR_VIEW_TIME_GRID_WEEK()
A constant value that defines the timeGridWeek
(time grid view for the week) calendar view.
public static BBjCalendarWidget createBBjCalendarWidget(BBjWindow wnd!)
Creates a BBjCalendarWidget
given a BBjWindow where the widget takes up the full size of the window.
wnd!
The BBjWindow that will contain the calendar.public static BBjCalendarWidget createBBjCalendarWidget(BBjWindow wnd!, BBjNumber debug!)
Creates a BBjCalendarWidget
given a BBjWindow where the widget takes up the full size of the window.
wnd!
The BBjWindow that will contain the calendar.debug!
A BBjNumber acting as a boolean that indicates whether the widget should be placed in debug mode or not.public static BBjCalendarWidget createBBjCalendarWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!)
Creates a BBjCalendarWidget
given a BBjWindow and control ID, and the calendar's size and position.
wnd!
The BBjWindow that will contain the calendar.id
The unique control ID that will be used for the widget, usually wnd!.getAvailableControlID().x
The x-position of the widget.y
The y-position of the widget.w
The width of the widget.h
The height of the widget.public static BBjCalendarWidget createBBjCalendarWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!, CalendarOptions options!)
Creates a BBjCalendarWidget
given a BBjWindow and control ID, the calendar's size and position, and a CalendarOptions
object.
wnd!
The BBjWindow that will contain the calendar.id
The unique control ID that will be used for the widget, usually wnd!.getAvailableControlID().x
The x-position of the widget.y
The y-position of the widget.w
The width of the widget.h
The height of the widget.options!
The initial configuration for the calendar, which is determined by passing in an existing CalendarOptions
object or null() for defaults.public static BBjCalendarWidget createBBjCalendarWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!, CalendarOptions options!, BBjString template!, BBjNumber debug!)
Creates a BBjCalendarWidget
given a BBjWindow and control ID, size and position information, a calendar configuration, initial HTML template for the calendar, and a debug flag.
If you choose to provide your own HTML template, you may want to base it off of the default index.html file that can be found in the BBjCalendarWidget's lib/basis
directory.
wnd!
The BBjWindow that will contain the calendar.id
The unique control ID that will be used for the widget, usually wnd!.getAvailableControlID().x
The x-position of the widget.y
The y-position of the widget.w
The width of the widget.h
The height of the widget.options!
The initial configuration for the calendar, which is determined by passing in an existing CalendarOptions
object or null() for defaults.template!
The client's HTML template to use in order to build the calendar. You probably won't ever have to specify this, but it's possible if you wish to override the default HTML for the widget's BBjHtmlView. Specifying null() or an empty string causes the plug-in to use the default template.debug!
A BBjNumber acting as a boolean that indicates whether the widget should be placed in debug mode or not.public static CalendarEntry createCalendarEntry(JsonObject json!)
Creates a CalendarEntry
given a JsonObject representation of the CalendarEntry
object.
public static CalendarEntry createCalendarEntry(BBjString title!, BBjString start!)
Creates a CalendarEntry
given an entry title and starting date/time string.
BBjString
title! The entry's title.BBjString
start! The entry's starting date/time in an ISO 8601 date/time format. Date and Time Formats for information on ISO 8601 date/time formats.
public static CalendarEntry createCalendarEntry(BBjString title!, BBjString start!, BBjString end!)
Creates a CalendarEntry
given an entry title, starting date/time string, and ending date/time string.
BBjString
title! The entry's title.BBjString
start! The entry's starting date/time in an ISO 8601 date/time format.BBjString
end! The entry's ending date/time in an ISO 8601 date/time format. Date and Time Formats for information on ISO 8601 date/time formats.
public static CalendarEntrySource createCalendarEntrySource()
Creates a CalendarEntrySource
with default values.
public static CalendarEntrySource createCalendarEntrySource(BBjString id!, BBjString url!)
Creates a CalendarEntrySource
given a unique ID that identifes the entry source
for later use, such as with the BBjCalendarWidget::getEntrySourceById()
method,
and a URL to access the feed.
BBjString
id! A string that identifies the source so that it can be uniquely identified and used in other method calls.BBjString
url! A BBjString filled with the URL for the entry source.public static CalendarEntrySource createCalendarEntrySource(BBjString id!, BBjString url!, BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!)
Creates a CalendarEntrySource
given a unique ID that identifes the entry source
for later use, such as with the BBjCalendarWidget::getEntrySourceById()
method, along with the URL and
colors for the source's entries.
Note: Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
Note: You may pass in a null()
or empty string for any of the colors as a way to indicate that the default entry color should be used for this source.
BBjString
id! A string that identifies the source so that it can be uniquely identified and used in other method calls. If null(), it will be auto-generated and you can retrieve the id by calling the getId()
method on the source.BBjString
url! A BBjString filled with the URL for the entry source.BBjString
backgroundColor! The background color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used.BBjString
borderColor! The border color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used.BBjString
textColor! The text color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used.public static CalendarEntrySourceGoogle createCalendarEntrySourceGoogle(BBjString id!, BBjString calendarId!)
Contructs a CalendarEntrySourceGoogle
object for the provided Google Calendar ID.
BBjString
calendarId! The "Calendar ID" string from the settings page for that specific public Google calendar, e.g. https://fullcalendar.io/docs/google-calendar for information on FullCalendar integration with Google calendars
Google Developer Console for information on creating Goolge developer API keys
public static CalendarEntrySourceGoogle createCalendarEntrySourceGoogle(BBjString id!, BBjString calendarId!, BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!)
Creates a CalendarEntrySourceGoogle
object for the provided Google Calendar ID specifying a color scheme for the source's entries.
Note: In order to access public Google calendars programmatically, you need to
sign up for a developer's account and generate an API key. See the CalendarOptions::setGoogleCalendarApiKey()
method for documentation links and setting the API key.
Note: Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
Note: You may pass in a null()
or empty string for any of the colors as a way to indicate that the default entry color should be used for this source.
BBjString
id! A string that identifies the source so that it can be uniquely identified and used in other method calls. If null(), it will be auto-generated and you can retrieve the id by calling the getId()
method on the source.BBjString
calendarId! The "Calendar ID" string from the settings page for the specific public Google calendar, e.g.BBjString
backgroundColor! The background color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used.BBjString
borderColor! The border color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used.BBjString
textColor! The text color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used. https://fullcalendar.io/docs/google-calendar for information on FullCalendar integration with Google calendars
Google Developer Console for information on creating Goolge developer API keys
public static CalendarEntrySourceiCalendar createCalendarEntrySourceiCalendar(BBjString id!, BBjString url!)
Creates a CalendarEntrySourceiCalendar
for an iCalendar feed given a unique ID that identifes the entry source
for later use, such as with the BBjCalendarWidget::getEntrySourceById()
method,
and a URL to access the feed.
BBjString
id! A string that identifies the source so that it can be uniquely identified and used in other method calls. If null(), it will be auto-generated and you can retrieve the id by calling the getId()
method on the source.BBjString
url! A BBjString filled with the URL for the iCalendar feed. https://fullcalendar.io/docs/google-calendar for information on FullCalendar integration with Google calendars
https://icalendar.org/ for information on the iCalendar specification
public static CalendarEntrySourceiCalendar createCalendarEntrySourceiCalendar(BBjString id!, BBjString url!, BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!)
Creates a CalendarEntrySourceiCalendar
for an iCalendar feed given a unique ID that identifes the entry source
for later use, such as with the BBjCalendarWidget::getEntrySourceById()
method,
a URL to access the feed, and a color scheme for the source's entries.
Note: Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
Note: You may pass in a null()
or empty string for any of the colors as a way to indicate that the default entry color should be used for this source.
BBjString
id! A string that identifies the source so that it can be uniquely identified and used in other method calls. If null(), it will be auto-generated and you can retrieve the id by calling the getId()
method on the source.BBjString
url! A BBjString filled with the URL for the iCalendar feed.BBjString
backgroundColor! The background color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used.BBjString
borderColor! The border color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used.BBjString
textColor! The text color for the source's entries, or null()
or an empty string to indicate that the default entry color should be used. https://fullcalendar.io/docs/google-calendar for information on FullCalendar integration with Google calendars
https://icalendar.org/ for information on the iCalendar specification
public static CalendarOptions createCalendarOptions()
Creates an instance of the CalendarOptions
class with default values.
public static CalendarToolbar createCalendarToolbar()
Creates a CalendarToolbar
using the default toolbar position of CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
.
CalendarToolbar
object.public static CalendarToolbar createCalendarToolbar(BBjString position!)
Creates a CalendarToolbar
given the desired toolbar position, e.g. CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM()
.
BBjString
position! The desired toolbar position, e.g. CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM()
.CalendarToolbar
object.public static CalendarToolbar createCalendarToolbar(BBjString position!, CalendarToolbarSection startSection!, CalendarToolbarSection centerSection!, CalendarToolbarSection endSection!)
Creates a CalendarToolbar
given the desired toolbar position, e.g. CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM()
.
BBjString
position! The desired toolbar position, e.g. CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM()
.CalendarToolbarSection
startSection! A previously-defined CalendarToolbarSection
object for the start position in the toolbar.CalendarToolbarSection
centerSection! A previously-defined CalendarToolbarSection
object for the center position in the toolbar.CalendarToolbarSection
endSection! A previously-defined CalendarToolbarSection
object for the end position in the toolbar.CalendarToolbar
object.public static CalendarToolbar createCalendarToolbar(BBjString position!, BBjString startSection!, BBjString centerSection!, BBjString endSection!)
Creates a CalendarToolbar
given the desired toolbar position, e.g. CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
or
CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM()
along with comma-delimited string representations of the start, center, and end sections.
BBjString
position! The desired toolbar position, e.g. CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM()
.BBjString
startSection! A comma-delimited string representation of the start section of the toolbar.BBjString
centerSection! A comma-delimited string representation of the center section of the toolbar.BBjString
endSection! A comma-delimited string representation of the end section of the toolbar.CalendarToolbar
object.public static CalendarToolbarSection createCalendarToolbarSection(BBjString alignment!)
Creates a CalendarToolbarSection
. There are three possible alignments, or positions, for the section that include:
CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_START()
- The left-most section of the toolbar.CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_CENTER()
- The center section of the toolbar.CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_END()
- The right-most section of the toolbar.BBjString
alignment! The component's alignment which may be one of the following string values: "start", "center", or "end".public static CalendarToolbarSection createCalendarToolbarSection(BBjString alignment!, BBjString objects!)
Creates a CalendarToolbarSection
that takes an alignment and a set of options that would normally be set via the setObjects() method.
There are three possible alignments, or positions, for the section that include:
CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_START()
- The left-most section of the toolbar.CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_CENTER()
- The center section of the toolbar.CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_END()
- The right-most section of the toolbar.BBjString
alignment! The component's alignment which may be one of the following string values: "start", "center", or "end".BBjString
objects! A comma-separated list of objects to include in the section, like CalendarAPI.CALENDAR_TOOLBAR_OBJECT_*
.public static CalendarView createCalendarView(BBjString type!)
Creates a CalendarView
object given a view type. The provided view type should be one of the constants such as CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
, CalendarAPI.CALENDAR_VIEW_TIME_GRID_WEEK()
, etc.
BBjString
type! One of the view type constants such as CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
, CalendarAPI.CALENDAR_VIEW_TIME_GRID_WEEK()
, etc.public static CalendarView createCalendarView(JsonObject json!)
Creates a CalendarView
given a JsonObject representation of the view object.
JsonObject
json! A JsonObject representation of the CalendarView
.public static BBjVector getAllViewTypes()
Returns a BBjVector filled with all possible calendar view type constants such as CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
, CalendarAPI.CALENDAR_VIEW_TIME_GRID_WEEK()
, etc.
CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
, CalendarAPI.CALENDAR_VIEW_TIME_GRID_WEEK()
, etc.public static JsonArray getBBjVectorAsJsonArray(BBjVector vector!)
Returns a JSON array version of the supplied BBjVector.
BBjVector
vector! The BBjVector to be converted to a JSON array.public static BBjVector getJsonArrayAsBBjVector(JsonArray array!)
Returns a BBjVector version of the supplied JSON array.
JsonArray
array! The JSON array to be converted to a BBjVector.public static BBjString getJsonObjectAsFormattedString(JsonObject json!)
Returns a formatted, or pretty-printed version of the supplied JSON object sorted alphabetically by key.
JsonObject
json! The JSON object to be formatted.public static BBjNumber getLocalTimeZoneOffsetFromUtc()
DEPRECATED Returns the difference between the client's local time and UTC in minutes. For example, if your time zone is UTC+10, then -600 will be returned because UTC is 600 minutes behind the local time zone. Another way to view it is that the return value is the number of minutes that should be added to the local time in order to find UTC. Note that daylight savings time prevents this value from being a constant.
Deprecated in BBj 22.00 because Java removed the Nashorn JavaScript engine in Java 15. Therefore, this static method has moved to the BBjCalendarWidget class because the BBjHtmlView control used by the BBjCalendarWidget can execute JavaScript in a non-static context. Please use the BBjCalendarWidget::getLocalTimeZoneOffsetFromUtc()
method instead.
public static BBjString getValidDateString(BBjString dateString!)
DEPRECATED Returns a formatted date string if the provided date string can be parsed into a valid date, or null() if the date string is invalid.
BBjString
dateString! A string that contains a date representation. Deprecated in BBj 22.00 because Java removed the Nashorn JavaScript engine in Java 15. Therefore, this static method has moved to the BBjCalendarWidget class because the BBjHtmlView control used by the BBjCalendarWidget can execute JavaScript in a non-static context. Please use the BBjCalendarWidget::getValidDateString()
method instead.
public static BBjString getValidDateTimeString(BBjString dateTimeString!)
DEPRECATED Returns an ISO 8601 formatted date/time string if the provided date/time string can be parsed into a valid date, or null() if the date string is invalid.
BBjString
dateTimeString! A string that contains a date/time representation. Deprecated in BBj 22.00 because Java removed the Nashorn JavaScript engine in Java 15. Therefore, this static method has moved to the BBjCalendarWidget class because the BBjHtmlView control used by the BBjCalendarWidget can execute JavaScript in a non-static context. Please use the BBjCalendarWidget::getValidDateTimeString()
method instead.
public static BBjString getValidTimeString(BBjString timeString!)
DEPRECATED Returns a formatted time string if the provided time string can be parsed into a valid time, or null() if the time string is invalid.
BBjString
timeString! A string that contains a time representation. Deprecated in BBj 22.00 because Java removed the Nashorn JavaScript engine in Java 15. Therefore, this static method has moved to the BBjCalendarWidget class because the BBjHtmlView control used by the BBjCalendarWidget can execute JavaScript in a non-static context. Please use the BBjCalendarWidget::getValidTimeString()
method instead.
public static BBjNumber ON_CALENDAR_DATE_CLICK()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has clicked on a date or time.
Note that ON_CALENDAR_DATE_CLICK event is not fired when the user clicks a day heading in a list view.
Setting a callback for this event type will result in your application getting a CalendarDateClickEvent
object.
public static BBjNumber ON_CALENDAR_DATES_SET()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the calendar's date range has changed in any way.
Setting a callback for this event type will result in your application getting a CalendarDatesSetEvent
object.
public static BBjNumber ON_CALENDAR_DROP()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user dropped an external draggable element or an event from another calendar onto this calendar.
Note: This event has not yet been implemented.
public static BBjNumber ON_CALENDAR_ENTRIES_SET()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the calendar's entry data has changed in any way.
If you set a callback for this event, then add several entries to the calendar, your callback routine may be flooded because
the event will fire for every event that you add.
When responding to this event, the BBjAPI().getLastEvent()
call will return a CalendarEntriesSetEvent
object.
You can call the CalendarEntriesSetEvent::getEntries()
method to return a BBjVector of CalendarEntry
objects
that corresponds to all the known entries in the calendar at that instant in time.
Setting a callback for this event type will result in your application getting a CalendarEntriesSetEvent
object.
BBjVector.
public static BBjNumber ON_CALENDAR_ENTRY_ADD()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that an event has been added to the calendar.
Note: If you set a callback for this event, then add several events to the calendar, your callback routine may be flooded.
Setting a callback for this event type will result in your application getting a CalendarEntryAddEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_CHANGE()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the calendar's event data has changed in any way.
Setting a callback for this event type will result in your application getting a CalendarEntryChangeEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_CLICK()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has clicked on a calendar's event.
Setting a callback for this event type will result in your application getting a CalendarEntryClickEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_DRAG_START()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has started dragging an entry. In other words, the user has started to reposition the entire entry in the calendar
as opposed to resizing the entry by dragging one of its edges.
Setting a callback for this event type will result in your application getting a CalendarEntryEvent
object.
Note that both the ON_CALENDAR_ENTRY_DRAG_START()
and ON_CALENDAR_ENTRY_DRAG_STOP()
events result in a CalendarEntryEvent
object, but
the native HTML element object associated with the event will be empty.
public static BBjNumber ON_CALENDAR_ENTRY_DRAG_STOP()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has stopped dragging an entry. In other words, the user has repositioned the entire entry in the calendar
as opposed to resizing the entry by dragging one of its edges. This event is triggered after the user drags an entry, even if the entry doesn't
change its date/time. It is triggered before the entry's information has been modified (if moved to a new date/time) and before the
ON_CALENDAR_ENTRY_DROP
callback is triggered. Because the event occurs before the entry has been modified, the entry will be
the same as the ON_CALENDAR_ENTRY_DRAG_START
event.
Setting a callback for this event type will result in your application getting a CalendarEntryEvent
object.
Note that both the ON_CALENDAR_ENTRY_DRAG_START()
and ON_CALENDAR_ENTRY_DRAG_STOP()
events result in a CalendarEntryEvent
object, but
the native HTML element object associated with the event will be empty.
public static BBjNumber ON_CALENDAR_ENTRY_DROP()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has finished dragging and dropping the entry to a different day/time. In other words, the user has repositioned the entire entry in the calendar
as opposed to resizing the entry by dragging one of its edges.
Setting a callback for this event type will result in your application getting a CalendarEntryDropEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_LEAVE()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user is about to drop one of the calendar events on to another calendar.
Note: This event has not yet been implemented.
public static BBjNumber ON_CALENDAR_ENTRY_MOUSE_ENTER()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user moved the mouse into the bounds of a calendar event.
Setting a callback for this event type will result in your application getting a CalendarEntryMouseEnterEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_MOUSE_LEAVE()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user moved the mouse out of the bounds of a calendar event.
Setting a callback for this event type will result in your application getting a CalendarEntryMouseLeaveEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_RECEIVE()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the calendar has received an external draggable element with event data from another source or another calendar.
Note: This event has not yet been implemented.
public static BBjNumber ON_CALENDAR_ENTRY_REMOVE()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the calendar's event data has changed in any way.
Setting a callback for this event type will result in your application getting a CalendarEntryRemoveEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_RESIZE()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has stopped resizing an event by dragging one of its edges and the event now has a different duration.
Setting a callback for this event type will result in your application getting a CalendarEntryResizeEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_RESIZE_START()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has started resizing an event by dragging one of its edges.
Setting a callback for this event type will result in your application getting a CalendarEntryEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_RESIZE_STOP()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has stopped resizing an event. This event will be triggered after the user resizes an event by dragging one of its
edges, even if the event doesn't change in duration. It is also triggered before the ON_CALENDAR_ENTRY_RESIZE()
event is triggered.
Setting a callback for this event type will result in your application getting a CalendarEntryEvent
object.
public static BBjNumber ON_CALENDAR_ENTRY_SOURCE_FAILURE()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that fetching a CalendarEntrySource
failed.
Setting a callback for this event type will result in your application getting a ??? - TBD
object.
public static BBjNumber ON_CALENDAR_ENTRY_SOURCE_SUCCESS()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that fetching a CalendarEntrySource
succeeded.
Setting a callback for this event type will result in your application getting a ??? - TBD
object.
public static BBjNumber ON_CALENDAR_READY()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the BBjCalendarWidget
is ready.
Setting a callback for this event type will result in your application getting a CalendarReadyEvent
object.
public static BBjNumber ON_CALENDAR_SELECT()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user selected a date or time.
Note: You must configure the calendar to enable user selections via the CalendarOptions:setEnableSelectable()
method
if you intend to set a callback for the BBjCalendarWidget:ON_CALENDAR_SELECT
or BBjCalendarWidget:ON_CALENDAR_UNSELECT
events.
Setting a callback for this event type will result in your application getting a CalendarSelectEvent
object.
public static BBjNumber ON_CALENDAR_UNSELECT()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user unselected a date or time.
Note: You must configure the calendar to enable user selections via the CalendarOptions:setEnableSelectable()
method
if you intend to set a callback for the BBjCalendarWidget:ON_CALENDAR_SELECT
or BBjCalendarWidget:ON_CALENDAR_UNSELECT
events.
A selection might be cleared for a number of reasons:
The CalendarOptions::setEnableUnselectAuto()
impacts what causes the BBjCalendarWidget.ON_CALENDAR_UNSELECT
event to be fired.
If automatic unselection is enabled, then the unselection event will typically be fired after the user releases their selection mouse button.
Setting a callback for this event type will result in your application getting a CalendarUnselectEvent
.
public static BBjNumber ON_CALENDAR_VIEW_CHANGE()
A constant value that's used with the BBjCalendarWidget::setCallback()
method that signals that the user has changed the view type of the BBjCalendarWidget
.
Note: This only fires when the type of view changes, not when the user changes the view from one subtype to another. For example,
the event will be triggered when the user switches from the CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
to the
CalendarAPI.CALENDAR_VIEW_LIST_MONTH()
view. But it won't be triggerd when the user changes from
CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
to CalendarAPI.CALENDAR_VIEW_DAY_GRID_WEEK()
since both views are
the same type (dayGrid) and just the subtype (week vs. month) changes.
Setting a callback for this event type will result in your application getting a CalendarViewChangeEvent
object.