For complete BBjCalendarWidget documentation, view the BBjCalendarWidget Javadocs.
- Offers plenty of configuration options to adapt to diverse use cases.
- Offers a variety of view types including month view, week view, day view, an agenda or list-based view, and more.
- Offers a configurable header and/or footer toolbar for navigating forwards and backwards by month, year, etc.
- Supports adding calendar entries from a variety of sources including programmatically via BBj, JSON sources (local or remote), a public Google calendar, and ICS or iCalendar (local or remote).
- Supports editing entries by dragging/dropping or resizing existing entries.
- Supports extended entry attributes and custom tagging that may be used to dynamically hide or show tagged entries.
- Supports theming via Bootstrap.
- Offers numerous callbacks so your BBj program can respond to user events such as clicking on a date or entry, modifying an entry, etc.
Because the BBjCalendarWidget is a BBj plug-in, it relies on the BBjWidget.bbj base class that is pre-installed with BBj and may also be managed via the BBj Plugin Manager. The BBjCalendarWidget is installed with BBj 21.00 and higher into the <BBjHome>/plugins/BBjCalendarWidget directory.
Calendar Classes, Terms, and Definitions
|Provides methods to create most of the calendar objects and provides access to all the constants from the other classes.
The main calendar control that you create from the CalendarAPI using one of the three creation methods. At a minimum, you will need to provide to the creation method a BBjTopLevelWindow or BBjChildWindow that will contain the calendar control. The other creation methods take more parameters to provide flexibility when creating the calendar control.
|A single calendar entry, or appointment, that can be created from the CalendarAPI and then added to an existing calendar.
|A source that provides multiple calendar entries. The entry source can be a web service that provides an array of calendar entries in JSON format, a public Google calendar, or a web service or ICS file that provides entries in the iCalendar format.
A calendar event, often triggered by the user interacting with the calendar, for which your application may set a callback. Because the BBjHtmlView control must initialize the calendar contained within, your application can set a callback to be notified when the calendar is ready for use. For example, executing the following line of code (as seen in the demo programs):
results in the calendar executing the code in your OnCalendarReady subroutine as soon as the calendar has been initialized.
A particular view into the calendar, such as one that displays the entire month, a single week, a single day, or a list of entries similar to an agenda view. The calendar defaults to the CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH() view, but the view may be changed via the API, via the user selecting a different view from the toolbar, or modifying the view in the calendar’s options.
A class that contains all the options for the calendar in one place. It’s possible to change the calendar’s options after creating the calendar (see demo #3), or you can create an instance of the options from the CalendarAPI and specify it when creating the calendar itself (see demo #4). When done this way, you can affect the calendar’s appearance, e.g. its theme, before the calendar is displayed to the user to avoid an abrupt change in appearance.
A class that defines a header or footer configurable toolbar for the calendar. By default, the calendar is created with a default header toolbar that contains navigation buttons (today, yesterday, tomorrow, etc.), the current view’s title, and view option buttons (month, week, day, list). It’s possible to remove the toolbar completely, or even add both header and footer toolbars.
|By default, once you have added a calendar to your BBj program it defaults to the current date. But you can call methods like navigateNext(), navigateNextYear(), etc. to cause the calendar to display the desired date.
The BBjCalendarWidget plug-in includes several BBj custom classes that cover every aspect of the calendar including the calendar itself (BBjCalendarWidget.bbj), calendar configuration (CalendarOptions.bbj), calendar entries (CalendarEntry.bbj), calendar entry sources (CalendarEntrySource.bbj), calendar views (CalendarView.bbj), calendar toolbars (CalendarToolbar.bbj), and calendar events (CalendarEvents.bbj).
The BBjCalendarWidget is installed with a few different demos in the <BBjHome>/plugins/BBjCalendarWidget/demo directory. These demos may be run by traditional means, via the Eclipse IDE, or even from the BBjPluginManager. The demos are numbered, and range from a simple example that displays an empty calendar to more complex programs that demonstrate adding feeds from web services and Google public calendars.
|Creates an empty calendar object in a BBjWindow
|Creates a calendar object in a BBjWindow, registers a callback, and adds multiple entries
|Creates a calendar and adds multiple entry sources including public Google calendars and a web service
|Creates a customized calendar object in a BBjWindow by providing a CalendarOptions object
|Creates a customized calendar object and reads in entries from a CSV file
|Creates a calendar object and demonstrates programmatic navigation
|Creates an editable calendar object that reads in entries from an MKEYED file