Exemplo n.º 1
0
 @Override
 public void load() {
   desktop.setWaitCursor();
   clear();
   Vector<ScheduleRangeObject> v = null;
   try {
     v =
         memberService.findFollowUp(
             personFile.getId(), new DateRange(dates.getStartFr(), dates.getEndFr()));
   } catch (SQLException ex) {
     GemLogger.logException(ex);
   }
   int min = 0;
   if (v != null) {
     for (int i = 0; i < v.size(); i++) {
       ScheduleRangeObject r = v.elementAt(i);
       Hour hd = r.getStart();
       Hour hf = r.getEnd();
       min += hd.getLength(hf);
       tableModel.addItem(r);
     }
     totalTime.setText(Hour.format(min));
   }
   loaded = true;
   desktop.setDefaultCursor();
 }
Exemplo n.º 2
0
  public void testPostponeCourse() {
    HourRangePanel hp = new HourRangePanel(new Hour("14:00"), new Hour("15:00"));
    HourField hf = new HourField("17:00");

    Hour end = hf.get().end(hp.getLength());
    assertTrue(end.equals(new Hour("18:00")));
  }