*/
private void setProgressActionListeners() {
pauseButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
Status status = mediaPlayer.getStatus();
switch (status) {
// If playing, pause
case PLAYING:
mediaPlayer.pause();
break;
// If ready, paused or stopped, continue playing
case READY:
case PAUSED:
case STOPPED:
mediaPlayer.play();
break;
default:
logger.log(Level.INFO, "MediaPlayer in unexpected state: " + status.toString()); //NON-NLS
// If the MediaPlayer is in an unexpected state, stop playback.
mediaPlayer.stop();
setInfoLabelText(NbBundle.getMessage(this.getClass(),
"FXVideoPanel.pauseButton.infoLabel.playbackErr"));
break;