public interface CalendarToolbar
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] |
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_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, 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.
|
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
CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP() or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM() . |
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
CalendarToolbarSection on the toolbar. |
void |
setToolbarSections(CalendarToolbarSection startSection!,
CalendarToolbarSection centerSection!,
CalendarToolbarSection endSection!)
Sets all three
CalendarToolbarSection s on the toolbar in a single method call. |
static BBjString CALENDAR_TOOLBAR_POSITION_TOP()
static BBjString CALENDAR_TOOLBAR_POSITION_BOTTOM()
static BBjString CALENDAR_TOOLBAR_OBJECT_TITLE()
static BBjString CALENDAR_TOOLBAR_OBJECT_TODAY()
static BBjString CALENDAR_TOOLBAR_OBJECT_PREV()
static BBjString CALENDAR_TOOLBAR_OBJECT_NEXT()
static BBjString CALENDAR_TOOLBAR_OBJECT_PREV_YEAR()
static BBjString CALENDAR_TOOLBAR_OBJECT_NEXT_YEAR()
static BBjString CALENDAR_TOOLBAR_ALIGNMENT_START()
static BBjString CALENDAR_TOOLBAR_ALIGNMENT_CENTER()
static BBjString CALENDAR_TOOLBAR_ALIGNMENT_END()
void setPosition(BBjString 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()
.BBjString getPosition()
CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM()
.CalendarAPI.CALENDAR_TOOLBAR_POSITION_TOP()
or CalendarAPI.CALENDAR_TOOLBAR_POSITION_BOTTOM()
.void setToolbarSection(CalendarToolbarSection section!)
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.void setToolbarSections(CalendarToolbarSection startSection!, CalendarToolbarSection centerSection!, CalendarToolbarSection endSection!)
CalendarToolbarSection
s 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().JsonObject getAsJsonObject()
BBjString getAsString()
BBjString getAsFormattedString()