caltool.view_ui
Class AppointmentEditor

java.lang.Object
  extended by mvp.View
      extended by caltool.caltool_ui.CalendarToolWindow
          extended by caltool.schedule_ui.ScheduleAppointmentDialog
              extended by caltool.view_ui.AppointmentEditor
All Implemented Interfaces:
java.io.Serializable, java.util.Observer

public class AppointmentEditor
extends ScheduleAppointmentDialog

Class AppointmentEditor specializes ScheduleAppointmentDialog to provide editing access to scheduled appointments. An appointment editor has the same data fields as the scheduling dialog. The editor display differs from the scheduling dialog as follows:

  1. there is a time and date summary in the editor, just below the window banner;
  2. the command buttons at the bottom of the item display are different than in the scheduling dialog.
Left and right arrow buttons at the top of the display are used to view the previous and next scheduled item. The most important difference between the editor the scheduling dialog are the command buttons along the bottom of the display window. Specifically, the scheduling dialog has `OK', `Clear', and `Cancel' buttons, whereas the editor has `Change', `Delete', and `Clear'.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class caltool.schedule_ui.ScheduleAppointmentDialog
categoryComboBox, detailsTextArea, durationTextField, endDateLabel, endDateTextField, locationComboBox, maxComponentHeight, maxComponentWidth, panel, priorityComboBox, recurringInfo, remindInfo, securityComboBox, startDateLabel, startDateTextField, startTimeTextField, titleTextField
 
Fields inherited from class caltool.caltool_ui.CalendarToolWindow
calToolUI
 
Fields inherited from class mvp.View
closeAdapter, editable, model, screen, shown, widget, window
 
Constructor Summary
AppointmentEditor(mvp.Screen screen, Schedule schedule, CalendarToolUI calToolUI)
          Construct this with the given Schedule as companion model.
 
Method Summary
 java.awt.Component compose()
          Compose this in six parts: (1) a top part consisting of the title, date, end date, start time, and duration components; (2) a part consisting of recurring info components; (3) a middle part with category, location, security, and priority; (4) reminder info components; (5) details components; (6) the bottom row consisting of the 'OK', 'Clear', and 'Cancel' buttons.
protected  javax.swing.Box composeButtonRow()
          Compose the buttons row with three JButtons, a la the parent version of this method, q.v.
protected  javax.swing.JPanel composeDateSummary()
          Compose the date summary row consisting of a three-button group on the left and a date string in the center.
protected  void composeRows()
          Stick in the date summary row at the top of main panel, then call the parent composeRows.
 void update(java.util.Observable o, java.lang.Object arg)
          Display the model data for the currently selected appointment.
 
Methods inherited from class caltool.schedule_ui.ScheduleAppointmentDialog
clear, composeCategorySecurityRow, composeDetails, composeEndDateRow, composeLocationPriorityRow, composeMiddlePart, composeRecurringInfo, composeRemindInfo, composeStartDateRow, composeTitleRow, composeTopPart
 
Methods inherited from class caltool.caltool_ui.CalendarToolWindow
show
 
Methods inherited from class mvp.View
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setExitOnClose, setModel, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppointmentEditor

public AppointmentEditor(mvp.Screen screen,
                         Schedule schedule,
                         CalendarToolUI calToolUI)
Construct this with the given Schedule as companion model.

Method Detail

compose

public java.awt.Component compose()
Description copied from class: ScheduleAppointmentDialog
Compose this in six parts: (1) a top part consisting of the title, date, end date, start time, and duration components; (2) a part consisting of recurring info components; (3) a middle part with category, location, security, and priority; (4) reminder info components; (5) details components; (6) the bottom row consisting of the 'OK', 'Clear', and 'Cancel' buttons.

Overrides:
compose in class ScheduleAppointmentDialog

composeRows

protected void composeRows()
Stick in the date summary row at the top of main panel, then call the parent composeRows. It will do everything as in the scheduling dialog, except it will call this' specialized version of composeButtonRow.

Overrides:
composeRows in class ScheduleAppointmentDialog

composeDateSummary

protected javax.swing.JPanel composeDateSummary()
Compose the date summary row consisting of a three-button group on the left and a date string in the center. The button group has a left-pointing previous arrow, a `Today' button, and a right-pointing next arrow. The date string is the complete time and date of the scheduled appointment.

This particular layout is accomplished with an outer JPanel with an overlay layout, containing two hboxes with left- and center-alignments. This allows two different horizontal layouts to appear in the same horizontal row of the display.


composeButtonRow

protected javax.swing.Box composeButtonRow()
Compose the buttons row with three JButtons, a la the parent version of this method, q.v.

Overrides:
composeButtonRow in class ScheduleAppointmentDialog

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Display the model data for the currently selected appointment. This method is only invoked if the current selected item is in fact an appointment. The appointment is sent in the second arg. See the ItemEditor for the details of how this method is invoked.

Specified by:
update in interface java.util.Observer
Overrides:
update in class mvp.View