|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmvp.View
caltool.caltool_ui.CalendarToolWindow
caltool.schedule_ui.ScheduleAppointmentDialog
public class ScheduleAppointmentDialog
Class ScheduleAppointmentDialog provides a view of Appointment as an input to the scheduleAppointment method. Hence, the dialog is a view of both an Appointment object as well as the scheduleAppointment method. The data-entry components of the dialog constitute the Appointment view. The 'OK' button is the view of the ScheduleAppointment method.
The data components consist of JLabels, JTextFields, JComboBoxes, JCheckBoxes, and a JTextArea. The 'OK', 'Clear', and 'Cancel' buttons are JButtons. The description of the compose method has details of how the components are laid out in the dialog window.
For organizational clarity, two of the rows in the ScheduleAppointment Dialog are defined in separate classes. These are the RecurringInfoSubdialog and RemindInfoSubdialog classes.
The companion model for ScheduleAppointmentDialog is the Schedule class, since Schedule has the method that is invoked from the 'OK' button action listener. See class OKScheduleAppointmentButtonListener for details of how the Schedule.scheduleAppointment method is invoked.
Field Summary | |
---|---|
protected javax.swing.JComboBox |
categoryComboBox
The category combo box |
protected javax.swing.JTextArea |
detailsTextArea
The details text area |
protected javax.swing.JTextField |
durationTextField
The start time text field |
protected javax.swing.JLabel |
endDateLabel
The end date label. |
protected javax.swing.JTextField |
endDateTextField
The end date text field |
protected javax.swing.JComboBox |
locationComboBox
The location combo box |
protected double |
maxComponentHeight
The max height of a text field or combobox; this is necessary since these components stretch when the outer frame is resized, and look very funky when they do |
protected int |
maxComponentWidth
The max width of any component; this is only necessary because the max height cannot be set separately, so we must pick some max width. |
protected javax.swing.JPanel |
panel
The background panel of this |
protected javax.swing.JComboBox |
priorityComboBox
The priority combo box |
protected RecurringInfoSubdialog |
recurringInfo
Subview for recurring info |
protected RemindInfoSubdialog |
remindInfo
Subview for recurring info |
protected javax.swing.JComboBox |
securityComboBox
The security combo box |
protected javax.swing.JLabel |
startDateLabel
The (start) date label. |
protected javax.swing.JTextField |
startDateTextField
The (start) date text field |
protected javax.swing.JTextField |
startTimeTextField
The start time text field. |
protected javax.swing.JTextField |
titleTextField
The title text field |
Fields inherited from class caltool.caltool_ui.CalendarToolWindow |
---|
calToolUI |
Fields inherited from class mvp.View |
---|
closeAdapter, editable, model, screen, shown, widget, window |
Constructor Summary | |
---|---|
ScheduleAppointmentDialog(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, 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. |
protected javax.swing.Box |
composeCategorySecurityRow()
Compose the category/seurity row using two pairs of labels and text fields. |
protected javax.swing.Box |
composeDetails()
Compose the details area as a labeled, scrolling text area. |
protected javax.swing.Box |
composeEndDateRow()
Compose the end date row using two pairs of labels and text fields. |
protected javax.swing.Box |
composeLocationPriorityRow()
Compose the location/priority row using two pairs of labels and text fields. |
protected javax.swing.Box |
composeMiddlePart()
Compose the middle part of the dialog, consisting of the category, location, security, and priority. |
protected java.awt.Component |
composeRecurringInfo()
Have the recurring info subdialog compose itself. |
protected java.awt.Component |
composeRemindInfo()
Have the remind info subdialog compose itself. |
protected void |
composeRows()
Compose each of the rows and add to the vertically laid out panel. |
protected javax.swing.Box |
composeStartDateRow()
Compose the start date row using two pairs of labels and text fields. |
protected javax.swing.Box |
composeTitleRow()
Compose the title row as an hbox with label and text field. |
protected javax.swing.Box |
composeTopPart()
Compose the top part of the dialog, consisting of the title, date, start time, end date, and duration. |
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 |
Field Detail |
---|
protected javax.swing.JPanel panel
protected javax.swing.JTextField titleTextField
protected javax.swing.JLabel startDateLabel
protected javax.swing.JTextField startDateTextField
protected javax.swing.JTextField startTimeTextField
protected javax.swing.JLabel endDateLabel
protected javax.swing.JTextField endDateTextField
protected javax.swing.JTextField durationTextField
protected RecurringInfoSubdialog recurringInfo
protected javax.swing.JComboBox categoryComboBox
protected javax.swing.JComboBox securityComboBox
protected javax.swing.JComboBox locationComboBox
protected javax.swing.JComboBox priorityComboBox
protected RemindInfoSubdialog remindInfo
protected javax.swing.JTextArea detailsTextArea
protected final double maxComponentHeight
protected final int maxComponentWidth
Constructor Detail |
---|
public ScheduleAppointmentDialog(mvp.Screen screen, Schedule schedule, CalendarToolUI calToolUI)
Method Detail |
---|
public java.awt.Component compose()
compose
in class mvp.View
protected void composeRows()
protected javax.swing.Box composeTopPart()
protected javax.swing.Box composeTitleRow()
protected javax.swing.Box composeStartDateRow()
protected javax.swing.Box composeEndDateRow()
protected java.awt.Component composeRecurringInfo()
protected javax.swing.Box composeMiddlePart()
protected javax.swing.Box composeCategorySecurityRow()
protected javax.swing.Box composeLocationPriorityRow()
protected java.awt.Component composeRemindInfo()
protected javax.swing.Box composeDetails()
protected javax.swing.Box composeButtonRow()
protected void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |