package caltool.model.view;

import caltool.model.caldb.*;
import caltool.model.schedule.Date;
import mvp.*;
import java.util.*;

/****
 *
 * A DailyAgenda contains the scheduled item information for a calendar day.
 * At the top of the agenda is the full date for the day of the agenda.  There
 * is a list of event titles containing the events scheduled to occur on this
 * day.  Following the event list is a list of time-tagged descriptors for the
 * scheduled appointments and meetings.  At the end of the agenda is a numbered
 * list of task descriptors for the day's scheduled tasks.
 *
 */
public class DailyAgenda extends Model {

    /**
     * Construct this with the given CalendarDB.
     */
    public DailyAgenda(CalendarDB calDB) {
        this.calDB = calDB;
    }

    /**
     * Observe the calendar for any changes.  When a change happens, see if it
     * effects this day, and if so, recompute and let the observing view know.
     */
    public void update(Observable o, Object arg) {

    }

    /*-*
     * Derived data fields
     */

    /** Date of this day's agenda */
    Date date;

    /** List of scheduled event titles for this day */
    EventTitleList events;

    /** Time slot description list for schedule appointments and meetings */
    TimeSlotDescriptorList timeSlots;

    /** List of scheduled tasks for this day */
    TaskDescriptorList tasks;

    /*-*
     * Process data
     */
    CalendarDB calDB;

}