1 /* 2 * Created on Jun 20, 2005 3 * 4 */ 5 package org.musicontroller.gui.components; 6 7 import org.apache.tapestry.BaseComponent; 8 9 /** 10 * This component shows a list of playlists. This component can show the cover art, 11 * playlist name, release date, a request button, a download button and a link to the 12 * playlist edit page for each playlist in the list. Displaying the cover art, playlist link 13 * and the edit link is optional and can be controlled using parameters: 14 * 15 * <ul> 16 * <li><code>displayPlaylistLink</code> controls the visibility of the playlist links. 17 * <li><code>displayReleaseDate</code> controls the visibility of the cover art images. 18 * <li><code>displayEditLink</code> controls the visibility of the link to the playlist edit page. 19 * </ul> 20 * 21 * @author Arjan Verstoep 22 * @version $Id: PlaylistList.java,v 1.1 2010/03/16 18:55:42 varienaja Exp $ 23 */ 24 public abstract class PlaylistList extends BaseComponent { 25 26 /** 27 * Getter for this components <code>displayPlaylistLink</code> parameter. 28 * @return The value of this components <code>displayPlaylistLink</code> parameter 29 */ 30 public abstract boolean getDisplayPlaylistLink(); 31 32 /** 33 * Returns the Css style class of this Playlist list. The class 34 * depends on the settings of the <code>displayPlaylistLink</code> 35 * parameter. 36 * 37 * @return The appropriate CSS class name of this component. 38 */ 39 public String getPlaylistListCssClass() { 40 if(getDisplayPlaylistLink()) { 41 return "playlistlistitem"; 42 } else { 43 return "shortplaylistlistitem"; 44 } 45 } 46 }