public class CalendarAPI extends Object
CalendarAPI
is a BBj Custom Class that facilitates creating calendar objects, accessing constants, and is used in combination with the BBjCalendarWidget
.Constructor and Description |
---|
CalendarAPI() |
Modifier and Type | Method and Description |
---|---|
static BBjString |
CALENDAR_ENTRY_DISPLAY_AUTO()
When in daygrid view, it renders the entry as a solid rectangle if it is all-day or multi-day.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_BACKGROUND()
This modifies the background of the entry's date/time frame in the calendar.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_BLOCK()
When in daygrid view, it renders the entry as a solid rectangle.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_INVERSE_BACKGROUND()
This inversely modifies the background of the entry's date/time frame in the calendar.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_LIST_ITEM()
When in daygrid view, it renders the entry as a colored dot.
|
static BBjString |
CALENDAR_ENTRY_DISPLAY_NONE()
This hides the entry on the calendar.
|
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. |
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. |
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. |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_DAY()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'day' toolbar button . |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_LIST()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'list' toolbar button . |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_MONTH()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'month' toolbar button . |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_TODAY()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'today' toolbar button . |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_WEEK()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'week' toolbar button . |
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_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_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_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_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
setPosition() method that indicates that the toolbar should be below the calendar. |
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. |
static BBjString |
CALENDAR_VIEW_DAY_GRID_MONTH() |
static BBjString |
CALENDAR_VIEW_DAY_GRID_WEEK() |
static BBjString |
CALENDAR_VIEW_LIST_DAY() |
static BBjString |
CALENDAR_VIEW_LIST_MONTH() |
static BBjString |
CALENDAR_VIEW_LIST_WEEK() |
static BBjString |
CALENDAR_VIEW_LIST_YEAR() |
static BBjString |
CALENDAR_VIEW_TIME_GRID_DAY() |
static BBjString |
CALENDAR_VIEW_TIME_GRID_WEEK() |
static BBjCalendarWidget |
createBBjCalendarWidget(BBjWindow wnd!)
Creates a
BBjCalendarWidget given a BBjWindow where the widget takes up the full size of the window. |
static BBjCalendarWidget |
createBBjCalendarWidget(BBjWindow wnd!,
BBjNumber debug!)
Creates a
BBjCalendarWidget given a BBjWindow where the widget takes up the full size of the window. |
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. |
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. |
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. |
static CalendarEntry |
createCalendarEntry(BBjString title!,
BBjString start!)
Creates a
CalendarEntry given an entry title and starting date/time string. |
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. |
static CalendarEntry |
createCalendarEntry(JsonObject json!)
Creates a
CalendarEntry given a JsonObject representation of the CalendarEntry object. |
static CalendarEntrySource |
createCalendarEntrySource()
Creates a
CalendarEntrySource with default values. |
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. |
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. |
static CalendarEntrySourceGoogle |
createCalendarEntrySourceGoogle(BBjString id!,
BBjString calendarId!)
Contructs a
CalendarEntrySourceGoogle object for the provided Google Calendar ID. |
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. |
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. |
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. |
static CalendarOptions |
createCalendarOptions()
Creates an instance of the
CalendarOptions class with default values. |
static CalendarToolbar |
createCalendarToolbar()
Creates a
CalendarToolbar using the default toolbar position of CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP() . |
static CalendarToolbar |
createCalendarToolbar(BBjString position!)
Creates a
CalendarToolbar given the desired toolbar position, e.g. |
static CalendarToolbar |
createCalendarToolbar(BBjString position!,
BBjString startSection!,
BBjString centerSection!,
BBjString endSection!)
Creates a
CalendarToolbar given the desired toolbar position, e.g. |
static CalendarToolbar |
createCalendarToolbar(BBjString position!,
CalendarToolbarSection startSection!,
CalendarToolbarSection centerSection!,
CalendarToolbarSection endSection!)
Creates a
CalendarToolbar given the desired toolbar position, e.g. |
static CalendarToolbarSection |
createCalendarToolbarSection(BBjString alignment!)
Creates a
CalendarToolbarSection . |
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. |
static CalendarView |
createCalendarView(BBjString type!)
Creates a
CalendarView object given a view type. |
static CalendarView |
createCalendarView(JsonObject json!)
Creates a
CalendarView given a JsonObject representation of the view object. |
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. |
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.
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. |
static BBjString |
getValidDateString(BBjString dateString!)
Deprecated.
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. |
static BBjString |
getValidDateTimeString(BBjString dateTimeString!)
Deprecated.
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. |
static BBjString |
getValidTimeString(BBjString timeString!)
Deprecated.
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. |
static BBjNumber |
ON_CALENDAR_DATE_CLICK()
Note that ON_CALENDAR_DATE_CLICK event is not fired when the user clicks a day heading in a list view.
|
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. |
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. |
static BBjNumber |
ON_CALENDAR_ENTRIES_SET()
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.
|
static BBjNumber |
ON_CALENDAR_ENTRY_ADD()
Note: If you set a callback for this event, then add several events to the calendar, your callback routine may be flooded.
|
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
static BBjNumber |
ON_CALENDAR_READY()
A constant value that's used with the
BBjCalendarWidget::setCallback() method that signals that the BBjCalendarWidget is ready. |
static BBjNumber |
ON_CALENDAR_SELECT()
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. |
static BBjNumber |
ON_CALENDAR_UNSELECT()
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. |
static BBjNumber |
ON_CALENDAR_VIEW_CHANGE()
Note: This only fires when the type of view changes, not when the user changes the view from one subtype to another.
|
public CalendarAPI()
public static BBjNumber ON_CALENDAR_READY()
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_VIEW_CHANGE()
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.
public static BBjNumber ON_CALENDAR_ENTRIES_SET()
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.
public static BBjNumber ON_CALENDAR_ENTRY_CLICK()
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_ADD()
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()
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_REMOVE()
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_MOUSE_ENTER()
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()
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_RESIZE_START()
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()
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_RESIZE()
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_DRAG_START()
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()
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()
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_RECEIVE()
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_LEAVE()
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_DROP()
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_DATES_SET()
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_DATE_CLICK()
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_SELECT()
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()
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_ENTRY_SOURCE_SUCCESS()
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_ENTRY_SOURCE_FAILURE()
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 BBjString CALENDAR_VIEW_DAY_GRID_WEEK()
public static BBjString CALENDAR_VIEW_DAY_GRID_MONTH()
public static BBjString CALENDAR_VIEW_TIME_GRID_DAY()
public static BBjString CALENDAR_VIEW_TIME_GRID_WEEK()
public static BBjString CALENDAR_VIEW_LIST_DAY()
public static BBjString CALENDAR_VIEW_LIST_WEEK()
public static BBjString CALENDAR_VIEW_LIST_MONTH()
public static BBjString CALENDAR_VIEW_LIST_YEAR()
public static BBjString CALENDAR_TOOLBAR_BUTTON_TODAY()
CalendarOptions::setButtonText()
method that uniquely identifies the 'today' toolbar button .public static BBjString CALENDAR_TOOLBAR_BUTTON_MONTH()
CalendarOptions::setButtonText()
method that uniquely identifies the 'month' toolbar button .public static BBjString CALENDAR_TOOLBAR_BUTTON_WEEK()
CalendarOptions::setButtonText()
method that uniquely identifies the 'week' toolbar button .public static BBjString CALENDAR_TOOLBAR_BUTTON_DAY()
CalendarOptions::setButtonText()
method that uniquely identifies the 'day' toolbar button .public static BBjString CALENDAR_TOOLBAR_BUTTON_LIST()
CalendarOptions::setButtonText()
method that uniquely identifies the 'list' toolbar button .public static BBjString CALENDAR_TOOLBAR_POSITION_TOP()
setPosition()
method that indicates that the toolbar should be above the calendar.public static BBjString CALENDAR_TOOLBAR_POSITION_BOTTOM()
setPosition()
method that indicates that the toolbar should be below the calendar.public static BBjString CALENDAR_TOOLBAR_OBJECT_TITLE()
public static BBjString CALENDAR_TOOLBAR_OBJECT_TODAY()
public static BBjString CALENDAR_TOOLBAR_OBJECT_PREV()
public static BBjString CALENDAR_TOOLBAR_OBJECT_NEXT()
public static BBjString CALENDAR_TOOLBAR_OBJECT_PREV_YEAR()
public static BBjString CALENDAR_TOOLBAR_OBJECT_NEXT_YEAR()
public static BBjString CALENDAR_TOOLBAR_ALIGNMENT_START()
CalendarToolbarSection
constructor that indicates the starting, or left, section of the toolbar to be defined.public static BBjString CALENDAR_TOOLBAR_ALIGNMENT_CENTER()
CalendarToolbarSection
constructor that indicates the center section of the toolbar to be defined.public static BBjString CALENDAR_TOOLBAR_ALIGNMENT_END()
CalendarToolbarSection
constructor that indicates the ending, or right, section of the toolbar to be defined.public static BBjString CALENDAR_ENTRY_DISPLAY_AUTO()
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_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_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_BACKGROUND()
This modifies the background of the entry's date/time frame in the calendar.
public static BBjString CALENDAR_ENTRY_DISPLAY_INVERSE_BACKGROUND()
This inversely modifies the background of the entry's date/time frame in the calendar.
public static BBjString CALENDAR_ENTRY_DISPLAY_NONE()
This hides the entry on the calendar.
public static BBjCalendarWidget createBBjCalendarWidget(BBjWindow wnd!)
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!)
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!)
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!)
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!)
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 CalendarView createCalendarView(BBjString type!)
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!)
CalendarView
given a JsonObject representation of the view object.JsonObject
- json! A JsonObject representation of the CalendarView
.public static CalendarOptions createCalendarOptions()
CalendarOptions
class with default values.public static CalendarToolbar createCalendarToolbar()
CalendarToolbar
using the default toolbar position of CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
.CalendarToolbar
object.public static CalendarToolbar createCalendarToolbar(BBjString position!)
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!)
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!)
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!)
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!)
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 CalendarEntry createCalendarEntry(JsonObject json!)
CalendarEntry
given a JsonObject representation of the CalendarEntry
object.public static CalendarEntry createCalendarEntry(BBjString title!, BBjString start!)
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.public static CalendarEntry createCalendarEntry(BBjString title!, BBjString start!, BBjString end!)
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.public static CalendarEntrySource createCalendarEntrySource()
CalendarEntrySource
with default values.public static CalendarEntrySource createCalendarEntrySource(BBjString id!, BBjString url!)
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!)
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!)
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. "abcd1234@group.calendar.google.com". This ID is specific to the desired Google calendar and is different from the source's ID.public static CalendarEntrySourceGoogle createCalendarEntrySourceGoogle(BBjString id!, BBjString calendarId!, BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!)
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. "abcd1234@group.calendar.google.com".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 CalendarEntrySourceiCalendar createCalendarEntrySourceiCalendar(BBjString id!, BBjString url!)
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.public static CalendarEntrySourceiCalendar createCalendarEntrySourceiCalendar(BBjString id!, BBjString url!, BBjString backgroundColor!, BBjString borderColor!, BBjString textColor!)
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.public static BBjVector getAllViewTypes()
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 BBjString getJsonObjectAsFormattedString(JsonObject json!)
JsonObject
- json! The JSON object to be formatted.public static JsonArray getBBjVectorAsJsonArray(BBjVector vector!)
BBjVector
- vector! The BBjVector to be converted to a JSON array.public static BBjVector getJsonArrayAsBBjVector(JsonArray array!)
JsonArray
- array! The JSON array to be converted to a BBjVector.public static BBjString getValidDateString(BBjString dateString!)
BBjCalendarWidget::getValidDateString()
method instead.BBjString
- dateString! A string that contains a date representation.public static BBjString getValidTimeString(BBjString timeString!)
BBjCalendarWidget::getValidTimeString()
method instead.BBjString
- timeString! A string that contains a time representation.public static BBjString getValidDateTimeString(BBjString dateTimeString!)
BBjCalendarWidget::getValidDateTimeString()
method instead.BBjString
- dateTimeString! A string that contains a date/time representation.public static BBjNumber getLocalTimeZoneOffsetFromUtc()
BBjCalendarWidget::getLocalTimeZoneOffsetFromUtc()
method instead.