caltool.schedule_ui
Class ScheduleTaskDialog

java.lang.Object
  extended by mvp.View
      extended by caltool.caltool_ui.CalendarToolWindow
          extended by caltool.schedule_ui.ScheduleAppointmentDialog
              extended by caltool.schedule_ui.ScheduleTaskDialog
All Implemented Interfaces:
java.io.Serializable, java.util.Observer
Direct Known Subclasses:
TaskEditor

public class ScheduleTaskDialog
extends ScheduleAppointmentDialog

Class ScheduleTaskDialog provides a view of Task as an input to the scheduleTask method. Hence, the dialog is a view of both an Task object as well as the scheduleTask method. The data-entry components of the dialog constitute the Task view. The 'OK' button is the view of the scheduleTask method.

For expedience, ScheduleTaskDialog extends ScheduleAppointmentDialog. Appointment and task dialogs have a significant amount of structure in common, though there are some key differences that require specialiation here. The additional design comments in the definition of ScheduleAppointmentDialog are generally relevant here.

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
ScheduleTaskDialog(mvp.Screen screen, Schedule schedule, CalendarToolUI calToolUI)
          Construct this with the given Schedule as companion model.
 
Method Summary
protected  void clear()
          Clear each of the text fields of this to empty.
 java.awt.Component compose()
          Compose this in six parts: (1) a top part consisting of the title, date, end date, due time, and duration components; (2) a part consisting of recurring info components; (3) a middle part with category, 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.
protected  javax.swing.Box composeEndDateRow()
          Compose the end date row as a label/textField pair.
protected  javax.swing.Box composeMiddlePart()
          Compose the middle part of the dialog, consisting of the category, location, security, and priority.
protected  javax.swing.Box composePriorityRow()
          Compose the priority row using two pairs of labels and text fields.
protected  javax.swing.Box composeStartDateRow()
          Compose the start date row using two pairs of labels and text fields.
 
Methods inherited from class caltool.schedule_ui.ScheduleAppointmentDialog
composeCategorySecurityRow, composeDetails, composeLocationPriorityRow, composeRecurringInfo, composeRemindInfo, composeRows, 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, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduleTaskDialog

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

Method Detail

compose

public java.awt.Component compose()
Compose this in six parts: (1) a top part consisting of the title, date, end date, due time, and duration components; (2) a part consisting of recurring info components; (3) a middle part with category, 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

composeStartDateRow

protected javax.swing.Box composeStartDateRow()
Compose the start date row using two pairs of labels and text fields.

Overrides:
composeStartDateRow in class ScheduleAppointmentDialog

composeEndDateRow

protected javax.swing.Box composeEndDateRow()
Compose the end date row as a label/textField pair.

Overrides:
composeEndDateRow in class ScheduleAppointmentDialog

composeMiddlePart

protected javax.swing.Box composeMiddlePart()
Compose the middle part of the dialog, consisting of the category, location, security, and priority. The category and security are combo boxes, laid out in a horizontal box. Location and priority are also combo boxes in a horizontal box. Location is editable. See the description of composeTopPart for a more detailed description of component layout.

Overrides:
composeMiddlePart in class ScheduleAppointmentDialog

composePriorityRow

protected javax.swing.Box composePriorityRow()
Compose the priority row using two pairs of labels and text fields.


composeButtonRow

protected javax.swing.Box composeButtonRow()
Compose the buttons row with three JButtons. The action listeners for Clear and Cancel buttons are straightforward. The action listener for the OK button is responsible for communication with the Schedule model. See the description of OKScheduleTaskButtonListener for explanatory details.

Overrides:
composeButtonRow in class ScheduleAppointmentDialog

clear

protected void clear()
Clear each of the text fields of this to empty. Reset the combo boxes to no selection. NOTE: This method needs to be refined to use default values for clearing, once options and defaults functionality is implemented. It also needs to be refined to clear the recurring and remind check boxes and associated components.

Overrides:
clear in class ScheduleAppointmentDialog