public class MonthlyAgenda
extends mvp.Model
The primary access interface is through the getFirstDay and getNextDay iterators. These methods deliver each day of the month in turn, as a small day view object.
The current implementation is a stub consisting of a sample 30-day month that starts on Tuesday. The actual implementation will consult the CalendarDB to obtain real monthly data.
| Modifier and Type | Field and Description |
|---|---|
protected int |
currentDate
Iterator state variable containing the date number.
|
protected int |
currentDay
Iterator state variable containing the ordinal day position in a 6x7
grid.
|
protected DayName |
firstDay
First day of the month
|
protected FullMonthName |
fullMonthName
Full name, consisting of month name and year.
|
protected int |
numberOfDays
Number of days in the month
|
| Constructor and Description |
|---|
MonthlyAgenda(CalendarDB calDB)
Construct this with the given CalendarDB.
|
| Modifier and Type | Method and Description |
|---|---|
SmallDayView |
getFirstDay()
Return the first day of the month as a SmallDayView, q.v.
|
java.lang.String |
getFullMonthName()
Return the full month name as a single string.
|
SmallDayView |
getNextDay()
Return the second and subsequent days of the month.
|
int |
getNumberOfWeeks()
Return the number of weeks in the month.
|
void |
selectDate(int date)
Build a complete Date out of the given date number and call the
CalendarDB to select that date.
|
void |
update(java.util.Observable o,
java.lang.Object arg)
Update this' data based on the current selection in the current
calendar.
|
protected FullMonthName fullMonthName
protected DayName firstDay
protected int numberOfDays
protected int currentDate
protected int currentDay
public MonthlyAgenda(CalendarDB calDB)
public java.lang.String getFullMonthName()
public SmallDayView getFirstDay()
public SmallDayView getNextDay()
public int getNumberOfWeeks()
public void selectDate(int date)
public void update(java.util.Observable o,
java.lang.Object arg)