package caltool.view; import mvp.*; import caltool.schedule.DayName; import javax.swing.*; // For DefaultListModel /**** * * A SmallDayView is the model of a day in a monthly agenda. It consists of a * date number, a day name, and a list of zero or more scheduled item * descriptors. The items list is represented as a DefaultListModel to * facilitate its display. * * @author Gene Fisher (gfisher@calpoly.edu) * @version 6feb04 * */ public class SmallDayView extends Model { /** * Construct this with the given date, day, and items values. */ public SmallDayView(int date, DayName day, DefaultListModel items) { this.date = date; this.day = day; this.items = items; items = null; } /** * Return the date number. */ public int getDate() { return date; } /** * Return the day name. */ public DayName getDay() { return day; } /** * Return the list of item descriptors. */ public DefaultListModel getItems() { return items; } /*-* * Derived and refined data. */ /** The date number */ protected int date; /** The day name */ protected DayName day; /** The list of item descriptors */ protected DefaultListModel items; }