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); } }
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(); } }