speedscheduler
Class ScheduleEditComposite

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by speedscheduler.ScheduleEditComposite
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class ScheduleEditComposite
extends org.eclipse.swt.widgets.Composite

Displays a UI for editing a Schedule. Embed this Composite in your UI to edit a Schedule.


Field Summary
private  DayOfWeekComposite dayOfWeekComposite
           
private  HourSpanComposite hourSpanComposite
           
private  TransferConfigurationComposite transferConfigComposite
           
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
ScheduleEditComposite(org.eclipse.swt.widgets.Composite parent)
          Shows a Schedule with default values populated initially.
ScheduleEditComposite(org.eclipse.swt.widgets.Composite parent, int style, Schedule editSchedule)
           
 
Method Summary
 boolean checkHours()
          Checks that the hours selected are sane (ie, the start hour is earlier than the end hour, and there are more than 0 hours selected).
 Schedule getSchedule()
          Gets the Schedule as specified by the user.
 boolean noDaysSelected()
          Checks the day selection for sanity.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

transferConfigComposite

private TransferConfigurationComposite transferConfigComposite

dayOfWeekComposite

private DayOfWeekComposite dayOfWeekComposite

hourSpanComposite

private HourSpanComposite hourSpanComposite
Constructor Detail

ScheduleEditComposite

public ScheduleEditComposite(org.eclipse.swt.widgets.Composite parent,
                             int style,
                             Schedule editSchedule)

ScheduleEditComposite

public ScheduleEditComposite(org.eclipse.swt.widgets.Composite parent)
Shows a Schedule with default values populated initially.

Parameters:
parent -
Method Detail

getSchedule

public Schedule getSchedule()
Gets the Schedule as specified by the user.

Returns:

checkHours

public boolean checkHours()
Checks that the hours selected are sane (ie, the start hour is earlier than the end hour, and there are more than 0 hours selected).

Returns:
True if hours chosen by the user are sane, false otherwise.

noDaysSelected

public boolean noDaysSelected()
Checks the day selection for sanity. If there are no days selected, returns true, false otherwise.

Returns:
True if the user hasn't selected any days, false if they have (false is good).