|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DateModel
A model that is used by DateChooser component.
Method Summary | |
---|---|
void |
addDateModelListener(DateModelListener l)
Adds DateModelListener. |
Calendar |
createCalendarInstance()
Creates the calendar instance. |
boolean |
dayInRange(Calendar calendar)
Checks if the day is in allowed range, which means if the date is no later than the maximum date and no earlier than the minimum date not comparing the time within a day. |
DateFormat |
getDateFormat()
Gets the date format. |
Calendar |
getMaxDate()
Gets the maximum date allowed. |
Calendar |
getMinDate()
Gets the minimum date allowed. |
String |
getTimeFormat()
Gets the time format used by time spinner when time is displayed. |
TimeZone |
getTimeZone()
Gets the time zone. |
boolean |
isCompareTime()
Get the flag indicating if the time should be compared as well while isValidDate(java.util.Calendar) is invoked. |
boolean |
isValidDate(Calendar calendar)
Checks if the date specified in calendar is a valid date. |
boolean |
monthInRange(Calendar calendar)
Checks if the month is in allowed range, which means if the date is no later than the maximum date and no earlier than the minimum date. |
void |
removeDateModelListener(DateModelListener l)
Removes the DateModelListener. |
void |
setCompareTime(boolean compareTime)
Set the flag indicating if the time should be compared as well while isValidDate(java.util.Calendar) is invoked. |
void |
setDateFormat(DateFormat dateFormat)
Sets the date format. |
void |
setMaxDate(Calendar maxDate)
Sets the maximum date. |
void |
setMinDate(Calendar minDate)
Sets the minimum date. |
void |
setTimeFormat(String timeFormat)
Sets the time format used by time spinner when time is displayed. |
void |
setTimeZone(TimeZone timeZone)
Sets the time zone. |
boolean |
timeInRange(Calendar calendar)
Checks if the day is in allowed range, which means if the date is no later than the maximum date and no earlier than the minimum date including comparing the time within a day. |
boolean |
yearInRange(Calendar calendar)
Checks if the year is in allowed range, which means if the date is no later than the maximum date and no earlier than the minimum date. |
Method Detail |
---|
Calendar getMinDate()
Calendar getMaxDate()
void setMaxDate(Calendar maxDate)
maxDate
- the maximum date.void setMinDate(Calendar minDate)
minDate
- the minimum date.boolean timeInRange(Calendar calendar)
calendar
- date to be checked.
boolean dayInRange(Calendar calendar)
calendar
- date to be checked.
boolean monthInRange(Calendar calendar)
calendar
- month to be checked.
boolean yearInRange(Calendar calendar)
calendar
- year to be checked.
boolean isValidDate(Calendar calendar)
DefaultDateModel
, a
date has to be in the range first then meets all the filter criteria set to the model to be valid.
calendar
- date to be checked.
String getTimeFormat()
void setTimeFormat(String timeFormat)
timeFormat
- the new time formatTimeZone getTimeZone()
void setTimeZone(TimeZone timeZone)
timeZone
- the time zone.DateFormat getDateFormat()
void setDateFormat(DateFormat dateFormat)
dateFormat
- the date format.void addDateModelListener(DateModelListener l)
l
- listener to be added.void removeDateModelListener(DateModelListener l)
l
- listener to be removedCalendar createCalendarInstance()
boolean isCompareTime()
isValidDate(java.util.Calendar)
is invoked.
By default, the flag is false. DateComboBox will set this flag while DateComboBox.setTimeDisplayed(boolean)
is invoked.
void setCompareTime(boolean compareTime)
isValidDate(java.util.Calendar)
is invoked.
compareTime
- the flagisCompareTime()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |