@Override public void update() { if (CurAudio.audioOpen()) { if (CurAudio.getPlayer().getStatus() == PrecisionPlayer.Status.PLAYING) { setEnabled(false); } else { if (CurAudio.getAudioProgress() <= 0) { if (dir == Direction.FORWARD) { setEnabled(true); } else { setEnabled(false); } } else if (CurAudio.getAudioProgress() == CurAudio.getMaster().durationInFrames() - 1) { if (dir == Direction.FORWARD) { setEnabled(false); } else { setEnabled(true); } } else { setEnabled(true); } } } else { setEnabled(false); } }
/** Zooming is enabled only when audio is open and not playing. */ @Override public void update() { if (CurAudio.audioOpen()) { if (CurAudio.getPlayer().getStatus() == PrecisionPlayer.Status.PLAYING) { setEnabled(false); } else { setEnabled(true); } } else { setEnabled(false); } }