|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavazoom.jlgui.player.amp.playlist.BasePlaylist
public class BasePlaylist
BasePlaylist implementation. This class implements Playlist interface using a Vector. It support .m3u and .pls playlist format.
| Field Summary | |
|---|---|
protected int |
_cursorPos
|
protected java.util.Vector |
_playlist
|
protected boolean |
isModified
|
protected java.lang.String |
M3UHome
|
protected java.lang.String |
PLSHome
|
| Constructor Summary | |
|---|---|
BasePlaylist()
Constructor. |
|
| 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 top 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. |
java.lang.String |
getM3UHome()
Get M3U home for relative playlist. |
int |
getPlaylistSize()
Returns then number of items in the playlist. |
java.lang.String |
getPLSHome()
Get PLS home for relative playlist. |
int |
getSelectedIndex()
Returns selected index. |
boolean |
isModified()
Checks the modification flag |
boolean |
load(java.lang.String filename)
Loads playlist as M3U format. |
protected boolean |
loadM3U(java.lang.String filename)
Load playlist from M3U format. |
protected boolean |
loadPLS(java.lang.String filename)
Load playlist in PLS format. |
void |
nextCursor()
Computes cursor position (next). |
void |
previousCursor()
Computes cursor position (previous). |
void |
removeAllItems()
Removes all items from 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 in M3U format. |
void |
setCursor(int index)
|
void |
setM3UHome(java.lang.String string)
Set optional M3U home for relative playlist. |
boolean |
setModified(boolean set)
Set the modification flag for the playlist |
void |
setPLSHome(java.lang.String string)
Set optional PLS home for relative playlist. |
void |
shuffle()
Shuffles items in the playlist randomly |
void |
sortItems(int sortmode)
Sorts items of the playlist. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector _playlist
protected int _cursorPos
protected boolean isModified
protected java.lang.String M3UHome
protected java.lang.String PLSHome
| Constructor Detail |
|---|
public BasePlaylist()
| Method Detail |
|---|
public boolean isModified()
Playlist
isModified in interface Playlistpublic boolean load(java.lang.String filename)
load in interface Playlistprotected boolean loadM3U(java.lang.String filename)
filename -
protected boolean loadPLS(java.lang.String filename)
filename -
public boolean save(java.lang.String filename)
save in interface Playlist
public void addItemAt(PlaylistItem pli,
int pos)
addItemAt in interface Playlistpublic void removeItem(PlaylistItem pli)
removeItem in interface Playlistpublic void removeItemAt(int pos)
removeItemAt in interface Playlistpublic void removeAllItems()
removeAllItems in interface Playlistpublic void appendItem(PlaylistItem pli)
appendItem in interface Playlistpublic void sortItems(int sortmode)
sortItems in interface Playlistpublic void shuffle()
shuffle in interface Playlistpublic void begin()
begin in interface Playlistpublic PlaylistItem getItemAt(int pos)
getItemAt in interface Playlistpublic java.util.Collection getAllItems()
getAllItems in interface Playlistpublic int getPlaylistSize()
getPlaylistSize in interface Playlistpublic PlaylistItem getCursor()
getCursor in interface Playlistpublic void nextCursor()
nextCursor in interface Playlistpublic void previousCursor()
previousCursor in interface Playlistpublic boolean setModified(boolean set)
Playlist
setModified in interface Playlistpublic void setCursor(int index)
setCursor in interface Playlistpublic int getSelectedIndex()
getSelectedIndex in interface Playlistpublic int getIndex(PlaylistItem pli)
getIndex in interface Playlistpublic java.lang.String getM3UHome()
public void setM3UHome(java.lang.String string)
string - public java.lang.String getPLSHome()
public void setPLSHome(java.lang.String string)
string -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||