com.tiff.common.ui.datepicker
Class DatePicker
java.lang.Object
Composite
com.tiff.common.ui.datepicker.DatePicker
public class DatePicker
- extends Composite
The date picker panel
changes by sebthom ~ renamed private method doubleClick to onMouseDoubleClick ~ renamed private
method dateSelected to onDateSelected ~ removed StringBuffer usage in getCurrentMonthName method
- corrected firstDayOfTheWeek bug (26.06.2004) ~ setDate will throw the Selection event + you can
use setDate(null) to clear the selection, the calendar will display the current date, but getDate
will return null until the user explicitely selects a date from the control
changes by Daniel Lutz ~ DatePanel.onPaint(): draw currently selected day/date
in respect to selectedDate instead of interally selected day of month
- Version:
- $Revision: 1.2 $
- Author:
- Andrey Onistchuk
Constructor Summary |
DatePicker(Composite parent,
int style)
|
Method Summary |
void |
addSelectionListener(SelectionListener listener)
Adds the listener to receive events. |
Point |
computeSize(int wHint,
int hHint,
boolean changed)
|
java.util.Date |
getDate()
gets the currently selected date |
void |
removeSelectionListener(SelectionListener listener)
Removes the listener. |
void |
reset()
resets the date picker's date to today |
void |
setDate(java.util.Date date)
sets the date |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatePicker
public DatePicker(Composite parent,
int style)
addSelectionListener
public void addSelectionListener(SelectionListener listener)
- Adds the listener to receive events.
- Parameters:
listener
- the listener
- Throws:
SWTError
- (ERROR_THREAD_INVALID_ACCESS) when called from the wrong thread
SWTError
- (ERROR_WIDGET_DISPOSED) when the widget has been disposed
SWTError
- (ERROR_NULL_ARGUMENT) when listener is null- See Also:
SelectionListener
,
removeSelectionListener(SelectionListener)
computeSize
public Point computeSize(int wHint,
int hHint,
boolean changed)
getDate
public java.util.Date getDate()
- gets the currently selected date
removeSelectionListener
public void removeSelectionListener(SelectionListener listener)
- Removes the listener.
- Parameters:
listener
- the listener
- Throws:
SWTError
- (ERROR_THREAD_INVALID_ACCESS) when called from the wrong thread
SWTError
- (ERROR_WIDGET_DISPOSED) when the widget has been disposed
SWTError
- (ERROR_NULL_ARGUMENT) when listener is null- See Also:
SelectionListener
,
addSelectionListener(SelectionListener)
reset
public void reset()
- resets the date picker's date to today
setDate
public void setDate(java.util.Date date)
- sets the date
- Parameters:
date
-
Copyright 2005-2011 by Gerry Weirich, Elexis