private void setUpTransitions(int length) {
   List<Value> sequences = sequenceToShowChooser.getSelectedValuesList();
   if (this.serializeSequencesBox.isSelected() && sequences.size() > 1) {
     int numSeq = sequences.size();
     timeController.setEndTime(length * numSeq);
     addTransitionsSerialized(timeController.getAllFadedTime(), true);
   } else {
     timeController.setEndTime(length);
     addTransitions(timeController.getAllFadedTime(), true);
   }
 }
 private void animate() {
   if (lastAnimationTime > targetTime) {
     removeTransitions();
     animating = false;
     if (repeatAnimationCheckbox.isSelected()) {
       addAnimatedTransitions();
     }
   } else {
     timeController.calculateCurrentTime();
     lastAnimationTime = timeController.getCurrentTime();
     diagramView.repaint(); // paint it again as time has past
   }
 }