|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscheduler.view.View
public class View
Class View is the top-level model class in the view package. It controls the top level UI and provides methods to view a schedule as a list or a calendar. There are also methods to view a schedule by selectedDay or by week. Methods are provided for extended viewing through popups and dialogs. Methods are provided to filter various aspects of scheduled items.
Field Summary | |
---|---|
static AdvancedFilter |
advancedFilter
filter to show or hide times and dates |
protected CalendarView |
calendarView
The view of the schedule as a calendar. |
protected javax.swing.Box |
hbox
Top level box in the viewing window. |
protected ListView |
listView
The view of the schedule as a list. |
protected Schedule |
schedule
The schedule to be viewed. |
protected scheduler.Scheduler |
scheduler
The top level program. |
protected ViewCourseFilter |
viewCourseFilter
filter to show or hide schedule items that contain certain courses |
protected ViewInstructorFilter |
viewInstructorFilter
filter to show or hide schedule items that contain certain instructors |
protected ViewLocationFilter |
viewLocationFilter
filter to show or hide schedule items that contain certain locations |
protected ViewSettings |
viewSettings
The viewSettings used for drawing a schedule. |
Constructor Summary | |
---|---|
View(scheduler.Scheduler scheduler)
Constructs a shell. |
Method Summary | |
---|---|
void |
autoView()
This method creates a view on the screen immediately after a new schedule is generated. |
AdvancedFilter |
getAdvancedFilter()
Return the advancedFilter object. |
CalendarView |
getCalendarView()
Return the calendarView object. |
ListView |
getListView()
Return the listView object; |
Schedule |
getSchedule()
Return the schedule to be viewed. |
ViewCourseFilter |
getViewCourseFilter()
Return the ViewCourseFilter object. |
ViewInstructorFilter |
getViewInstructorFilter()
Return the ViewInstructorFilter object. |
ViewLocationFilter |
getViewLocationFilter()
Return the ViewLocationFilter object; |
ViewSettings |
getViewSettings()
Return the viewSettings object. |
void |
initSettings()
Initializes the View object with some default view settings. |
void |
setSchedule(Schedule schedule)
Associate a new schedule with the view. |
void |
setViewCourseFilter(ViewCourseFilter newCourseFilter)
Set the ViewCourseFilter object to a new one. |
void |
setViewInstructorFilter(ViewInstructorFilter newInstrFilter)
Set the ViewInstructorFilter object to a new one; |
void |
setViewLocationFilter(ViewLocationFilter newLocationFilter)
Set the ViewLocationFilter object to a new one; |
void |
setViewSettings(ViewSettings viewSettings)
Set viewSettings to the new viewSettings object. |
void |
update(java.util.Observable O,
java.lang.Object arg)
Updates the top level UI when one of its observable components changes. |
void |
viewSchedule()
Display a schedule view for the given schedule with the given information specified in viewSettings, filterOptions, and advancedFilters Pre: //The schedule to be viewed cannot be null schedule != null Post: //A view with a mode corresponding to viewMode is drawn. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ViewSettings viewSettings
protected javax.swing.Box hbox
protected scheduler.Scheduler scheduler
protected Schedule schedule
protected ViewCourseFilter viewCourseFilter
protected ViewInstructorFilter viewInstructorFilter
protected ViewLocationFilter viewLocationFilter
public static AdvancedFilter advancedFilter
protected ListView listView
protected CalendarView calendarView
Constructor Detail |
---|
public View(scheduler.Scheduler scheduler)
scheduler
- the main programMethod Detail |
---|
public void viewSchedule() throws NullScheduleException, Instructor.NullUserIDException
Instructor.NullUserIDException
- check instructor validity
NullScheduleException
- check for null schedulepublic void initSettings()
public void autoView()
public AdvancedFilter getAdvancedFilter()
public void setViewSettings(ViewSettings viewSettings)
viewSettings
- Viewing settings for this schedule view
Pre:
Post:
//Updated this.viewSettings must be consistent with changes made from GUI
this.viewSettings == viewSettingspublic ViewSettings getViewSettings()
public void setViewCourseFilter(ViewCourseFilter newCourseFilter)
newCourseFilter
- new ViewCourseFilter objectpublic void setViewInstructorFilter(ViewInstructorFilter newInstrFilter)
newInstrFilter
- new ViewInstructorFilter objectpublic void setViewLocationFilter(ViewLocationFilter newLocationFilter)
newLocationFilter
- new ViewLocationFilter objectpublic ViewCourseFilter getViewCourseFilter()
public ViewInstructorFilter getViewInstructorFilter()
public ViewLocationFilter getViewLocationFilter()
public void setSchedule(Schedule schedule)
schedule
- the schedule to be viewedpublic ListView getListView()
public CalendarView getCalendarView()
public void update(java.util.Observable O, java.lang.Object arg)
update
in interface java.util.Observer
O
- the observable class changed its statearg
- the argument passed by the observable class through notifyAllpublic Schedule getSchedule()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |