void setAnimation() {
   if (ui.animationList.getSelected() == null) return;
   int track = ui.trackButtons.getCheckedIndex();
   TrackEntry current = state.getCurrent(track);
   TrackEntry entry;
   if (current == null) {
     state.setEmptyAnimation(track, 0);
     entry =
         state.addAnimation(track, ui.animationList.getSelected(), ui.loopCheckbox.isChecked(), 0);
     entry.setMixDuration(ui.mixSlider.getValue());
   } else {
     entry =
         state.setAnimation(track, ui.animationList.getSelected(), ui.loopCheckbox.isChecked());
   }
   entry.setAlpha(ui.alphaSlider.getValue());
 }