at.tuwien.ifs.somtoolbox.apps.viewer.controls.player
Class PlayList
java.lang.Object
at.tuwien.ifs.somtoolbox.apps.viewer.controls.player.PlayList
- All Implemented Interfaces:
- PlayerListener
public class PlayList
- extends Object
- implements PlayerListener
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
plContent
private List<AudioVectorMetaData> plContent
lm
private PlayList.PlayListModel lm
currentSong
private int currentSong
isPlaying
private boolean isPlaying
player
private AudioPlayer player
listeners
private Vector<PlayerListener> listeners
plListeners
private Vector<PlayListListener> plListeners
pllNP
private PlayList.NotificationPostponer pllNP
showFilenames
private boolean showFilenames
PlayList
public PlayList(AudioPlayer player)
PlayList
public PlayList()
addAllSongs
public boolean addAllSongs(List<String> songs)
addAllSongs
public boolean addAllSongs(List<String> songs,
List<File> songfiles)
addSong
public boolean addSong(String song,
File songfile)
addSong
public boolean addSong(String song)
addSong
public void addSong(String song,
File songfile,
int position)
addSong
public void addSong(String song,
int position)
getPlayListItems
public List<AudioVectorMetaData> getPlayListItems()
getSongs
public List<File> getSongs()
getPlayListItem
public AudioVectorMetaData getPlayListItem(int index)
getDataItems
public List<String> getDataItems()
getIndexOf
public int getIndexOf(String id)
removeSong
public AudioVectorMetaData removeSong(int index)
remove
public List<AudioVectorMetaData> remove(int from,
int to)
clearPlaylist
public void clearPlaylist()
next
public void next()
prev
public void prev()
moreToPlay
private boolean moreToPlay()
skip
public boolean skip(int count)
- Parameters:
count
- How many songs to skip
- Returns:
- true if there was a song to skip to, false otherwise.
playStarted
public void playStarted(int mode,
AudioVectorMetaData song)
- Specified by:
playStarted
in interface PlayerListener
playStopped
public void playStopped(int reason,
AudioVectorMetaData song)
- Specified by:
playStopped
in interface PlayerListener
play
public void play(int selectedIndex)
play
public void play()
stop
public void stop()
addPlayerListener
public void addPlayerListener(PlayerListener l)
removePlayerListener
public void removePlayerListener(PlayerListener l)
addPlayListListener
public void addPlayListListener(PlayListListener pll)
removePlayListListener
public void removePlayListListener(PlayListListener pll)
informPlayListListeners
private void informPlayListListeners()
getCurrentSongIndex
public int getCurrentSongIndex()
createMatchingJList
public JList createMatchingJList(boolean addDefaultListeners)
isPlaying
public boolean isPlaying()
setCurrentSong
public void setCurrentSong(int index)