|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ca.bc.webarts.widgets.PlayList
A simple class to encapsulate the storage of references to Ogg files in a Playlist style.
Field Summary | |
private static java.lang.String |
className_
A Class holder for its name (used in Logging). |
protected static Log |
log_
The Log that will get used. |
private static java.lang.String |
logFile_
The Log Filename. |
private java.util.Vector |
songs
This is the meat of the class; it holds OggFileRef objects.* |
private static java.lang.String |
SYSTEM_FILE_SEPERATOR
Description of the Field |
Constructor Summary | |
PlayList()
basic constructor to initialize things. |
|
PlayList(java.net.URL[] urls)
Constructor to get things init and load up an initial list of URLs * |
Method Summary | |
java.lang.String |
addSong(java.net.URL url)
Adds the specified song to the playlist. |
boolean |
contains(java.lang.String songName)
Validates/checks if the requested song is in the list. |
javax.swing.JCheckBox |
createSongCheckBox(int index)
Creates and returns a small JCheckBox with the selected song name and a small checkbox indicating if the song is selected. |
javax.swing.JCheckBox |
createSongCheckBox(java.lang.String songName)
Creates and returns a small JCheckBox with the selected song name and a small checkbox indicating if the song is selected. |
javax.swing.JPanel |
createSongPanel(int index)
Creates and returns a small JPanel with the selected song name and a small checkbox indicating if the song is selected. |
javax.swing.JPanel |
createSongPanel(java.lang.String song)
Creates and returns a small JPanel with the selected song name and a small checkbox indicating if the song is selected. |
int |
findSong(java.lang.String songName)
Finds the song in the playlist with the requested name and returns the index. |
static java.lang.String[] |
getPlaylistArray(java.lang.String[] fileNames)
Parses the passed filenames looking for OGG files. |
java.util.Vector |
getPlaylistVector(java.lang.String fileName)
Parses the passed filename looking for OGG files. |
static java.util.Vector |
getPlaylistVector(java.lang.String[] fileNames)
Parses the passed filenames looking for OGG files. |
java.lang.String[] |
getSongNames()
Gets the SongNames attribute of the PlayList object |
java.util.Vector |
getSongNamesVector()
Gets the SongNamesVector attribute of the PlayList object |
protected java.net.URL[] |
getSongUrls()
Gets the SongUrls attribute of the PlayList object |
java.net.URL |
getURL(java.lang.String songName)
Gets the URL attribute of the PlayList object |
boolean |
isEmpty()
Checks to see if the list of songs in this playlist is empty. |
boolean |
isSongSelected(int songIndex)
Gets the SongSelected attribute of the PlayList object |
boolean |
isSongSelected(java.lang.String songName)
Gets the SongSelected attribute of the PlayList object |
void |
loadPlaylist(java.net.URL filenameURL)
Loads a playlist from the playlist file specified in the playListFilename_ field. |
private java.lang.String |
readline(java.io.InputStream is)
Reads a single line from the InputStream. |
boolean |
removeSong(java.lang.String songName)
Description of the Method |
void |
savePlaylistFile(java.lang.String filename)
Saves the playlist to the file specified in the playListFilename_ field. |
void |
selectSong(int songIndex,
boolean select)
Sets the song 'selected' according to the passed boolean param. |
int |
size()
The number of entries in the PlayList. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final java.lang.String SYSTEM_FILE_SEPERATOR
private java.util.Vector songs
private static java.lang.String className_
private static java.lang.String logFile_
protected static Log log_
Constructor Detail |
public PlayList()
public PlayList(java.net.URL[] urls)
urls
- Description of ParameterMethod Detail |
public static java.lang.String[] getPlaylistArray(java.lang.String[] fileNames)
fileNames
- an array containg files and/or dir names to parse for OGG
files.public static java.util.Vector getPlaylistVector(java.lang.String[] fileNames)
fileNames
- an array containg files and/or dir names to parse for OGG
files.public java.util.Vector getSongNamesVector()
public java.lang.String[] getSongNames()
public java.net.URL getURL(java.lang.String songName)
songName
- Description of Parameterpublic boolean isEmpty()
public java.util.Vector getPlaylistVector(java.lang.String fileName)
fileName
- an String (a file or dir name) to parse for OGG files.public boolean isSongSelected(java.lang.String songName)
songName
- Description of Parameterpublic boolean isSongSelected(int songIndex)
songIndex
- Description of Parameterpublic int findSong(java.lang.String songName)
songName
- Description of Parameterpublic boolean contains(java.lang.String songName)
songName
- Description of Parameterpublic java.lang.String addSong(java.net.URL url)
url
- the specification for the song to add.public javax.swing.JCheckBox createSongCheckBox(java.lang.String songName)
songName
- Description of Parameterpublic javax.swing.JCheckBox createSongCheckBox(int index)
index
- the song num to look uppublic javax.swing.JPanel createSongPanel(int index)
index
- the song num to look uppublic javax.swing.JPanel createSongPanel(java.lang.String song)
song
- the song name to look uppublic int size()
public void selectSong(int songIndex, boolean select)
songIndex
- Description of Parameterselect
- Description of Parameterpublic void loadPlaylist(java.net.URL filenameURL)
filenameURL
- the filename to use as the playlist - specified as a URLpublic void savePlaylistFile(java.lang.String filename)
[playlist] File1=H:\MP3s\U2\October\02 - I Fall Down.mp3 File2=H:\MP3s\Leonard Cohen\01 - Suzanne.mp3 NumberOfEntries=2
filename
- Description of Parameterpublic boolean removeSong(java.lang.String songName)
songName
- Description of Parameterprotected java.net.URL[] getSongUrls()
private java.lang.String readline(java.io.InputStream is)
is
- Description of Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |