|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.DefaultDateSelectionModel
public class DefaultDateSelectionModel
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jdesktop.swingx.DateSelectionModel |
---|
DateSelectionModel.SelectionMode |
Constructor Summary | |
---|---|
DefaultDateSelectionModel()
|
Method Summary | |
---|---|
void |
addDateSelectionListener(DateSelectionListener l)
Add the specified listener to this model |
void |
addSelectionInterval(Date startDate,
Date endDate)
Add the specified selection interval to the selection model |
void |
clearSelection()
Clear any selection from the selection model |
protected void |
fireValueChanged(DateSelectionEvent.EventType eventType)
|
List<DateSelectionListener> |
getDateSelectionListeners()
|
int |
getFirstDayOfWeek()
Gets what the first day of the week is; e.g., Calendar.SUNDAY in the U.S., Calendar.MONDAY
in France. |
Date |
getLowerBound()
Return the lower bound date that is allowed to be selected for this model |
SortedSet<Date> |
getSelection()
Get the current selection |
DateSelectionModel.SelectionMode |
getSelectionMode()
Get the selection mode |
SortedSet<Date> |
getUnselectableDates()
Returns a SortedSet of Dates that are unselectable |
Date |
getUpperBound()
Return the upper bound date that is allowed to be selected for this model |
boolean |
isSelected(Date date)
Return true if the date specified is selected, false otherwise |
boolean |
isSelectionEmpty()
Return true if the selection is empty, false otherwise |
boolean |
isUnselectableDate(Date date)
Return true is the specified date is unselectable |
void |
removeDateSelectionListener(DateSelectionListener l)
Remove the specified listener to this model |
void |
removeSelectionInterval(Date startDate,
Date endDate)
Remove the specifed selection interval from the selection model |
void |
setFirstDayOfWeek(int firstDayOfWeek)
Sets what the first day of the week is; e.g., Calendar.SUNDAY in US, Calendar.MONDAY
in France. |
void |
setLowerBound(Date lowerBound)
Set the lower bound date that is allowed to be selected for this model |
void |
setSelectionInterval(Date startDate,
Date endDate)
Set the specified selection interval to the selection model |
void |
setSelectionMode(DateSelectionModel.SelectionMode selectionMode)
Set the selection mode |
void |
setUnselectableDates(SortedSet<Date> unselectableDates)
Set which dates are unable to be selected |
void |
setUpperBound(Date upperBound)
Set the upper bound date that is allowed to be selected for this model |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultDateSelectionModel()
Method Detail |
---|
public DateSelectionModel.SelectionMode getSelectionMode()
getSelectionMode
in interface DateSelectionModel
public void setSelectionMode(DateSelectionModel.SelectionMode selectionMode)
setSelectionMode
in interface DateSelectionModel
selectionMode
- new selection modepublic int getFirstDayOfWeek()
DateSelectionModel
Calendar.SUNDAY
in the U.S., Calendar.MONDAY
in France.
This is needed when the model selection mode is WEEK_INTERVAL_SELECTION
.
The default value is Calendar.SUNDAY
getFirstDayOfWeek
in interface DateSelectionModel
public void setFirstDayOfWeek(int firstDayOfWeek)
DateSelectionModel
Calendar.SUNDAY
in US, Calendar.MONDAY
in France.
setFirstDayOfWeek
in interface DateSelectionModel
firstDayOfWeek
- The first day of the week.Calendar
public void addSelectionInterval(Date startDate, Date endDate)
addSelectionInterval
in interface DateSelectionModel
startDate
- interval start dateendDate
- interval end datepublic void setSelectionInterval(Date startDate, Date endDate)
setSelectionInterval
in interface DateSelectionModel
startDate
- interval start dateendDate
- interval end datepublic void removeSelectionInterval(Date startDate, Date endDate)
removeSelectionInterval
in interface DateSelectionModel
startDate
- interval start dateendDate
- interval end datepublic void clearSelection()
clearSelection
in interface DateSelectionModel
public SortedSet<Date> getSelection()
getSelection
in interface DateSelectionModel
public boolean isSelected(Date date)
isSelected
in interface DateSelectionModel
date
- date to check for selection
public boolean isSelectionEmpty()
isSelectionEmpty
in interface DateSelectionModel
public void addDateSelectionListener(DateSelectionListener l)
addDateSelectionListener
in interface DateSelectionModel
l
- listener to add to this modelpublic void removeDateSelectionListener(DateSelectionListener l)
removeDateSelectionListener
in interface DateSelectionModel
l
- listener to remove from this modelpublic SortedSet<Date> getUnselectableDates()
SortedSet
of Dates that are unselectable
- Specified by:
getUnselectableDates
in interface DateSelectionModel
- Returns:
- sorted set of dates
public void setUnselectableDates(SortedSet<Date> unselectableDates)
setUnselectableDates
in interface DateSelectionModel
unselectableDates
- dates that are unselectablepublic boolean isUnselectableDate(Date date)
isUnselectableDate
in interface DateSelectionModel
date
- the date to check for unselectability
public Date getUpperBound()
getUpperBound
in interface DateSelectionModel
public void setUpperBound(Date upperBound)
setUpperBound
in interface DateSelectionModel
upperBound
- upper boundpublic Date getLowerBound()
getLowerBound
in interface DateSelectionModel
public void setLowerBound(Date lowerBound)
setLowerBound
in interface DateSelectionModel
lowerBound
- lower bound date or null if not setpublic List<DateSelectionListener> getDateSelectionListeners()
protected void fireValueChanged(DateSelectionEvent.EventType eventType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |