com.dlsc.flexgantt.model.calendar
Class AbstractCalendarModel<T,S>

java.lang.Object
  extended by com.dlsc.flexgantt.model.calendar.AbstractCalendarModel<T,S>
Type Parameters:
S - the type of the calendar entries
T - the type of the hierachy nodes
All Implemented Interfaces:
ICalendarModel<T,S>
Direct Known Subclasses:
AbstractEntryCalendarModel

public abstract class AbstractCalendarModel<T,S>
extends java.lang.Object
implements ICalendarModel<T,S>

An abstract calendar model implementation that provides the necessary event handling infrastructure for its subclasses.

Since:
1.0
Author:
Dirk Lemmermann

Constructor Summary
protected AbstractCalendarModel()
          Construcs a new calendar model.
 
Method Summary
 void addCalendarListener(ICalendarModelListener l)
          Adds a calendar listener to the calendar model.
protected  void fireCalendarModelChanged()
          Informs all listeners that the calendar model has been changed (e.g. a holiday has been added).
 void removeCalendarListener(ICalendarModelListener l)
          Removes the given calendar listener from the calendar model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.dlsc.flexgantt.model.calendar.ICalendarModel
getCalendarEntries, getCalendarEntries, getCalendarEntryTimeSpan
 

Constructor Detail

AbstractCalendarModel

protected AbstractCalendarModel()
Construcs a new calendar model.

Since:
1.0
Method Detail

addCalendarListener

public void addCalendarListener(ICalendarModelListener l)
Description copied from interface: ICalendarModel
Adds a calendar listener to the calendar model. The listener will be informed whenever the calendar changes.

Specified by:
addCalendarListener in interface ICalendarModel<T,S>
Parameters:
l - the listener that will be added to the calendar's event listener list

removeCalendarListener

public void removeCalendarListener(ICalendarModelListener l)
Description copied from interface: ICalendarModel
Removes the given calendar listener from the calendar model.

Specified by:
removeCalendarListener in interface ICalendarModel<T,S>
Parameters:
l - the listener that will be removed from the calendar's event listener list

fireCalendarModelChanged

protected void fireCalendarModelChanged()
Informs all listeners that the calendar model has been changed (e.g. a holiday has been added).

Since:
1.0