Пример #1
0
  private void jButton_fullscreenActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton_fullscreenActionPerformed
    File file = new File(Instance_data.getPlaypath());
    System.out.println(Instance_data.getPlaypath());
    Instance_hold.getFsnt().setVisible(false);
    Instance_hold.getFsf().setVisible(false);
    Instance_data.setMedia_time(Instance_hold.getFsf().getEmpc().getMediaPlayer().getTime());
    // Instance_hold.getVplay_mon().setStopped(true);
    Instance_hold.getFsf().getEmpc().getMediaPlayer().stop();
    Instance_hold.getPlayframe().setVisible(true);
    Instance_hold.getPlayframe().getEmpc().getMediaPlayer().playMedia(Instance_data.getPlaypath());
    Instance_hold.getPlayframe().getEmpc().getMediaPlayer().setTime(Instance_data.getMedia_time());
    while (!Instance_hold.getPlayframe().getEmpc().getMediaPlayer().isPlaying() && file.exists()) {
      System.out.println("FSF:   WAITING TO START PLAYING:::::");
      try {
        Thread.sleep(100);
      } catch (InterruptedException ex) {

      }
    }
    ;
    // if (Instance_hold.getPlayframe().getEmpc().getMediaPlayer().isPlaying())
    // Instance_hold.getVplay_mon().setStopped(false);
    Instance_hold.getPlayframe()
        .getjLabel_play()
        .setIcon(new ImageIcon(getClass().getResource("/gui/design/mcb_grey_pause_small.png")));
    Instance_hold.getMframe().getClistener().setFullscreen(false);
  } // GEN-LAST:event_jButton_fullscreenActionPerformed
Пример #2
0
  private void jLabel_prevMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jLabel_prevMouseClicked
    System.out.println("PLAYCONTROL: " + this.playcontrol);
    if (this.playcontrol) {
      this.playcontrol = false;
      // System.out.println("PLAYCONTROL: " + this.playcontrol);

      Instance_hold.getMframe().getjProgressBar_main().setIndeterminate(true);
      this.setEnabled(false);
      Main_controls.prevMedia();

      while (!Instance_hold.getPlayframe().getEmpc().getMediaPlayer().isPlaying()
          && !Instance_hold.getFsf().getEmpc().getMediaPlayer().isPlaying()) {
        try {
          Thread.sleep(100);
        } catch (InterruptedException ex) {
          Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
        }
      }

      this.setEnabled(true);
      this.playcontrol = true;
    }
  } // GEN-LAST:event_jLabel_prevMouseClicked