|
|||||||||
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 Playlist
public boolean load(java.lang.String filename)
load
in interface Playlist
protected 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 Playlist
public void removeItem(PlaylistItem pli)
removeItem
in interface Playlist
public void removeItemAt(int pos)
removeItemAt
in interface Playlist
public void removeAllItems()
removeAllItems
in interface Playlist
public void appendItem(PlaylistItem pli)
appendItem
in interface Playlist
public void sortItems(int sortmode)
sortItems
in interface Playlist
public void shuffle()
shuffle
in interface Playlist
public void begin()
begin
in interface Playlist
public PlaylistItem getItemAt(int pos)
getItemAt
in interface Playlist
public java.util.Collection getAllItems()
getAllItems
in interface Playlist
public int getPlaylistSize()
getPlaylistSize
in interface Playlist
public PlaylistItem getCursor()
getCursor
in interface Playlist
public void nextCursor()
nextCursor
in interface Playlist
public void previousCursor()
previousCursor
in interface Playlist
public boolean setModified(boolean set)
Playlist
setModified
in interface Playlist
public void setCursor(int index)
setCursor
in interface Playlist
public int getSelectedIndex()
getSelectedIndex
in interface Playlist
public int getIndex(PlaylistItem pli)
getIndex
in interface Playlist
public 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 |