speedscheduler
Class ScheduleEditDialog

java.lang.Object
  extended by org.eclipse.swt.widgets.Dialog
      extended by speedscheduler.ScheduleEditDialog

public class ScheduleEditDialog
extends org.eclipse.swt.widgets.Dialog

Dialog which allows the user to select a set of days of the week, an hour span, and corresponding transfer configuration. To use the dialog, do this: ScheduleSelectionDialog dialog = new ScheduleSelectionDialog( shell ); Schedule userSelectedSchedule = dialog.open(); System.out.println( "User selected: " + userSelectedSchedule.toString() ); Note that the returned Schedule will be null if the user selects cancel or closes the dialog without clicking Ok.

See Also:
Schedule

Field Summary
private  org.eclipse.swt.graphics.Image clockImage
           
private  org.eclipse.swt.widgets.Display display
           
private static int MARGIN_HEIGHT
           
private static int MARGIN_WIDTH
           
private  org.eclipse.swt.widgets.Shell parent
           
private  Schedule returnSchedule
           
private  ScheduleEditComposite scheduleEditComposite
           
private  org.eclipse.swt.widgets.Shell shell
           
private  org.eclipse.swt.graphics.Color white
           
 
Constructor Summary
ScheduleEditDialog(org.eclipse.swt.widgets.Shell parent)
          Creates a new ScheduleSelectionDialog window.
ScheduleEditDialog(org.eclipse.swt.widgets.Shell parent, int style, Schedule editSchedule)
          Creates a new ScheduleSelectionDialog window.
ScheduleEditDialog(org.eclipse.swt.widgets.Shell parent, Schedule editSchedule)
           
 
Method Summary
private  void errorMessageBox(java.lang.String msg)
           
 Schedule open()
          Displays the dialog and returns after the user has selected their schedule.
 
Methods inherited from class org.eclipse.swt.widgets.Dialog
checkSubclass, getParent, getStyle, getText, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scheduleEditComposite

private ScheduleEditComposite scheduleEditComposite

returnSchedule

private Schedule returnSchedule

white

private org.eclipse.swt.graphics.Color white

MARGIN_WIDTH

private static final int MARGIN_WIDTH
See Also:
Constant Field Values

MARGIN_HEIGHT

private static final int MARGIN_HEIGHT
See Also:
Constant Field Values

clockImage

private org.eclipse.swt.graphics.Image clockImage

shell

private org.eclipse.swt.widgets.Shell shell

display

private org.eclipse.swt.widgets.Display display

parent

private org.eclipse.swt.widgets.Shell parent
Constructor Detail

ScheduleEditDialog

public ScheduleEditDialog(org.eclipse.swt.widgets.Shell parent,
                          int style,
                          Schedule editSchedule)
Creates a new ScheduleSelectionDialog window. Use open() to show the window and get the user-inputted schedule.


ScheduleEditDialog

public ScheduleEditDialog(org.eclipse.swt.widgets.Shell parent)
Creates a new ScheduleSelectionDialog window. Use open() to show the window and get the user-inputted schedule.


ScheduleEditDialog

public ScheduleEditDialog(org.eclipse.swt.widgets.Shell parent,
                          Schedule editSchedule)
Method Detail

open

public Schedule open()
Displays the dialog and returns after the user has selected their schedule. The schedule is returned.

Returns:
The user-selected schedule.

errorMessageBox

private void errorMessageBox(java.lang.String msg)