EchoPoint
1.0

echopoint.model
Class DefaultCalendarSelectionModel

java.lang.Object
  extended byechopoint.model.DefaultCalendarSelectionModel
All Implemented Interfaces:
CalendarSelectionModel, java.io.Serializable

public class DefaultCalendarSelectionModel
extends java.lang.Object
implements CalendarSelectionModel, java.io.Serializable

A generic implementation of CalendarSelectionModel.

See Also:
Serialized Form

Field Summary
protected  nextapp.echo.event.ChangeEvent changeEvent
          Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected  nextapp.echo.event.EventListenerList listenerList
           
 
Constructor Summary
DefaultCalendarSelectionModel(java.util.Calendar cal)
          Initializes selectedDate to cal
 
Method Summary
 void addChangeListener(nextapp.echo.event.ChangeListener l)
          Adds a ChangeListener to the button.
 void fireStateChanged()
          Notifies all listeners that have registered for this event type.
 java.util.Calendar getDisplayedDate()
           
 java.util.Calendar getSelectedDate()
           
 void removeChangeListener(nextapp.echo.event.ChangeListener l)
          Removes a ChangeListener from the button.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changeEvent

protected transient nextapp.echo.event.ChangeEvent changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".


listenerList

protected nextapp.echo.event.EventListenerList listenerList
Constructor Detail

DefaultCalendarSelectionModel

public DefaultCalendarSelectionModel(java.util.Calendar cal)
Initializes selectedDate to cal

Method Detail

addChangeListener

public void addChangeListener(nextapp.echo.event.ChangeListener l)
Adds a ChangeListener to the button.

Specified by:
addChangeListener in interface CalendarSelectionModel
Parameters:
l - The ChangeListener to be added.

fireStateChanged

public void fireStateChanged()
Notifies all listeners that have registered for this event type.


getDisplayedDate

public java.util.Calendar getDisplayedDate()
Specified by:
getDisplayedDate in interface CalendarSelectionModel
Returns:
the model's displayed date

getSelectedDate

public java.util.Calendar getSelectedDate()
Specified by:
getSelectedDate in interface CalendarSelectionModel

removeChangeListener

public void removeChangeListener(nextapp.echo.event.ChangeListener l)
Removes a ChangeListener from the button.

Specified by:
removeChangeListener in interface CalendarSelectionModel
Parameters:
l - The ChangeListener to be removed.

setDisplayedDate

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

Specified by:
setDisplayedDate in interface CalendarSelectionModel

setSelectedDate

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

Specified by:
setSelectedDate in interface CalendarSelectionModel

EchoPoint
1.0