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.

Author:
E.B from JavaZOOM Homepage : http://www.javazoom.net

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

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


save

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


addItemAt

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


removeItem

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


removeItemAt

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


removeAllItems

public void removeAllItems()
Removes all items in the playlist.


appendItem

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


sortItems

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


getItemAt

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


getAllItems

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


getPlaylistSize

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


shuffle

public void shuffle()
Randomly re-arranges the playlist.


getCursor

public PlaylistItem getCursor()
Returns item matching to the cursor.


begin

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


getSelectedIndex

public int getSelectedIndex()
Returns item matching to the cursor.


getIndex

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


nextCursor

public void nextCursor()
Computes cursor position (next).


previousCursor

public void previousCursor()
Computes cursor position (previous).


setModified

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


isModified

public boolean isModified()
Checks the modification flag


setCursor

public void setCursor(int index)


JavaZOOM 1999-2004