Exemplo n.º 1
0
 /**
  * This method was created in VisualAge.
  *
  * @return boolean
  * @param g java.util.GregorianCalendar
  */
 private boolean dayHighlighted(GregorianCalendar g) {
   GregorianCalendar g2 = null;
   for (; _nextDay < _dayHighlights.size(); _nextDay++) {
     g2 = (GregorianCalendar) _dayHighlights.elementAt(_nextDay);
     if (g2.equals(g)) return true;
     else if (g2.after(g)) return false;
   }
   return false;
 }
Exemplo n.º 2
0
  /** This method adds a new day to highlight to the calendar. */
  public void addDayHighlight(GregorianCalendar g) {
    int max = _dayHighlights.size();
    GregorianCalendar g2 = null;
    for (int i = 0; i < max; i++) {
      g2 = (GregorianCalendar) _dayHighlights.elementAt(i);
      if (g.equals(g2)) return;
      else if (g2.after(g)) {
        _dayHighlights.insertElementAt(g, i);
        return;
      }
    }

    _dayHighlights.addElement(g);
  }