Esempio n. 1
0
 public void handleDisconnect(Figure start, Figure end) {
   PertFigure source = (PertFigure) start;
   PertFigure target = (PertFigure) end;
   if (target != null) {
     target.removePreTask(source);
     target.updateDurations();
   }
   if (source != null) {
     source.removePostTask(target);
   }
 }
Esempio n. 2
0
 public void handleConnect(Figure start, Figure end) {
   PertFigure source = (PertFigure) start;
   PertFigure target = (PertFigure) end;
   if (source.hasCycle(target)) {
     setAttribute(FigureAttributeConstant.FRAME_COLOR, Color.red);
   } else {
     target.addPreTask(source);
     source.addPostTask(target);
     source.notifyPostTasks();
   }
 }