com.limegroup.gnutella.gui.mp3
Class MediaPlayerComponent

java.lang.Object
  extended bycom.limegroup.gnutella.gui.mp3.MediaPlayerComponent
All Implemented Interfaces:
AudioPlayerListener, RefreshListener, ThemeObserver

public final class MediaPlayerComponent
extends java.lang.Object
implements AudioPlayerListener, RefreshListener, ThemeObserver

This class sets up JPanel with MediaPlayer on it, and takes care of GUI MediaPlayer events.


Constructor Summary
MediaPlayerComponent()
          Constructs a new MediaPlayerComponent.
 
Method Summary
static void audioFileDoubleClicked()
          Call this when a audio file in the PlayList has been doubleclicked.
 javax.swing.JPanel getMediaPanel()
           
static void launchAudio(java.io.File toPlay)
          call this when you want to launch a file to play.
 void playComplete()
          playComplete - signifies when an audio file has finished playing Implements one method of BasicPlayerListener Interface.
 void refresh()
          Called when a UI refresh event has occurred.
 void setUpSeek(int lengthInFrames)
          setUpSeek - called before playing a audio file - gets the size of the audio file in frames - sets the maximum slider value Implements one method of AudioPlayerListener Interface.
 void updateAudioPosition(int value)
          Notification that the time position of the audio file has been updated.
 void updateTheme()
          Update any required theme settings, such as colors or images.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaPlayerComponent

public MediaPlayerComponent()
Constructs a new MediaPlayerComponent.

Method Detail

updateTheme

public void updateTheme()
Description copied from interface: ThemeObserver
Update any required theme settings, such as colors or images.

Specified by:
updateTheme in interface ThemeObserver

getMediaPanel

public javax.swing.JPanel getMediaPanel()

launchAudio

public static void launchAudio(java.io.File toPlay)
call this when you want to launch a file to play.


playComplete

public void playComplete()
playComplete - signifies when an audio file has finished playing Implements one method of BasicPlayerListener Interface.

Specified by:
playComplete in interface AudioPlayerListener

setUpSeek

public void setUpSeek(int lengthInFrames)
setUpSeek - called before playing a audio file - gets the size of the audio file in frames - sets the maximum slider value Implements one method of AudioPlayerListener Interface.

Specified by:
setUpSeek in interface AudioPlayerListener

audioFileDoubleClicked

public static void audioFileDoubleClicked()
Call this when a audio file in the PlayList has been doubleclicked.


updateAudioPosition

public void updateAudioPosition(int value)
Description copied from interface: AudioPlayerListener
Notification that the time position of the audio file has been updated.

Specified by:
updateAudioPosition in interface AudioPlayerListener
Parameters:
value - the new position of the audio file in its playback

refresh

public void refresh()
Description copied from interface: RefreshListener
Called when a UI refresh event has occurred. Refresh any elements of this component that need refreshing.

Specified by:
refresh in interface RefreshListener