###############################################################
#All files included in this distribution are copyrighted 1999.#
###############################################################

Class Hierarchy
===============

An HTML version of this class tree can be found in tree.html in this current
directory.  The tree was generated using the command "javadoc ."


User-Defined Classes
--------------------
java.lang.Object --> ClientSocket
                     EventId
                     GetUsers 
                     MeetingIntro 
                     ResultBox
                     TodaysDate
                     Year
           java.lang.Thread ---------> TimeUpdater                   
      java.awt.event.WindowAdapter --> CloseWindow
            java.awt.Component ------> java.awt.Container -->-->--+
                                                                  |
+------------<---------<---------<----------<---------<-----------+
|
+--> java.awt.Window --> java.awt.Dialog --> AddRoomDialog
     java.awt.Panel  --> AttendeesPanel      AdminHelpBox
                         AutoPanel           ChangePasswdDialog
                         CalendarBox         DeleteUserDialog
                         DaysOfWeek          KillServerDialog
                         DescriptionPanel    NewUserDialog
                         DonePanel           RestoreDBDialog
                         LocationPanel       ViewRoomDialog
                         MailboxPanel        ViewUserDialog
                         ManualPanel         DropReasonDialog ----+
                         ModViewPanel        MeetingDialog -----+ |
                         TimePanel                              | |
                         WeekPanel                              | |
                         YYmmddPanel                            | |
                         DurationPanel ----> TemporalPanel      | |
             java.applet.Applet -----------> Startup            | |
                         ButtonPanel +       DavesTest          | |
                                     |-----> MonthButtonPanel   | |
                                             WeekButtonPanel    | |
                                                                | |
      +---------------------------------------------------------+ |
      | +---------------------------------------------------------+
      | |
      | +--> DeleteReasonDialog
      |
      +----> ViewMeetingDialog --> ModMeetingDialog 



Class Overview
==============

    The majority of the new class definitions are subclasses of either 
java.awt.Panel or java.awt.Dialog.  Panels allow for natural and fairly
visual grouping of the entities found in the calendar client.


Design Notes
============

    We used group # 18's calendar server in our client implementation.
The ClientSocket class is instantiated once to provide a connection to the 
calendar server.  Once instantiated, a reference to this object is passed to 
objects which require communication with the server. For instance, when the
AttendsPanel class is instantiated, a reference to the socket is passed so that
it may independently communicate with the server to retrieve information.

  The EventId class serves as a convenient structure to hold and pass
date/time/username information among objects.  It also provides eventid 
formatting and parsing services. For instance, you may feed in a formatted date
such as YYYY/MM/DD and it will assign each field to the appropriate member 
variable.  The reverse operation can also be performed with the conconatenation
service.

  The various Panel subclasses shown above provide relative local layout as well
as panel specific operations.  For instance, the YYmmddPanel class defines its
own local layout and  enforces error-checking on its values.  These various
panels are encapsulated within Dialog objects.  Events, mainly in the form of
button pushes  (action events), are captured by the encapulating Dialog box or
frame and handled appropriated.  When the gathering of information is required,
the Dialog box triggers each of its panels to return data. Once retrieved, the
Dialog box formulates a valid query and issues it to the calendar server.  The
reverse operation is performed to place information into the panels.


Description of Classes
----------------------
1. ClientSocket - This object is used by all objects which wish to communicate
                  with the calendar server. It provides 2 simple public methods,
                  Read() and Write() to allow for easy network access.
                  
2. Eventid - This object provides a convenient container in which to pass
             time/day information among objects which need such data.
              
3. GetUsers - This object obtains a list of usernames from the calendar service.

4. MeetingIntro - This object acts as the decision-maker in deciding whether to
                  call the "create new meeting" object (Meeting Dialog) or the 
                  "view current meeting" object (ViewMeetingDialog).
                  
5. ResultBox - This object handles the majority of the error messages that can
               be generated by the server. The object interprets the error and
               creates a more user-friendly dialog box contain error 
               information.

6. TodaysDate - This object holds the current date and provides date translation
                services.
                
7. Year - This objects stores the maximum day of each month and can return this
          information to a requesting object.
          
8. TimeUpdater - This object provides threading operations to update the clock
                 that is displayed in the calendar client.
                 
9. CloseWindow - This object provides proper /formal closing of a window when a
                 Unix window manager sends a destroy / dismiss window command.

Dialog Classess
---------------
10. AddRoomDialog - This object creates a Dialog box in which the user may add
                    more users to the calendar server.

11. AdminHelpBox - This object, when passed a title as a String and a string
                   containing a description, creates a help window to aid the
                   end user during use of the calendar client.

