org.lyra.Interface
Class AlbumArtPanel.Interact

java.lang.Object
  extended by org.lyra.Interface.AlbumArtPanel.Interact
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.lang.Runnable, java.util.EventListener, UpdateListener
Enclosing class:
AlbumArtPanel

public class AlbumArtPanel.Interact
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.MouseListener, java.lang.Runnable, UpdateListener

The code separation from the user interface. This Class handles all of the complexities of making the interface interactive.

Author:
Martin Foster

Field Summary
private  java.util.Map<java.lang.String,java.lang.String> cFile
           
private static java.lang.String CLASS
           
private  java.util.Map<java.lang.String,java.lang.String> nFile
           
private  Operations Ops
           
private  AlbumArtPanel.AlbumArtPopup Popup
           
private  java.util.Map<java.lang.String,java.lang.String> State
           
 
Constructor Summary
AlbumArtPanel.Interact()
          Base constructor for class.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
 void hostUpdated(UpdateEvent update)
          Updates of host information as passed through this specific method.
 void mouseClicked(java.awt.event.MouseEvent evt)
           
 void mouseEntered(java.awt.event.MouseEvent evt)
           
 void mouseExited(java.awt.event.MouseEvent evt)
           
 void mousePressed(java.awt.event.MouseEvent evt)
           
 void mouseReleased(java.awt.event.MouseEvent evt)
           
 void run()
           
 void updateArt()
          Updates the Album Art image based on existing information.
private  void updateArt(java.util.Map<java.lang.String,java.lang.String> current)
          Updates the Album Art image based on provided information.
private  java.util.Map<java.lang.String,java.lang.String> updateDetails(java.util.Map<java.lang.String,java.lang.String> state)
          Extracts the information from the org.lyra.Host.Status class and extracts the currently playing song.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cFile

private java.util.Map<java.lang.String,java.lang.String> cFile

nFile

private java.util.Map<java.lang.String,java.lang.String> nFile

State

private java.util.Map<java.lang.String,java.lang.String> State

Popup

private AlbumArtPanel.AlbumArtPopup Popup

Ops

private Operations Ops

CLASS

private static final java.lang.String CLASS
See Also:
Constant Field Values
Constructor Detail

AlbumArtPanel.Interact

public AlbumArtPanel.Interact()
Base constructor for class.

Method Detail

updateArt

public void updateArt()
Updates the Album Art image based on existing information.


updateArt

private void updateArt(java.util.Map<java.lang.String,java.lang.String> current)
Updates the Album Art image based on provided information.

Parameters:
current - Current song information.

updateDetails

private java.util.Map<java.lang.String,java.lang.String> updateDetails(java.util.Map<java.lang.String,java.lang.String> state)
Extracts the information from the org.lyra.Host.Status class and extracts the currently playing song. Based on state and currently playing elements.

Returns:
Map containing current song details.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

hostUpdated

public void hostUpdated(UpdateEvent update)
Description copied from interface: UpdateListener
Updates of host information as passed through this specific method. Multiple updates can be triggered from this, so it becomes important to check for a specific update if necessary in order to avoid undue

Specified by:
hostUpdated in interface UpdateListener
Parameters:
update - Update notification method.
See Also:
UpdateEvent

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

run

public void run()
Specified by:
run in interface java.lang.Runnable