Exemple #1
0
  /** Render the calendar. */
  public void refresh() {
    drawEmptyCells();

    if (isAttached()) {
      calibrateCalendar();
      drawEvents();
    }
    if (listener != null) listener.afterRefresh();
  }
Exemple #2
0
 public boolean executeEvent(int type) throws Exception {
   if (type != EVENT_SUBMIT) return true;
   if (_listeners != null) {
     CalendarListener l = null;
     for (int i = 0; i < _listeners.size(); i++) {
       l = (CalendarListener) _listeners.elementAt(i);
       if (_calEvent instanceof CalendarMonthChangeEvent) {
         if (!l.monthChanged((CalendarMonthChangeEvent) _calEvent)) return false;
       } else {
         l.dateSelected((CalendarDateSelectedEvent) _calEvent);
       }
     }
   }
   if (_calEvent instanceof CalendarMonthChangeEvent) {
     _currentMonth = ((CalendarMonthChangeEvent) _calEvent).getNewMonth();
     _currentYear = ((CalendarMonthChangeEvent) _calEvent).getNewYear();
   }
   return true;
 }