12. ChangePasswdDialog - This object allows for a user to change his/her
                         password.

13. KillServerDialog - This object handles the proper shutdown of the calendar
                        server and appropriate disconnection.
                        
14. NewUserDialog - This object handles the creation of new users on the
                    calendar server.
                    
15. RestoreDBDialog - This object allows the administrator to restore a database
                      file which is kept on the hard disk.

16. ViewRoomDialog - This object provides a listing of available rooms.

17. ViewUserDialog - This class handles the dialog which enables a user to view
                     a list of current users on the server. It inherits from the
                     Dialog class (modal) and requires the parent frame and a 
                     socket connected to the server, as parameters.

18. DropReasonDialog - This class handles the operation of dropping from a
                       meeting.

19. DeleteReasonDialog - This class inherits from the DropReasonDialog. There
                         are many similarities between the two classes which
                         naturally lead to inheritance. This class handles the
                         operation of cancelling a meeting.  It checks necessary
                         conditions such as the restriction that the user must
                         be the owner of the meeting to perform the operation.
                         
20. MeetingDialog - This class handle the operation of creating a new meeting.
                    allows for manual scheduling as well as automatic
                    scheduling.  This is fairly large class that contains many
                    panels.

21. ViewMeetingDialog - This class is derived from the MeetingDialog class due
                        to its many similarities.  This class basically adds a 
                        few restrictions to prevent the a user from editting the
                        fields until permission is granted.

22. ModMeetingDialog - This class inherits from the ViewMeetingDialog class. 
                       Since the former class is really just like the latter
                       class with all fields made editable, it lead quite
                       naturally to a subclass relationship.                                               

Panel Classes
-------------
23. AttendeesPanel - This class retrieves the userlist from the calendar server,
                     and also handles error messages by generating a 
                     user-friendly notice window.
                     
24. AutoPanel - This panel contains the layout for the autoscheduling feature.

25. CalendarBox - This panel contains the month view of the calendar.

26. DaysOfWeek - This panel determines the days for the week and handles action
                 input from mouse focus events.

27. DescriptionPanel - This panel allows the user to enter a description for a
                       new or existing meeting. It also handles proper
                       formatting by escaping special characters such as the
                       comma, as required by the PROTOCOL.
                       
28. DonePanel - This panel contains buttons for submission, cancelation, and
                help request.  It listens for action events and then makes
                function calls to other panels with its group to obtain data in
                their fields.
                
29. LocationPanel - This panel handles the task of obtaining the user list from
                    the calendar server, parsing it, and displaying the list.

30. MailboxPanel - This panel contains the mailbox to receive notifications from
                   the server.
                   
31. ManualPanel - This panel is used to input data for manual scheduling.
                  It enforces data integrity by performing error-checking
                  on-the-fly. It also calculates duration time on-the-fly as
                  well.
                  
32. ModViewPanel - The panel is panel is used to display buttons for meeting
                   deletion and modification.
                   
33. TimePanel - This panel obtains the system time and displays it on the client
                using Java's multithreading abilities.

34. WeekPanel - This panel displays the week view.  It handles button clicks
                within its region and creates the appropriate requester windows
                such as input requests or viewing information.

35. YYmmddPanel - This panel displays the year, month, and day. It enforces
                  appropriate value restricts on-the-fly.
                  
36. DurationPanel - This panel displays the duration of a meeting. It can
                    perform the calculation in real time, always providing the
                    correct duration time.

37. TemporalPanel - This panel herits from the DurationPanel class due to its
                    many similarities. Both require range and type restrictions
                    in the hour and minute fields. There is only one additional
                    element that the TemporalPanel provides , that is AM/PM
                    status.


README -- A hack
================

Due to the inherent restrictions of group 18's server, we had to find a solution
to a problem we discover with the server.

It can not handle personal events (meetings with only yourself e.g. lunch
breaks). Meetings must be scheduled with at least one other person.

To remove such a restriction we have implemented the following solution.
For every user that is created, an equilavent shadow user is added. We use this
shadow user to trick the calendar server into accepting personal events.

Here is the method in more detail.
When a user such as smith is added, the client program automatically adds the 
user 'smith_personal' as well. When the user then schedules a meeting with no 
attendees, the shadow user is invisibly added as an attendee (behind the
scenes). The server then accepts this request as a valid one. 

The client program has been implemented to account for various other side
effects due to this "hack".  The attendees list will filter out all usernames
ending in _personal.  Scheduled meetings which contain the shawdow as the
attendee as automatically assumed to be "--confirmed--".


