caltool.view
Class View

java.lang.Object
  extended by java.util.Observable
      extended by mvp.Model
          extended by caltool.view.View
All Implemented Interfaces:
java.io.Serializable

public class View
extends mvp.Model

Class View is the top-level model class in the view package. It provides methods to view the calendar at the five structural levels of a calendar: item, day, week, month, and year. There are also methods to go to the previous and next views at any level, as well as an method to go to a specific date. Methods are provided to view lists of scheduled items in a variety of ways. Methods are provided to view other users' calendars and to view a list of active viewing windows. View filtering are capabilities are defined in the Filter submodel.

See Also:
Serialized Form

Field Summary
protected  CalendarDB calDB
          Calendar database in which viewed items are stored
protected  DailyAgenda dailyAgenda
          The current instance of DailyAgenda that computes the view for the user-selected day.
protected  Filter filter
          The filter submodel
protected  Lists lists
          The lists submodel
protected  MonthlyAgenda monthlyAgenda
          The current instance of MonthlyAgenda that computes the view for the user-selected month.
protected  WeeklyAgendaList weeklyAgendaList
          The current instance of WeeklyAgendaList that computes the view for the user-selected week.
protected  WeeklyAgendaTable weeklyAgendaTable
          The current instance of WeeklyAgendaTable that computes the view for the user-selected week.
protected  Windows windows
          The windows submodel
 
Fields inherited from class mvp.Model
view
 
Constructor Summary
View(mvp.View view, CalendarDB caldb)
           
 
Method Summary
 boolean areAppointmentsHidden()
          Return true if appointments are hidden, false if not.
 boolean areEventsHidden()
          Return true if events are hidden, false if not.
 boolean areMeetingsHidden()
          Return true if meetings are hidden, false if not.
 boolean areTasksHidden()
          Return true if tasks are hidden, false if not.
 Lists getLists()
          Return the lists model class that has the methods to compute the differe forms of lists.
 void selectDate(Date date)
          Select the date in the current calendar.
 void selectDate(int date)
          Select the date given a single date number.
 void toggleShowHideAppointments()
          Toggle the show/hide state for appointments.
 void toggleShowHideEvents()
          Toggle the show/hide state for events.
 void toggleShowHideMeetings()
          Toggle the show/hide state for meetings.
 void toggleShowHideTasks()
          Toggle the show/hide state for tasks.
 DailyAgenda viewDay()
          Produce the daily agenda for the currently selected date, or for today's date if no other date is currently selected.
 ScheduledItem viewItem()
          Produce the currently selected scheduled item.
 MonthlyAgenda viewMonth()
          Produce the monthly agenda for the currently selected date, or for today's date if no other date is currently selected.
 
Methods inherited from class mvp.Model
dump, exit, getView, setView
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

calDB

protected CalendarDB calDB
Calendar database in which viewed items are stored


dailyAgenda

protected DailyAgenda dailyAgenda
The current instance of DailyAgenda that computes the view for the user-selected day. This must be refined into a collection of some form to support multi-window mode.


weeklyAgendaTable

protected WeeklyAgendaTable weeklyAgendaTable
The current instance of WeeklyAgendaTable that computes the view for the user-selected week. This must be refined into an collection of some for to support multi-window mode.


weeklyAgendaList

protected WeeklyAgendaList weeklyAgendaList
The current instance of WeeklyAgendaList that computes the view for the user-selected week. This must be refined into a collection of some form to support multi-window mode.


monthlyAgenda

protected MonthlyAgenda monthlyAgenda
The current instance of MonthlyAgenda that computes the view for the user-selected month. This must be refined into a collection of some form to support multi-window mode.


lists

protected Lists lists
The lists submodel


filter

protected Filter filter
The filter submodel


windows

protected Windows windows
The windows submodel

Constructor Detail

View

public View(mvp.View view,
            CalendarDB caldb)
Method Detail

viewItem

public ScheduledItem viewItem()
Produce the currently selected scheduled item.


viewDay

public DailyAgenda viewDay()
Produce the daily agenda for the currently selected date, or for today's date if no other date is currently selected.


viewMonth

public MonthlyAgenda viewMonth()
Produce the monthly agenda for the currently selected date, or for today's date if no other date is currently selected.


getLists

public Lists getLists()
Return the lists model class that has the methods to compute the differe forms of lists.


selectDate

public void selectDate(Date date)
Select the date in the current calendar. The most typical reason for date selection is as the argument to a view command.


selectDate

public void selectDate(int date)
Select the date given a single date number. Figure out the complete date based on the currently active view window.


toggleShowHideAppointments

public void toggleShowHideAppointments()
Toggle the show/hide state for appointments.


areAppointmentsHidden

public boolean areAppointmentsHidden()
Return true if appointments are hidden, false if not.


toggleShowHideMeetings

public void toggleShowHideMeetings()
Toggle the show/hide state for meetings.


areMeetingsHidden

public boolean areMeetingsHidden()
Return true if meetings are hidden, false if not.


toggleShowHideTasks

public void toggleShowHideTasks()
Toggle the show/hide state for tasks.


areTasksHidden

public boolean areTasksHidden()
Return true if tasks are hidden, false if not.


toggleShowHideEvents

public void toggleShowHideEvents()
Toggle the show/hide state for events.


areEventsHidden

public boolean areEventsHidden()
Return true if events are hidden, false if not.