net.sourceforge.atunes.kernel.handlers
Class MultiplePlaylistHandler

java.lang.Object
  extended by net.sourceforge.atunes.kernel.handlers.MultiplePlaylistHandler

public class MultiplePlaylistHandler
extends java.lang.Object

The Class MultiplePlaylistHandler.


Method Summary
 void addListOfPlayLists(ListOfPlayLists list)
          Adds a playlist.
 boolean checkIfPlayListsContainsAudioObjects(java.util.List<AudioFile> audioObjects)
          Check if any of audio objects are in any of the playlists.
 void deletePlayList(int index)
          Deletes play list referred by index.
 PlayList getCurrentPlayList()
           
 int getCurrentPlayListIndex()
          Gets the current play list index.
static MultiplePlaylistHandler getInstance()
          Gets the single instance of MultiplePlaylistHandler.
 ListOfPlayLists getListOfPlayLists()
          Gets the list of play lists.
 void newPlayList(java.util.List<AudioObject> audioObjects)
          Called to create a new play list with given audio objects.
 void newPlayList(java.lang.String nameOfNewPlayList, java.util.List<AudioObject> audioObjects)
          Called to create a new play list with given audio objects.
 boolean removeSongsFromOtherPlayLists(java.util.List<AudioFile> audioFiles)
          Removes songs from other playlists than current one.
 void renamePlayList(int index, java.lang.String newName)
          Renames a play list.
 void setCurrentPlayList(PlayList playList)
           
protected static void setPlayList(PlayList playList)
          Sets the play list.
 void switchToPlaylist(int index)
          Called when switching play list at tabbed pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MultiplePlaylistHandler getInstance()
Gets the single instance of MultiplePlaylistHandler.

Returns:
single instance of MultiplePlaylistHandler

addListOfPlayLists

public void addListOfPlayLists(ListOfPlayLists list)
Adds a playlist.

Parameters:
list - the list

checkIfPlayListsContainsAudioObjects

public boolean checkIfPlayListsContainsAudioObjects(java.util.List<AudioFile> audioObjects)
Check if any of audio objects are in any of the playlists.

Parameters:
audioObjects - the audio objects
Returns:
true, if check if play lists contains audio objects

deletePlayList

public void deletePlayList(int index)
Deletes play list referred by index.

Parameters:
index - the index

getListOfPlayLists

public ListOfPlayLists getListOfPlayLists()
Gets the list of play lists.

Returns:
the list of play lists

newPlayList

public void newPlayList(java.util.List<AudioObject> audioObjects)
Called to create a new play list with given audio objects.

Parameters:
audioObjects - the audio objects

newPlayList

public void newPlayList(java.lang.String nameOfNewPlayList,
                        java.util.List<AudioObject> audioObjects)
Called to create a new play list with given audio objects.

Parameters:
nameOfNewPlayList - the name of the new play list as shown in play list tab
audioObjects - the audio objects to add to the new play list

removeSongsFromOtherPlayLists

public boolean removeSongsFromOtherPlayLists(java.util.List<AudioFile> audioFiles)
Removes songs from other playlists than current one.

Parameters:
audioFiles - the audio files
Returns:
true if any song has been removed

renamePlayList

public void renamePlayList(int index,
                           java.lang.String newName)
Renames a play list.

Parameters:
index - the index
newName - the new name

switchToPlaylist

public void switchToPlaylist(int index)
Called when switching play list at tabbed pane.

Parameters:
index - the index

setPlayList

protected static void setPlayList(PlayList playList)
Sets the play list.

Parameters:
playList - the new play list

getCurrentPlayListIndex

public int getCurrentPlayListIndex()
Gets the current play list index.

Returns:
the currentPlayListIndex

getCurrentPlayList

public PlayList getCurrentPlayList()

setCurrentPlayList

public void setCurrentPlayList(PlayList playList)


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.