|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread comirva.audio.AudioPlaylistPlayer
public class AudioPlaylistPlayer
This class implements a playlist for audio files.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AudioPlaylistPlayer()
Creates a new empty playlist. |
|
AudioPlaylistPlayer(Vector<File> audioFiles)
Creates a new playlist that contains the files given as arguments. |
Method Summary | |
---|---|
void |
addTrack(File audioFile)
Adds a file to the playlist. |
void |
continuePlaying()
Continues the audio output if it is paused. |
File |
getTrack(int position)
Returns the audio file at the given position in the playlist. |
boolean |
isPaused()
Returns whether the audio output is paused. |
void |
pausePlaying()
Pauses the audio output. |
void |
playNext()
Plays the next track of the playlist. |
void |
playPrevious()
Plays the previous track of the playlist. |
void |
removeTrack(int position)
Removes the audio file at the given position in the playlist. |
void |
run()
This method is called when the thread is started. |
void |
stopPlaying()
Stops the audio output. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AudioPlaylistPlayer()
public AudioPlaylistPlayer(Vector<File> audioFiles)
audioFiles
- a Vector containing the files to be inserted into the playlist as File
.Method Detail |
---|
public void run()
run
in interface Runnable
run
in class Thread
Runnable.run()
public void addTrack(File audioFile)
audioFile
- the File to be addedpublic void removeTrack(int position)
position
- the position of the audio file in the playlist that should be removed (starts with 0)public File getTrack(int position)
position
- the position of the audio file in the playlist that should be returned (starts with 0)
public void playNext()
public void playPrevious()
public void pausePlaying()
public void continuePlaying()
public boolean isPaused()
public void stopPlaying()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |