Holger's
Java API

com.antelmann.calendar
Class DefaultCalendarModel

java.lang.Object
  extended by com.antelmann.calendar.AbstractCalendarModel
      extended by com.antelmann.calendar.DefaultCalendarModel
All Implemented Interfaces:
CalendarModel, Serializable

public class DefaultCalendarModel
extends AbstractCalendarModel
implements Serializable

a standard implementation of a CalendarModel based on a simple TreeMap

Author:
Holger Antelmann
See Also:
Serialized Form

Field Summary
protected  CalendarHelper ch
           
protected  TreeMap<Date,Object> map
           
protected  Date thisMonthOnly
           
 
Constructor Summary
DefaultCalendarModel()
           
 
Method Summary
 Date getThisMonthOnly()
           
 Object getValueFor(Date date)
           
 SortedMap<Date,Object> getView()
           
 Object put(Date date, Object value)
           
 Object remove(Date date)
           
 void setThisMonthOnly(Date date)
          if set to a non-null value, the getValueFor(Date) method will only return null in case a given date is not in the same month as this given parameter
 
Methods inherited from class com.antelmann.calendar.AbstractCalendarModel
addCalendarModelListener, fireChange, fireChange, getListeners, removeCalendarModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected TreeMap<Date,Object> map

thisMonthOnly

protected Date thisMonthOnly

ch

protected final CalendarHelper ch
Constructor Detail

DefaultCalendarModel

public DefaultCalendarModel()
Method Detail

setThisMonthOnly

public void setThisMonthOnly(Date date)
if set to a non-null value, the getValueFor(Date) method will only return null in case a given date is not in the same month as this given parameter


getThisMonthOnly

public Date getThisMonthOnly()

getView

public SortedMap<Date,Object> getView()

put

public Object put(Date date,
                  Object value)

remove

public Object remove(Date date)

getValueFor

public Object getValueFor(Date date)
Specified by:
getValueFor in interface CalendarModel


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads