package caltool.view.schedule; import caltool.model.schedule.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; /**** * * Class ListmeetingTimesButtonListener defines the action listener that is * attached to the `List Times' button in the schedule meeting dialog. The * actionPerformed method displays a possible meetings times dialog, which in * turn invokes the Schedule.listPossibleTimes model method. * */ public class ListMeetingTimesButtonListener implements ActionListener { /** * Construct this with the given Schedule model and parent dialog view. * Access to the model is for calling its ScheduleAppointment method. * Access to the parent view is for gathering date to be sent to Schedule. * ScheduleAppointment. */ public ListMeetingTimesButtonListener(Schedule schedule, ScheduleAppointmentDialog dialog) { this.schedule = schedule; this.dialog = dialog; } /** * Respond to a press of the OK button by calling ScheduleAppointment with * a new Appointment. The Appointment data are gathered from the * JTextFields and other input fields in the parent dialog. */ public void actionPerformed(ActionEvent e) { System.out.println( "In ListMeetingTimesButtonListener.actionPerformed."); } /** The companion model */ protected Schedule schedule; /** The parent view */ protected ScheduleAppointmentDialog dialog; }