|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DateSelectionModel
This interface represents the current state of the
selection for DateChooserPanel. It has three different selection modes
- SINGLE_SELECTION, SINGLE_INTERVAL_SELECTION and
MULTIPLE_INTERVAL_SELECTION which is the same as ListSelectionModel.
DefaultDateSelectionModel| Field Summary | |
|---|---|
static int |
MULTIPLE_INTERVAL_SELECTION
A value for the selectionMode property: select one or more contiguous ranges of Dates at a time. |
static int |
SINGLE_INTERVAL_SELECTION
A value for the selectionMode property: select one contiguous range of Dates at a time. |
static int |
SINGLE_SELECTION
A value for the selectionMode property: select one Date at a time. |
| Method Summary | |
|---|---|
void |
addDateSelectionListener(DateSelectionListener listener)
Add a listener to the list that's notified each time a change to the selection occurs. |
void |
addSelectionInterval(Date date0,
Date date1)
Change the selection date1 be the set union of the current selection and the indices between date0 and date1 inclusive. |
void |
clearSelection()
Change the selection to the empty set. |
Object |
clone()
Clone the DateSelectionModel instance. |
Date |
getAnchorSelectionDate()
Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval(). |
Date |
getLeadSelectionDate()
Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval(). |
Date |
getSelectedDate()
Gets the selected date. |
Date[] |
getSelectedDates()
Gets all selected dates. |
int |
getSelectionMode()
Returns the current selection mode. |
boolean |
getValueIsAdjusting()
Returns true if the value is undergoing a series of changes. |
boolean |
isSelectedDate(Date date)
Returns true if the specified Date is selected. |
boolean |
isSelectionEmpty()
Check if current selection is empty. |
void |
removeDateSelectionListener(DateSelectionListener listener)
Remove a listener from the list that's notified each time a change to the selection occurs. |
void |
removeSelectionInterval(Date date0,
Date date1)
Change the selection to the set difference of the current selection and the indices between date0 and date1 inclusive. |
void |
setAnchorSelectionDate(Date date)
Set the anchor selection Date. |
void |
setLeadSelectionDate(Date date)
Set the lead selection date. |
void |
setSelectedDate(Date date)
Sets selected date. |
void |
setSelectedDates(Date[] dates)
Sets selected dates. |
void |
setSelectionInterval(Date date0,
Date date1)
Change the selection date1 be between date0 and date1 inclusive. |
void |
setSelectionMode(int selectionMode)
Set the selection mode. |
void |
setTimeZone(TimeZone timeZone)
Sets the timezone this selection model works on. |
void |
setValueIsAdjusting(boolean valueIsAdjusting)
This property is true if upcoming changes to the value of the model should be considered a single event. |
| Field Detail |
|---|
static final int SINGLE_SELECTION
setSelectionMode(int),
Constant Field Valuesstatic final int SINGLE_INTERVAL_SELECTION
setSelectionMode(int),
Constant Field Valuesstatic final int MULTIPLE_INTERVAL_SELECTION
setSelectionMode(int),
Constant Field Values| Method Detail |
|---|
void setSelectionInterval(Date date0,
Date date1)
date0 - one end of the interval.date1 - other end of the intervaladdDateSelectionListener(DateSelectionListener)
void addSelectionInterval(Date date0,
Date date1)
date0 - one end of the interval.date1 - other end of the intervaladdDateSelectionListener(DateSelectionListener)
void removeSelectionInterval(Date date0,
Date date1)
date0 - one end of the interval.date1 - other end of the intervaladdDateSelectionListener(DateSelectionListener)boolean isSelectedDate(Date date)
date - the date to be checked
Date getAnchorSelectionDate()
getLeadSelectionDate(),
setSelectionInterval(java.util.Date, java.util.Date),
addSelectionInterval(java.util.Date, java.util.Date)void setAnchorSelectionDate(Date date)
date - the anchor selection dategetAnchorSelectionDate()Date getLeadSelectionDate()
getAnchorSelectionDate(),
setSelectionInterval(java.util.Date, java.util.Date),
addSelectionInterval(java.util.Date, java.util.Date)void setLeadSelectionDate(Date date)
date - the lead selection dategetLeadSelectionDate()void clearSelection()
addDateSelectionListener(DateSelectionListener)boolean isSelectionEmpty()
void setValueIsAdjusting(boolean valueIsAdjusting)
valueIsAdjusting - The new value of the property.getValueIsAdjusting()boolean getValueIsAdjusting()
setValueIsAdjusting(boolean)void setSelectionMode(int selectionMode)
SINGLE_SELECTION
Only one list index can be selected at a time. In this
mode the setSelectionInterval and addSelectionInterval
methods are equivalent, and only the second index
argument (the "lead date") is used.
SINGLE_INTERVAL_SELECTION
One contiguous index interval can be selected at a time.
In this mode setSelectionInterval and addSelectionInterval
are equivalent.
MULTIPLE_INTERVAL_SELECTION
In this mode, there's no restriction on what can be selected.
selectionMode - the selection modegetSelectionMode()int getSelectionMode()
setSelectionMode(int)void addDateSelectionListener(DateSelectionListener listener)
listener - the DateSelectionListenerremoveDateSelectionListener(DateSelectionListener),
setSelectionInterval(java.util.Date, java.util.Date),
addSelectionInterval(java.util.Date, java.util.Date),
removeSelectionInterval(java.util.Date, java.util.Date),
clearSelection()void removeDateSelectionListener(DateSelectionListener listener)
listener - the DateSelectionListeneraddDateSelectionListener(DateSelectionListener)Date getSelectedDate()
void setSelectedDate(Date date)
date - the selected dateDate[] getSelectedDates()
void setSelectedDates(Date[] dates)
dates - the selected datesvoid setTimeZone(TimeZone timeZone)
timeZone - the time zone
Object clone()
throws CloneNotSupportedException
CloneNotSupportedException
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||