Example #1
0
  @Override
  public void load(
      java.util.Date d, Vector<ScheduleObject> schedules, Vector<ScheduleRangeObject> ranges) {

    int cpt = 0;

    dayPlanView.clear();
    dayPlanView.setDate(d);
    date.set(d);
    dayLabel.setText(date.getDayOfWeek());

    for (int i = 0; i < teacherList.getSize(); i++) {
      Teacher t = (Teacher) teacherList.getElementAt(i);
      Vector<ScheduleObject> v1 = getSchedule(schedules, t.getId());
      Vector<ScheduleRangeObject> v2 = getSchedule(ranges, t.getId());

      if ((v1.size() + v2.size()) > 0) {
        DayPlan pj = new DayPlan();
        pj.setId(t.getId());
        pj.setLabel(t.getName());
        pj.setSchedule(v1);
        pj.setScheduleRange(v2);

        dayPlanView.addCol(pj);

        cpt++;
      }
    }

    //    dayPlanView.repaint();
    setScrollBarToZero();
  }
Example #2
0
 @Override
 public GemPanel getCriterion() {
   pCriterion = new GemPanel();
   cbCriterion = new JComboBox(criteria);
   pCriterion.add(cbCriterion);
   allEstabList = desktop.getDataCache().getList(Model.Establishment);
   allEstabList.addElement(new Establishment(new Person(0, BundleUtil.getLabel("All.label"))));
   estab = new EstabChoice(allEstabList);
   pCriterion.add(estab);
   return pCriterion;
 }
Example #3
0
 @Override
 protected void close() {
   allEstabList.removeElement((Establishment) allEstabList.getItem(0));
   super.close();
 }