|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.client.gui.sound.Playlist
public final class Playlist
Represent a set of sounds that will be presented to a SoundPlayer in a certain order as defined by the Playlists playmodes.
Field Summary | |
---|---|
static int |
BACKWARDS
This const represents a way in which a sound will be picked from the list. |
static int |
FORWARDS
This const represents a way in which a sound will be picked from the list. |
static int |
PLAY_ALL
This const represents a way in which successive sounds can be played. |
static int |
PLAY_ONE
This const represents a way in which successive sounds can be played. |
static int |
REPEAT_ALL
This const represents a way in which successive sounds can be played. |
static int |
REPEAT_ONE
This const represents a way in which successive sounds can be played. |
static int |
SHUFFLE
This const represents a way in which a sound will be picked from the list. |
Constructor Summary | |
---|---|
Playlist(java.io.File... soundFiles)
The constructor to use. |
|
Playlist(java.io.File[] soundFiles,
int repeatMode,
int pickMode)
The constructor to use. |
Method Summary | |
---|---|
boolean |
hasNext()
Returns false if this Playlist is exhausted, true otherwise. |
java.io.File |
next()
Returns the next sound file on this Playlist or null if there is no such sound. |
void |
setPickMode(int pickMode)
Sets the pick-mode for this playlist. |
void |
setRepeatMode(int repeatMode)
Sets the repeat-mode for this playlist. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PLAY_ALL
public static final int REPEAT_ALL
public static final int PLAY_ONE
public static final int REPEAT_ONE
public static final int FORWARDS
public static final int BACKWARDS
public static final int SHUFFLE
Constructor Detail |
---|
public Playlist(java.io.File... soundFiles)
soundFiles
- The sounds that will make up this Playlist. The order of the sounds is important.public Playlist(java.io.File[] soundFiles, int repeatMode, int pickMode)
soundFiles
- The sounds that will make up this Playlist. The order of the sounds may be important.repeatMode
- Determines how, which and if songs will be repeated. Should be one of {PLAY_ALL, REPEAT_ALL, PLAY_ONE, REPEAT_ONE}.pickMode
- The way in which sounds will be picked from the list. Should be one of {FORWARDS, BACKWARDS, SHUFFLE}.Method Detail |
---|
public void setRepeatMode(int repeatMode)
repeatMode
- The method this PlayList
should be repeated.public void setPickMode(int pickMode)
pickMode
- The method to be used for picking
the songs.public java.io.File next()
public boolean hasNext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |