-
Notifications
You must be signed in to change notification settings - Fork 0
Calendar Filtering
Filtering determines if certain categories / events / commitments / commitmentStatuses are view-able in the day/week/month/year tabs, and is handled client side rather than in the actual database.
The user can determine what is filtered in the filtering tab, shown next to the details tab on the bottom left of the calendar. A list of categories will be generated when the filtering tab is selected containing any categories the user created previously, as well as always having a checkbox for uncategorized displayables, the three types of commitmentStatuses, and 2 external checkboxes for all events and commitments. If the user selects / unselects a checkbox, the corresponding type of event / category will be made viewable / unviewable on all calendar views, and will be repainted immediately.
The filtering tab, one of the tabs created in SidebarTabbedPane, holds 2 lists containing categories / commitmentStatuses that are currently selected in the list, as well as two booleans corresponding to the event / commitment checkboxes. Whenever the cachingDisplayableClient class receives a list of displayables from the server, it grabs the current list of visible categories / commitments from MainPanel using Mainpanel.getInstance().getSelectedCategories/Statuses(), and checks through the retrieved displayables for only those with visible elements, passing the filtered list on to whatever calendar view is calling for them.