net.sf.nachocalendar.model
Interface DateSelectionModel

All Known Implementing Classes:
DefaultDateSelectionModel

public interface DateSelectionModel

Author:
Ignacio Merani

Field Summary
static int MULTIPLE_INTERVAL_SELECTION
          Used to support multiple Date intevals.
static int SINGLE_INTERVAL_SELECTION
          Used to support only one Date interval.
static int SINGLE_SELECTION
          Used to support only one Date selected.
 
Method Summary
 void addDateSelectionListener(DateSelectionListener listener)
          Registers DateSelectionListener to receive events.
 void addSelectionInterval(java.util.Date from, java.util.Date to)
          Adds the interval to the selection.
 void clearSelection()
          Clears the current selection.
 java.util.Date getLeadSelectionDate()
          Returns the lead selection Date.
 java.lang.Object getSelectedDate()
          Returns the selected Date.
 java.lang.Object[] getSelectedDates()
          Sets the selected Dates.
 int getSelectionMode()
          Returns the selection mode.
 boolean getValueIsAdjusting()
          Returns true if the current changes to the value property are part of a series of changes.
 boolean isSelectedDate(java.util.Date date)
          Checks if provided date is selected.
 boolean isSelectionEmpty()
          Checks if selection is empty.
 void removeDateSelectionListener(DateSelectionListener listener)
          Removes DateSelectionListener from the list of listeners.
 void removeSelectionInterval(java.util.Date from, java.util.Date to)
          Removes the interval from selection.
 void setLeadSelectionDate(java.util.Date date)
          Sets the lead selection Date.
 void setSelectedDate(java.lang.Object date)
          Sets the selected Date.
 void setSelectedDates(java.lang.Object[] dates)
          Sets the selected Dates.
 void setSelectionMode(int selectionMode)
          Sets the selection mode.
 void setValueIsAdjusting(boolean b)
          This attribute indicates that any upcoming changes to the value of the model should be considered a single event.
 

Field Detail

SINGLE_SELECTION

static final int SINGLE_SELECTION
Used to support only one Date selected.

See Also:
Constant Field Values

SINGLE_INTERVAL_SELECTION

static final int SINGLE_INTERVAL_SELECTION
Used to support only one Date interval.

See Also:
Constant Field Values

MULTIPLE_INTERVAL_SELECTION

static final int MULTIPLE_INTERVAL_SELECTION
Used to support multiple Date intevals.

See Also:
Constant Field Values
Method Detail

addSelectionInterval

void addSelectionInterval(java.util.Date from,
                          java.util.Date to)
Adds the interval to the selection.

Parameters:
from - starting date
to - end date

clearSelection

void clearSelection()
Clears the current selection.


isSelectedDate

boolean isSelectedDate(java.util.Date date)
Checks if provided date is selected.

Parameters:
date - Date to check.
Returns:
true if date is selected

isSelectionEmpty

boolean isSelectionEmpty()
Checks if selection is empty.

Returns:
true if selection is empty.

getSelectionMode

int getSelectionMode()
Returns the selection mode.

Returns:
selection mode.

setSelectionMode

void setSelectionMode(int selectionMode)
Sets the selection mode.

Parameters:
selectionMode - the new selection mode.

removeSelectionInterval

void removeSelectionInterval(java.util.Date from,
                             java.util.Date to)
Removes the interval from selection.

Parameters:
from - starting date
to - end date

addDateSelectionListener

void addDateSelectionListener(DateSelectionListener listener)
Registers DateSelectionListener to receive events.

Parameters:
listener - The listener to register.

removeDateSelectionListener

void removeDateSelectionListener(DateSelectionListener listener)
Removes DateSelectionListener from the list of listeners.

Parameters:
listener - The listener to remove.

getLeadSelectionDate

java.util.Date getLeadSelectionDate()
Returns the lead selection Date.

Returns:
lead selection Date.

setLeadSelectionDate

void setLeadSelectionDate(java.util.Date date)
Sets the lead selection Date.

Parameters:
date - lead selection Date.

getSelectedDate

java.lang.Object getSelectedDate()
Returns the selected Date.

Returns:
selected Date.

getSelectedDates

java.lang.Object[] getSelectedDates()
Sets the selected Dates.

Returns:
selected Dates.

setSelectedDate

void setSelectedDate(java.lang.Object date)
Sets the selected Date.

Parameters:
date - selected Date.

setSelectedDates

void setSelectedDates(java.lang.Object[] dates)
Sets the selected Dates.

Parameters:
dates - selected Dates.

setValueIsAdjusting

void setValueIsAdjusting(boolean b)
This attribute indicates that any upcoming changes to the value of the model should be considered a single event.

Parameters:
b -

getValueIsAdjusting

boolean getValueIsAdjusting()
Returns true if the current changes to the value property are part of a series of changes.

Returns: