Exemplo n.º 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
Exemplo n.º 2
0
  private void jLabel_stopMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jLabel_stopMouseClicked
    System.out.println("STOPPPP");
    // Instance_hold.getVplay_mon().setStopped(true);
    Instance_hold.getFsf().getEmpc().getMediaPlayer().stop();
    while (Instance_hold.getFsf().getEmpc().getMediaPlayer().isPlaying()) {
      try {
        Thread.sleep(100);
      } catch (InterruptedException ex) {
        Logger.getLogger(FS_Navi_Tab.class.getName()).log(Level.SEVERE, null, ex);
      }
    }

    this.jLabel_play.setIcon(
        new ImageIcon(getClass().getResource("/gui/design/mcb_grey_play_small.png")));
    this.jSlider_Media.setValue(0);
    stop = true;
  } // GEN-LAST:event_jLabel_stopMouseClicked
Exemplo n.º 3
0
 private void jLabel_playMouseEntered(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jLabel_playMouseEntered
   Instance_hold.getFsf().getMml().getTimer().cancel();
   if (stop)
     this.jLabel_play.setIcon(
         new ImageIcon(getClass().getResource("/gui/design/mcb_blue_play_small.png")));
   else
     this.jLabel_play.setIcon(
         new ImageIcon(getClass().getResource("/gui/design/mcb_blue_pause_small.png")));
 } // GEN-LAST:event_jLabel_playMouseEntered
Exemplo n.º 4
0
 private void jSlider_MediaMouseClicked(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jSlider_MediaMouseClicked
   if (!dragged)
     Instance_hold.getFsf()
         .getEmpc()
         .getMediaPlayer()
         .setTime(
             (int)
                 (Instance_data.getMedia_length()
                     * (this.jSlider_Media.getMousePosition().getX()
                         / this.jSlider_Media.getSize().getWidth())));
 } // GEN-LAST:event_jSlider_MediaMouseClicked
Exemplo n.º 5
0
 private void jSlider_MediaMouseReleased(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jSlider_MediaMouseReleased
   // System.out.println("SETTIME_VALUE: " +
   // (int)(Instance_data.getMedia_length()*(sl_value/1000.0)));
   if (dragged) {
     Instance_hold.getFsf()
         .getEmpc()
         .getMediaPlayer()
         .setTime((int) (Instance_data.getMedia_length() * (sl_value / 1000.0)));
     dragged = false;
   }
 } // GEN-LAST:event_jSlider_MediaMouseReleased
Exemplo n.º 6
0
  private void jLabel_playMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jLabel_playMouseClicked
    if (this.playcontrol) {
      this.setEnabled(false);
      if (!Instance_hold.getFsf().getEmpc().getMediaPlayer().isPlaying()) {
        Instance_hold.getFsf().getEmpc().getMediaPlayer().start();
        while (!Instance_hold.getFsf().getEmpc().getMediaPlayer().isPlaying()) {
          // System.out.println("WAITING TO START PLAYING:::::");
          try {
            Thread.sleep(100);
          } catch (InterruptedException ex) {

          }
        }
        ;
        // Instance_hold.getVplay_mon().setStopped(false);
        // System.out.println("PLAY_BLUE_SMALL");
        this.jLabel_play.setIcon(
            new ImageIcon(getClass().getResource("/gui/design/mcb_blue_pause_small.png")));
        stop = false;
      } else {
        // Instance_hold.getVplay_mon().setStopped(true);
        Instance_hold.getFsf().getEmpc().getMediaPlayer().pause();
        while (Instance_hold.getFsf().getEmpc().getMediaPlayer().isPlaying()) {
          try {
            Thread.sleep(100);
          } catch (InterruptedException ex) {
            Logger.getLogger(FS_Navi_Tab.class.getName()).log(Level.SEVERE, null, ex);
          }
        }

        this.jLabel_play.setIcon(
            new ImageIcon(getClass().getResource("/gui/design/mcb_blue_play_small.png")));
        stop = true;
      }
      this.setEnabled(true);
    }
  } // GEN-LAST:event_jLabel_playMouseClicked
Exemplo n.º 7
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
Exemplo n.º 8
0
 private void jLabel_prevMousePressed(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jLabel_prevMousePressed
   this.jLabel_prev.setIcon(Instance_hold.getIm_hold().getMcb_green_prev_small());
 } // GEN-LAST:event_jLabel_prevMousePressed
Exemplo n.º 9
0
 private void jLabel_nextMouseExited(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jLabel_nextMouseExited
   this.jLabel_next.setIcon(Instance_hold.getIm_hold().getMcb_grey_fwd_small());
 } // GEN-LAST:event_jLabel_nextMouseExited
Exemplo n.º 10
0
 private void jSlider_MediaMouseEntered(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jSlider_MediaMouseEntered
   Instance_hold.getFsf().getMml().getTimer().cancel();
 } // GEN-LAST:event_jSlider_MediaMouseEntered
Exemplo n.º 11
0
 private void jButton_fullscreenMouseEntered(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jButton_fullscreenMouseEntered
   Instance_hold.getFsf().getMml().getTimer().cancel();
 } // GEN-LAST:event_jButton_fullscreenMouseEntered
Exemplo n.º 12
0
 private void jSlider_volMouseDragged(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jSlider_volMouseDragged
   vo_value = this.jSlider_vol.getValue();
   Instance_hold.getFsf().getEmpc().getMediaPlayer().setVolume(vo_value);
 } // GEN-LAST:event_jSlider_volMouseDragged
Exemplo n.º 13
0
 private void formMouseExited(java.awt.event.MouseEvent evt) { // GEN-FIRST:event_formMouseExited
   Ausblender ausblender = new Ausblender();
   Instance_hold.getFsf().getMml().setTimer(new Timer());
   Instance_hold.getFsf().getMml().getTimer().schedule(ausblender, 2000);
   System.out.println("Exited");
 } // GEN-LAST:event_formMouseExited