@Override public void stop() { if (isPlaying) { playMode.stop(); isPlaying = false; } }
@Override public boolean play() { if (!isPlaying) { playMode = new F1PlayMode(device); try { playMode.start(); isPlaying = true; return true; } catch (Exception ex) { StatusDisplayer.getDefault().setStatusText(ex.getMessage()); Logger.getLogger(F1Provider.class.getName()).log(Level.WARN, ex); } } return false; }