public interface CalendarToolbar
The CalendarToolbar is a BBj Custom Class that defines the toolbar for the calendar that can
be positioned on the top or bottom and contains three sections: start, center, and end. Each section is defined
by a CalendarToolbarSection object that by default displays:
| Location | Constant | Displays | Example |
|---|---|---|---|
| start | CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_START() | date navigation buttons | [today] [previous year][previous][next][next year] |
| center | CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_CENTER() | title | "December 2020" |
| end | CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_END() | view type buttons | [month][week][day][list] |
Note that it's possible to add both a header and footer toolbar to the calendar.
| Modifier and Type | Method and Description |
|---|---|
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_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, which is the default content for the center toolbar section. |
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. |
BBjString | getAsFormattedString()Returns a formatted, i.e. pretty-printed or beautified, stringified JsonObject representation of the CalendarToolbar object. |
JsonObject | getAsJsonObject()Returns the CalendarToolbar object as a JsonObject. |
BBjString | getAsString()Returns a stringified JsonObject representation of CalendarToolbar object. |
BBjString | getPosition()Returns the position of the calendar's toolbar as of the toolbar position constants like
|
void | setPosition(BBjString position!)Sets the position of the calendar's toolbar to the top or bottom of the calendar, which defaults to the top position. |
void | setToolbarSection(CalendarToolbarSection section!)Sets a |
void | setToolbarSections(CalendarToolbarSection startSection!, CalendarToolbarSection centerSection!, CalendarToolbarSection endSection!)Sets all three |
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_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, which is the default content for the center toolbar section.
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 BBjString getAsFormattedString()Returns a formatted, i.e. pretty-printed or beautified, stringified JsonObject representation of the CalendarToolbar object.
public JsonObject getAsJsonObject()Returns the CalendarToolbar object as a JsonObject.
JsonObject for information about an object in JSON format.public BBjString getAsString()Returns a stringified JsonObject representation of CalendarToolbar object.
public BBjString getPosition()Returns the position of the calendar's toolbar as of the toolbar position constants like
CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP() or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM().
CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP() or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM().public void setPosition(BBjString position!)
Sets the position of the calendar's toolbar to the top or bottom of the calendar, which defaults to the top position.
BBjString position! A BBjString corresponding to one of the toolbar position constants like CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP() or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM().public void setToolbarSection(CalendarToolbarSection section!)Sets a CalendarToolbarSection on the toolbar. Note that each CalendarToolbarSection object
already contains a toolbar position (start, center, end) so the position does not need to be provided in this method call.
CalendarToolbarSection section! A previously-defined CalendarToolbarSection object.public void setToolbarSections(CalendarToolbarSection startSection!, CalendarToolbarSection centerSection!, CalendarToolbarSection endSection!)
Sets all three CalendarToolbarSections on the toolbar in a single method call.
CalendarToolbarSection startSection! A previously-defined CalendarToolbarSection object with alignment set to CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_START().CalendarToolbarSection centerSection! A previously-defined CalendarToolbarSection object with alignment set to CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_CENTER().CalendarToolbarSection endSection! A previously-defined CalendarToolbarSection object with alignment set to CalendarAPI.CALENDAR_TOOLBAR_ALIGNMENT_END().