/** Creates a new instance of {@link JCalendar} */
  public JCalendar() {
    intervalChangedListener = new ArrayList<IntervalChangedListener>();
    config = new Config();
    formater = new DefaultCalendarEventFormat();
    selectedDay = Calendar.getInstance();

    initGui();
    bindListeners();

    EventCollectionRepository.register(this);
  }
 /** @param event */
 public void removeCalendarEvent(final CalendarEvent event) {
   EventCollectionRepository.get(this).remove(event);
   validate();
   repaint();
 }
 /** @param listener */
 public void removeCollectionChangedListener(final ModelChangedListener listener) {
   EventCollectionRepository.get(this).removeCollectionChangedListener(listener);
 }
 /** @param selectionChangedListener */
 public void removeSelectionChangedListener(
     final SelectionChangedListener selectionChangedListener) {
   EventCollectionRepository.get(this).removeSelectionChangedListener(selectionChangedListener);
 }
 /**
  * Returns a {@link Collection} of all {@link CalendarEvent}
  *
  * @return an {@link UnmodifiableCollection}
  */
 public Collection<CalendarEvent> getCalendarEvents() {
   return EventCollectionRepository.get(this).getAllEvents();
 }