org.karora.cooee.ng.model
Interface CalendarSelectionModel

All Known Implementing Classes:
DefaultCalendarSelectionModel

public interface CalendarSelectionModel

CalendarSelectionModel is a model interface for calendar selection. The displayed date is the date currently displayed by the UI as the user browses around a calendar. The selected date is the date they may have "clicked" on that is selected.


Method Summary
 void addListener(CalendarSelectionListener listener)
          Adds listener as a listener to changes in the model.
 java.util.Calendar getDisplayedDate()
           
 java.util.Calendar getSelectedDate()
           
 void removeListener(CalendarSelectionListener listener)
          Removes listener as a listener to changes in the model.
 void setDates(java.util.Calendar selectedDate, java.util.Calendar displayedDate)
          This is the equivalent of calling setSelectedDate() and setDisplayedDate() except it only raises change events after the both have been set.
 void setDisplayedDate(java.util.Calendar cal)
          Sets the model's displayed date to cal.
 void setSelectedDate(java.util.Calendar cal)
          Sets the model's selected date to cal.
 

Method Detail

addListener

void addListener(CalendarSelectionListener listener)
Adds listener as a listener to changes in the model.


getDisplayedDate

java.util.Calendar getDisplayedDate()
Returns:
the model's displayed date. This is the date that is "displayed" by the component using this model. As the user browses through the Calendar UI, the model's displayed date can change without the model's selected date changing per se.

getSelectedDate

java.util.Calendar getSelectedDate()
Returns:
the model's selected date. This is the date that is "selected" by the component using this model. When the user clicks on a date in the Calendar UI the selected date is changed.

removeListener

void removeListener(CalendarSelectionListener listener)
Removes listener as a listener to changes in the model.


setDisplayedDate

void setDisplayedDate(java.util.Calendar cal)
Sets the model's displayed date to cal. Notifies any listeners if the model changes


setSelectedDate

void setSelectedDate(java.util.Calendar cal)
Sets the model's selected date to cal. Notifies any listeners if the model changes


setDates

void setDates(java.util.Calendar selectedDate,
              java.util.Calendar displayedDate)
This is the equivalent of calling setSelectedDate() and setDisplayedDate() except it only raises change events after the both have been set.



Copyright © 2009. All Rights Reserved.