Example #1
0
    public void update(LineEvent event) {

      if (event.getType() == LineEvent.Type.STOP && playState != PAUSED) {
        audioEOM = true;
        if (playState != STOPPED) {
          clip.stop();
          playState = EOM;
        }
      }
    }
Example #2
0
  /**
   * Method to handle the line event update
   *
   * @param e the line event
   */
  public void update(LineEvent e) {

    if (e.getType().equals(LineEvent.Type.CLOSE)) {
      playBtn.setEnabled(true);

      stopBtn.setEnabled(false);
      pauseBtn.setEnabled(false);
      if (wavePanel.moreZoomInScope()) {
        playSelectionBtn.setEnabled(true);

        zoomInBtn.setEnabled(true);
      }
      if (wavePanel.moreZoomOutScope()) zoomOutBtn.setEnabled(true);
      isPlaying = false;
      playSelClicked = 0;
    }
  }