javazoom.jlgui.player.amp.playlist
Interface Playlist

All Known Implementing Classes:
BasePlaylist

public interface Playlist

Playlist. This interface defines method that a playlist should implement.
A playlist provides a collection of item to play and a cursor to know which item is playing.


Method Summary
 void addItemAt(PlaylistItem pli, int pos)
          Adds item at a given position in the playlist.
 void appendItem(PlaylistItem pli)
          Append item at the end of the playlist.
 void begin()
          Moves the cursor at the begining of the Playlist.
 java.util.Collection getAllItems()
          Returns a collection of playlist items.
 PlaylistItem getCursor()
          Returns item matching to the cursor.
 int getIndex(PlaylistItem pli)
          Returns index of playlist item.
 PlaylistItem getItemAt(int pos)
          Returns item at a given position from the playlist.
 int getPlaylistSize()
          Returns then number of items in the playlist.
 int getSelectedIndex()
          Returns item matching to the cursor.
 boolean isModified()
          Checks the modification flag
 boolean load(java.lang.String filename)
          Loads playlist.
 void nextCursor()
          Computes cursor position (next).
 void previousCursor()
          Computes cursor position (previous).
 void removeAllItems()
          Removes all items in the playlist.
 void removeItem(PlaylistItem pli)
          Searchs and removes item from the playlist.
 void removeItemAt(int pos)
          Removes item at a given position from the playlist.
 boolean save(java.lang.String filename)
          Saves playlist.
 void setCursor(int index)
           
 boolean setModified(boolean set)
          Set the modification flag for the playlist
 void shuffle()
          Randomly re-arranges the playlist.
 void sortItems(int sortmode)
          Sorts items of the playlist.
 

Method Detail

load

boolean load(java.lang.String filename)
Loads playlist.


save

boolean save(java.lang.String filename)
Saves playlist.


addItemAt

void addItemAt(PlaylistItem pli,
               int pos)
Adds item at a given position in the playlist.


removeItem

void removeItem(PlaylistItem pli)
Searchs and removes item from the playlist.


removeItemAt

void removeItemAt(int pos)
Removes item at a given position from the playlist.


removeAllItems

void removeAllItems()
Removes all items in the playlist.


appendItem

void appendItem(PlaylistItem pli)
Append item at the end of the playlist.


sortItems

void sortItems(int sortmode)
Sorts items of the playlist.


getItemAt

PlaylistItem getItemAt(int pos)
Returns item at a given position from the playlist.


getAllItems

java.util.Collection getAllItems()
Returns a collection of playlist items.


getPlaylistSize

int getPlaylistSize()
Returns then number of items in the playlist.


shuffle

void shuffle()
Randomly re-arranges the playlist.


getCursor

PlaylistItem getCursor()
Returns item matching to the cursor.


begin

void begin()
Moves the cursor at the begining of the Playlist.


getSelectedIndex

int getSelectedIndex()
Returns item matching to the cursor.


getIndex

int getIndex(PlaylistItem pli)
Returns index of playlist item.


nextCursor

void nextCursor()
Computes cursor position (next).


previousCursor

void previousCursor()
Computes cursor position (previous).


setModified

boolean setModified(boolean set)
Set the modification flag for the playlist


isModified

boolean isModified()
Checks the modification flag


setCursor

void setCursor(int index)


JavaZOOM 1999-2006