Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## semorg.gui.util
Class CalendarControl.SWTCalendar

    java.lang.Object
      org.eclipse.swt.widgets.Widget
          org.eclipse.swt.widgets.Control
              org.eclipse.swt.widgets.Scrollable
                  org.eclipse.swt.widgets.Composite
                      semorg.gui.util.CalendarControl.SWTCalendar

All Implemented Interfaces:
  org.eclipse.swt.graphics.Drawable

Enclosing class:
  CalendarControl

    private class CalendarControl.SWTCalendar

extends org.eclipse.swt.widgets.Composite

This class provides the calendar of the control.

Field Summary
`private CalendarControl.SWTDayChooser` | `dayChooser` The day chooser.
`private CalendarControl.SWTMonthChooser` | `monthChooser` The month chooser.
`static int` | `RED_SUNDAY` Style constant for making Sundays red.
`static int` | `RED_WEEKEND` Style constant for making weekends red.
`private boolean` | `settingDate` `true` if the date gets actual set, `false` otherwise.
`private boolean` | `settingYearMonth` The setting year month.
`private org.eclipse.swt.widgets.Spinner` | `yearChooser` The year chooser.

Fields inherited from class org.eclipse.swt.widgets.Control
`handle`

Constructor Summary
`CalendarControl.SWTCalendar(org.eclipse.swt.widgets.Composite parent)` Instantiates a new SWT calendar.
`CalendarControl.SWTCalendar(org.eclipse.swt.widgets.Composite parent, int style)` Constructs a calendar control.

Method Summary
`void` | `addMouseListener(org.eclipse.swt.events.MouseListener listener)` Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in the `MouseListener` interface.
`void` | `addSWTCalendarListener(CalendarControl.SWTCalendarListener listener)` Adds the SWT calendar listener.
`Calendar` | `getCalendar()` Gets the calendar.
`boolean` | `isSettingDate()` Checks if the control is setting the date.
`void` | `nextMonth()` Next month.
`void` | `previousMonth()` Previous month.
`private void` | `refreshYearMonth(Calendar cal)` Refresh year month.
`void` | `removeMouseListener(org.eclipse.swt.events.MouseListener listener)` Removes the listener from the collection of listeners who will be notified when mouse buttons are pressed and released.
`void` | `removeSWTCalendarListener(CalendarControl.SWTCalendarListener listener)` Removes the SWT calendar listener.
`void` | `setCalendar(Calendar cal)` Sets the calendar.
`void` | `setFont(org.eclipse.swt.graphics.Font font)` Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.
`void` | `setLocale(Locale locale)` Sets the locale.

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, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, 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, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, 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

### RED_SUNDAY

    public static final int RED_SUNDAY

  Style constant for making Sundays red.

  See Also:
    Constant Field Values

### RED_WEEKEND

    public static final int RED_WEEKEND

  Style constant for making weekends red.

  See Also:
    Constant Field Values

### settingDate

    private boolean settingDate

  `true` if the date gets actual set, `false` otherwise.

### yearChooser

    private org.eclipse.swt.widgets.Spinner yearChooser

  The year chooser.

### monthChooser

    private CalendarControl.SWTMonthChooser monthChooser

  The month chooser.

### dayChooser

    private CalendarControl.SWTDayChooser dayChooser

  The day chooser.

### settingYearMonth

    private boolean settingYearMonth

  The setting year month.

Constructor Detail

### CalendarControl.SWTCalendar

    public CalendarControl.SWTCalendar(org.eclipse.swt.widgets.Composite parent,
                                       int style)

  Constructs a calendar control.

  Parameters:
    `parent` - a parent container.
    `style` - FLAT to make the buttons flat, or NONE.

### CalendarControl.SWTCalendar

    public CalendarControl.SWTCalendar(org.eclipse.swt.widgets.Composite parent)

  Instantiates a new SWT calendar.

  Parameters:
    `parent` - the parent

Method Detail

### setCalendar

    public void setCalendar(Calendar cal)

  Sets the calendar.

  Parameters:
    `cal` - the new calendar

### refreshYearMonth

    private void refreshYearMonth(Calendar cal)

  Refresh year month.

  Parameters:
    `cal` - the cal

### nextMonth

    public void nextMonth()

  Next month.

### previousMonth

    public void previousMonth()

  Previous month.

### getCalendar

    public Calendar getCalendar()

  Gets the calendar.

  Returns:
    the calendar

### addSWTCalendarListener

    public void addSWTCalendarListener(CalendarControl.SWTCalendarListener listener)

  Adds the SWT calendar listener.

  Parameters:
    `listener` - the listener

### removeSWTCalendarListener

    public void removeSWTCalendarListener(CalendarControl.SWTCalendarListener listener)

  Removes the SWT calendar listener.

  Parameters:
    `listener` - the listener

### setLocale

    public void setLocale(Locale locale)

  Sets the locale.

  Parameters:
    `locale` - the new locale

### setFont

    public void setFont(org.eclipse.swt.graphics.Font font)

  Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.

  Overrides:
    `setFont` in class `org.eclipse.swt.widgets.Control`
  Parameters:
    `font` - the new font (or null)
  See Also:
    `Control.setFont(org.eclipse.swt.graphics.Font)`

### isSettingDate

    public boolean isSettingDate()

  Checks if the control is setting the date.

  Returns:
    `true`, if is setting date, `false` otherwise.

### addMouseListener

    public void addMouseListener(org.eclipse.swt.events.MouseListener listener)

  Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in the `MouseListener` interface.

  Overrides:
    `addMouseListener` in class `org.eclipse.swt.widgets.Control`
  Parameters:
    `listener` - the listener which should be notified
  See Also:
    `Control.addMouseListener(org.eclipse.swt.events.MouseListener)`

### removeMouseListener

    public void removeMouseListener(org.eclipse.swt.events.MouseListener listener)

  Removes the listener from the collection of listeners who will be notified when mouse buttons are pressed and released.

  Overrides:
    `removeMouseListener` in class `org.eclipse.swt.widgets.Control`
  Parameters:
    `listener` - the listener which should no longer be notified
  See Also:
    `Control.removeMouseListener(org.eclipse.swt.events.MouseListener)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD