caltool
Class CalendarTool

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

public class CalendarTool
extends mvp.Model

Class CalendarTool is the top-level model class for the regular-user Calendar Tool program. CalendarTool has references to the functional model classes of the tool: File, Edit, Schedule, View, Admin, Options, and Help. There is also a reference to the CalendarDB class that houses the tool's major data bases.

The CalendarTool class also has the main method for the program. This method contructs the top-level model, view, and process classes. It then shows the top-level UI and let's the Java event loop take it from there.

Functionalitywise, all of the model classes are autonomous units. They each do their own work as invoked by the user. All that this top-level class does is to construct the work-doing model classes and set up the initial state of the tool when it is invoked from the outside operating system.

See also the companion view class CalendarToolUI.

See Also:
Serialized Form

Field Summary
protected  Admin admin
          Calendar administration module
protected  CalendarDB caldb
          Calendar database
protected  View calView
          Calendar viewing module
protected  Edit edit
          Basic editing module
protected  File file
          File-handling module
protected  Help help
          Tool help module
protected  Options options
          Tool options module
protected  Schedule schedule
          Scheduling module
 
Fields inherited from class mvp.Model
view
 
Constructor Summary
CalendarTool(CalendarToolUI calToolUI)
          Construct this with the given companion view.
 
Method Summary
 void exit()
          Implement the exit method to pass the buck to file.exit().
 Admin getAdmin()
          Return the Admin model.
 View getCalView()
          Return the View model.
 Edit getEdit()
          Return the Edit model.
 File getFile()
          Return the File model.
 Help getHelp()
          Return the Help model.
 Options getOptions()
          Return the Options model.
 Schedule getSchedule()
          Return the Schedule model.
static void main(java.lang.String[] args)
          Construct models, construct views, compose views, and fire the puppy up.
 
Methods inherited from class mvp.Model
dump, 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

file

protected File file
File-handling module


edit

protected Edit edit
Basic editing module


schedule

protected Schedule schedule
Scheduling module


calView

protected View calView
Calendar viewing module


admin

protected Admin admin
Calendar administration module


options

protected Options options
Tool options module


help

protected Help help
Tool help module


caldb

protected CalendarDB caldb
Calendar database

Constructor Detail

CalendarTool

public CalendarTool(CalendarToolUI calToolUI)
Construct this with the given companion view. Call the submodel constructors. Initialize the start-up state based on default options and command-line arguments.

Method Detail

exit

public void exit()
Implement the exit method to pass the buck to file.exit(). Per set up performed in the companion CalendarToolUI view, this method is called when the user closes the top-level menubar window, e.g., via the window manager close button.

Overrides:
exit in class mvp.Model

main

public static void main(java.lang.String[] args)
Construct models, construct views, compose views, and fire the puppy up.


getFile

public File getFile()
Return the File model.


getEdit

public Edit getEdit()
Return the Edit model.


getSchedule

public Schedule getSchedule()
Return the Schedule model.


getCalView

public View getCalView()
Return the View model.


getAdmin

public Admin getAdmin()
Return the Admin model.


getOptions

public Options getOptions()
Return the Options model.


getHelp

public Help getHelp()
Return the Help model.