com.evolution.player.ui.artwork
Class AlbumCoverView

java.lang.Object
  extended by com.evolution.player.ui.artwork.SongContextView
      extended by com.evolution.player.ui.artwork.AlbumCoverView

public abstract class AlbumCoverView
extends SongContextView

An album cover view is a song context view which retrieves the current album cover if any is available or a failure message explaining why no album cover is available. The view does also retrieve all available album artwork decorations. Its guaranteed, that setArtwork(URL, Action), setFailureMessage(String), and #decorate(Decoration[]) is called between SongContextView.activate() and SongContextView.deactivate(). This methods are called in the UI thread.

Since:
0.6
See Also:
AlbumArtworkProvider, AlbumArtworkDecorator

Nested Class Summary
 
Nested classes/interfaces inherited from class com.evolution.player.ui.artwork.SongContextView
SongContextView.IInitializationData
 
Constructor Summary
AlbumCoverView()
           
 
Method Summary
abstract  void decorate(AlbumArtworkDecorator.Decoration[] decorations)
          All decorations for the current artwork.
abstract  void setArtwork(java.net.URL image, Action action)
          Set the current album cover.
abstract  void setFailureMessage(java.lang.String message)
          A artwork could not be retrieved, the message says why.
 
Methods inherited from class com.evolution.player.ui.artwork.SongContextView
activate, createContent, deactivate, getToolBarActions, initialize, setCurrentSong
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlbumCoverView

public AlbumCoverView()
Method Detail

setArtwork

public abstract void setArtwork(java.net.URL image,
                                Action action)
Set the current album cover. The image URL points to the cover image. The action is the covers main action. It's the action to execute when the users selects the image.

Parameters:
image - the cover artwork image
action - the main action to execute if artwork is selected

setFailureMessage

public abstract void setFailureMessage(java.lang.String message)
A artwork could not be retrieved, the message says why.

Parameters:
message - the message explaining why no artwork could be retrieved

decorate

public abstract void decorate(AlbumArtworkDecorator.Decoration[] decorations)
All decorations for the current artwork.

Parameters:
decorations - the decorations to use to decorate the cover