|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Widget org.eclipse.swt.widgets.Control org.eclipse.swt.widgets.Scrollable org.eclipse.swt.widgets.Composite speedscheduler.DayOfWeekComposite
class DayOfWeekComposite
A widget that draws checkboxes for each day of the week and provides accessor methods for fetching user input.
Field Summary | |
---|---|
private boolean[] |
selectedDays
Stores which days have been selected with the widget. |
Fields inherited from class org.eclipse.swt.widgets.Control |
---|
handle |
Constructor Summary | |
---|---|
DayOfWeekComposite(org.eclipse.swt.widgets.Composite parent)
Creates a new DayOfWeekChooser using the style of the specified parent. |
|
DayOfWeekComposite(org.eclipse.swt.widgets.Composite parent,
boolean[] defaultSelectedDays)
Creates a new DayOfWeekChooser given the specified parent Composite and style. |
Method Summary | |
---|---|
private org.eclipse.swt.widgets.Button |
createDayOfWeekCheckbox(int dayOfWeek)
Factory to crank out a checkbox for a day of the week, complete with text and a listener that calls handleDayOfWeekClick() on clicks. |
private void |
dumpSelectedDays()
Prints to stderr the status for each day (whether selected or not) |
protected boolean[] |
getSelectedDays()
Get the selected days array. |
private void |
handleDayOfWeekClick(org.eclipse.swt.widgets.Button buttonClicked,
int dayOfWeek)
When a day-of-week checkbox is clicked. |
private void |
initializeSelectedDays(boolean[] defaultSelectedDays)
Initializes all days to false or to the specified defaults. |
protected boolean |
isDaySelected(int dayOfWeek)
Gets whether a day is selected by day index. |
private void |
setDaySelected(int dayOfWeek,
boolean selected)
Wrapper access to selectedDays array. |
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 |
---|
private boolean[] selectedDays
Constructor Detail |
---|
public DayOfWeekComposite(org.eclipse.swt.widgets.Composite parent)
public DayOfWeekComposite(org.eclipse.swt.widgets.Composite parent, boolean[] defaultSelectedDays)
Method Detail |
---|
private org.eclipse.swt.widgets.Button createDayOfWeekCheckbox(int dayOfWeek)
dayOfWeek
- The day of the week index from 0 to TimeUtils.WEEK_LEN-1.
private void handleDayOfWeekClick(org.eclipse.swt.widgets.Button buttonClicked, int dayOfWeek)
private void setDaySelected(int dayOfWeek, boolean selected)
private void initializeSelectedDays(boolean[] defaultSelectedDays)
protected boolean isDaySelected(int dayOfWeek)
dayOfWeek
- Valid range is from 0 to TimeUtils.WEEK_LEN-1, where 0 represents
the first day of the week (typically Sunday) and TimeUtils.WEEK_LEN-1 (typically
6, ie Saturday) represents the last day of the week.
protected boolean[] getSelectedDays()
private void dumpSelectedDays()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |