eu.geclipse.ui.widgets
Class DateTimeText
java.lang.Object
eu.geclipse.ui.widgets.DateTimeText
public class DateTimeText
- extends java.lang.Object
Widgets, which allow to edit date and time
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateTimeText
public DateTimeText(Composite parent,
DateTimeText.Style style,
boolean allowEmpty)
- Parameters:
parent - style - allowEmpty - if false, then getDate() throw an exception for empty date
setDate
public void setDate(java.util.Date date)
- Parameters:
date - date which will be shown in widget
getDate
public java.util.Date getDate()
throws ProblemException
- Returns:
- Date entered in control, or null if allowEmpty is true and entered date is empty
- Throws:
ProblemException - thrown when user entered date in wrong format- See Also:
ProblemDialog.openProblem(Shell, String, String, Throwable)
getValidDateFormat
public java.lang.String getValidDateFormat()
- Returns:
- String containing format in which date should be entered.
getShell
public Shell getShell()
- Returns:
- shell, on which control is placed
openCalendarDialog
public void openCalendarDialog()
- Opens popup dialog with calendar to easy selecting date and time
setEnabled
public void setEnabled(boolean enabled)
- Parameters:
enabled - true if widget should allow editing, false if should work in readonly mode
setFocus
public boolean setFocus()
- Returns:
- @see org.eclipse.swt.widgets.Text#setFocus()