|
Java Date Picker v2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.standbysoft.datepicker.DefaultDateSelectionModel
A default implementation of a date selection model.
Inner classes inherited from class com.standbysoft.datepicker.DateSelectionModel |
DateSelectionModel.SelectionMode |
Constructor Summary | |
DefaultDateSelectionModel()
Creates a default selection model. |
Method Summary | |
void |
addDateSelectionInterval(java.util.Date date1,
java.util.Date date2)
Change the selection to be the set union of the current date selection and the dates between date1 and date2 inclusive. |
void |
addDateSelectionListener(DateSelectionListener listener)
Registers a new date selection listener to the model. |
void |
addDisabled(java.util.Date date)
|
java.util.Date |
getAnchorSelectionDate()
Returns the anchor selection date. |
java.util.Date |
getLeadSelectionDate()
Returns the lead selection date. |
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
|
java.util.Date[] |
getSelectedDates()
Returns the selected dates. |
com.standbysoft.datepicker.SelectionMode |
getSelectionMode()
Returns the selection mode used by this model. |
boolean |
isDateSelected(java.util.Date date)
Determines whether a specified date has been selected. |
boolean |
isDisabled(java.util.Date date)
Returns false because all the days from the calendar can be selected by default. |
void |
removeAllDisabled()
|
void |
removeDateSelectionInterval(java.util.Date date1,
java.util.Date date2)
Change the selection to be the set difference of the current selection and the dates between date1 and date2 inclusive. |
void |
removeDateSelectionListener(DateSelectionListener listener)
Removes a specified date selection listener from this model. |
void |
removeDisabled(java.util.Date date)
|
void |
setAnchorSelectionDate(java.util.Date date)
Sets the anchor selection date. |
void |
setDateSelectionIterval(java.util.Date date1,
java.util.Date date2)
Changes the date selection interval to be between date1 and date2 inclusive. |
void |
setLeadSelectionDate(java.util.Date date)
Sets the lead selection date. |
void |
setSelectionMode(com.standbysoft.datepicker.SelectionMode mode)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.standbysoft.datepicker.DateSelectionModel |
setSelectionMode |
Constructor Detail |
public DefaultDateSelectionModel()
Method Detail |
public boolean isDisabled(java.util.Date date)
false
because all the days from the calendar can be selected by default.isDisabled
in interface DateSelectionModel
date
- date to be tested if disabledfalse
.public void addDisabled(java.util.Date date)
public void removeDisabled(java.util.Date date)
public void removeAllDisabled()
public boolean isDateSelected(java.util.Date date)
DateSelectionModel
isDateSelected
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
date
- date to be testedtrue
if the date has been selected; false
otherwise.public void setSelectionMode(com.standbysoft.datepicker.SelectionMode mode)
public com.standbysoft.datepicker.SelectionMode getSelectionMode()
DateSelectionModel
getSelectionMode
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
public java.util.Date[] getSelectedDates()
DateSelectionModel
getSelectedDates
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
DateSelectionModel.SelectionMode
public void setLeadSelectionDate(java.util.Date date)
DateSelectionModel
setLeadSelectionDate
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
date
- lead date to be setDateSelectionModel.getLeadSelectionDate()
public java.util.Date getLeadSelectionDate()
DateSelectionModel
getLeadSelectionDate
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
public void setAnchorSelectionDate(java.util.Date date)
DateSelectionModel
setAnchorSelectionDate
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
date
- anchor date to be setDateSelectionModel.getAnchorSelectionDate()
public java.util.Date getAnchorSelectionDate()
DateSelectionModel
getAnchorSelectionDate
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
public void setDateSelectionIterval(java.util.Date date1, java.util.Date date2)
DateSelectionModel
DateSelectionListener
. Note that date1 doesn't have to be less than or
equal to date2.setDateSelectionIterval
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
date1
- one end of the date intervaldate2
- other end of the date intervalpublic void addDateSelectionInterval(java.util.Date date1, java.util.Date date2)
DateSelectionModel
DateSelectionListener
.
Note that date1 doesn't have to be less than or equal to date2.addDateSelectionInterval
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
date1
- one end of the date intervaldate2
- other end of the date intervalpublic void removeDateSelectionInterval(java.util.Date date1, java.util.Date date2)
DateSelectionModel
DateSelectionListener
.
Note that date1 doesn't have to be less than or equal to date2.removeDateSelectionInterval
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
date1
- one end of the date intervaldate2
- other end of the date intervalpublic void addDateSelectionListener(DateSelectionListener listener)
DateSelectionModel
addDateSelectionListener
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
listener
- listener to be registeredpublic void removeDateSelectionListener(DateSelectionListener listener)
DateSelectionModel
removeDateSelectionListener
in interface DateSelectionModel
com.standbysoft.datepicker.DateSelectionModel
listener
- listener to be removedpublic java.util.EventListener[] getListeners(java.lang.Class listenerType)
|
Java Date Picker v2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |