org.lyra.Interface
Class ProfileFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by org.lyra.Interface.ProfileFrame
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class ProfileFrame
extends javax.swing.JFrame

Interface to the Last.fm service providing a profile of a specific album that the user has selected to see. Since there is a potential for a lot of information to be missing elements may be hidden or never put into place.

Since:
1.0.1
Version:
1.0.5, %Revision, 174%, %LastChangedDate, 27/10/12 3:33PM%
Author:
Martin Foster
See Also:
Demarcation, Serialized Form

Nested Class Summary
private  class ProfileFrame.Interact
          The code separation from the user interface.
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JTextArea areaContent
           
private  javax.swing.JTextArea areaSummary
           
private  Demarcation Deploy
           
private  java.util.Map<java.lang.String,java.lang.Object> Details
           
private  java.util.Map<java.lang.String,java.lang.String> Global
           
private  java.awt.Color Hyperlink
           
private  javax.swing.JLabel iconAlbum
           
private  javax.swing.JLabel iconResize
           
private  ProfileFrame.Interact Interface
           
private  javax.swing.JPanel jContentPane
           
private  javax.swing.JLabel labelExpand
           
private  java.util.Map<java.lang.String,java.lang.String> Lang
           
private  Ledger Logger
           
private  java.lang.String myAlbum
           
private  java.lang.String myArtist
           
private  javax.swing.JPanel panelAmplification
           
private  javax.swing.JPanel panelArtist
           
private  javax.swing.JPanel panelContainer
           
private  javax.swing.JPanel panelExpand
           
private  javax.swing.JPanel panelInformation
           
private  javax.swing.JPanel panelRelease
           
private  javax.swing.JPanel panelSimilar
           
private  javax.swing.JPanel panelStatistics
           
private  javax.swing.JPanel panelStatus
           
private  javax.swing.JPanel panelTags
           
private  javax.swing.JPanel panelTitle
           
private static int ROW_LIMIT
           
private  javax.swing.JScrollPane scrollInformation
           
private static long serialVersionUID
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ProfileFrame(Ledger logger, java.util.Map<java.lang.String,java.lang.String> lang, java.util.Map<java.lang.String,java.lang.String> global, java.lang.String artist)
          This is the default constructor for artist profiles.
ProfileFrame(Ledger logger, java.util.Map<java.lang.String,java.lang.String> lang, java.util.Map<java.lang.String,java.lang.String> global, java.lang.String artist, java.lang.String album)
          This is the default constructor for the Album profile.
 
Method Summary
private  javax.swing.JTextArea getAreaContent()
          This method initialises areaContent.
private  javax.swing.JTextArea getAreaSummary()
          This method initialises areaSummary.
private  javax.swing.JLabel getIconAlbum(java.net.URL link)
          Returns the Album Art for a specific album.
private  javax.swing.JLabel getIconResize()
          This method initialises iconResize.
private  javax.swing.JPanel getJContentPane()
          This method initialises jContentPane.
private  javax.swing.JLabel getLabelExpand()
          This method initialises labelExpand.
private  javax.swing.JLabel getLabelTags(java.lang.String name, java.net.URL link)
          Creates a tag that looks like a hyper link and can be clicked in order to bring up a browser to the Last.fm service information.
private  javax.swing.JPanel getPanelAmplification()
          This method initialises panelAmplification.
private  javax.swing.JPanel getPanelArtist()
          This method initialises panelArtist.
private  javax.swing.JPanel getPanelContainer()
          This method initialises panelContainer.
private  javax.swing.JPanel getPanelExpand()
          This method initialises panelExpand.
private  javax.swing.JPanel getPanelInformation()
          This method initialises panelInformation.
private  javax.swing.JPanel getPanelPurchase(java.lang.String name, java.net.URL link)
          This method initialises panelPurchase.
private  javax.swing.JPanel getPanelRelease()
          This method initialises panelRelease.
private  javax.swing.JPanel getPanelSimilar()
          This method initialises panelSimilar.
private  javax.swing.JPanel getPanelStatistics()
          This method initialises panelStatistics.
private  javax.swing.JPanel getPanelStatus()
          This method initialises panelWindow.
private  javax.swing.JPanel getPanelTags()
          This method initialises panelTags.
private  javax.swing.JPanel getPanelTitle()
          This method initialises panelTitle.
private  javax.swing.JScrollPane getScrollInformation()
          Contains the information pane allowing it to expand without having to resize the window to view all of the contents.
private  void initFrame()
          This method initialises this.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

jContentPane

private javax.swing.JPanel jContentPane

panelContainer

private javax.swing.JPanel panelContainer

panelAmplification

private javax.swing.JPanel panelAmplification

iconAlbum

private javax.swing.JLabel iconAlbum

scrollInformation

private javax.swing.JScrollPane scrollInformation

panelInformation

private javax.swing.JPanel panelInformation

panelTitle

private javax.swing.JPanel panelTitle

panelArtist

private javax.swing.JPanel panelArtist

panelRelease

private javax.swing.JPanel panelRelease

panelStatistics

private javax.swing.JPanel panelStatistics

panelTags

private javax.swing.JPanel panelTags

panelSimilar

private javax.swing.JPanel panelSimilar

areaSummary

private javax.swing.JTextArea areaSummary

areaContent

private javax.swing.JTextArea areaContent

panelExpand

private javax.swing.JPanel panelExpand

labelExpand

private javax.swing.JLabel labelExpand

panelStatus

private javax.swing.JPanel panelStatus

iconResize

private javax.swing.JLabel iconResize

Logger

private Ledger Logger

Lang

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

Global

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

Interface

private ProfileFrame.Interact Interface

Deploy

private Demarcation Deploy

Hyperlink

private java.awt.Color Hyperlink

Details

private java.util.Map<java.lang.String,java.lang.Object> Details

myAlbum

private java.lang.String myAlbum

myArtist

private java.lang.String myArtist

ROW_LIMIT

private static final int ROW_LIMIT
See Also:
Constant Field Values
Constructor Detail

ProfileFrame

public ProfileFrame(Ledger logger,
                    java.util.Map<java.lang.String,java.lang.String> lang,
                    java.util.Map<java.lang.String,java.lang.String> global,
                    java.lang.String artist,
                    java.lang.String album)
This is the default constructor for the Album profile. Due to the dynamic nature of the information, there is no Visual Editor constructor available.

Parameters:
logger - Ledger instance for logging and status.
lang - Language map for language independence.
global - Global settings map.
artist - Artist name.
album - Artist name.

ProfileFrame

public ProfileFrame(Ledger logger,
                    java.util.Map<java.lang.String,java.lang.String> lang,
                    java.util.Map<java.lang.String,java.lang.String> global,
                    java.lang.String artist)
This is the default constructor for artist profiles. Due to the dynamic nature of the information, there is no Visual Editor constructor available.

Parameters:
logger - Ledger instance for logging and status.
lang - Language map for language independence.
global - Global settings map.
artist - Artist name.
Method Detail

initFrame

private void initFrame()
This method initialises this. Establishes the baseline features of look and feel for the frame itself.


getJContentPane

private javax.swing.JPanel getJContentPane()
This method initialises jContentPane. Primary container which contains all of the other user interface elements.

Returns:
javax.swing.JPanel

getPanelAmplification

private javax.swing.JPanel getPanelAmplification()
This method initialises panelAmplification. Contains user interface elements that are not necessary for display but provide additional amplification. Such as the album picture and purchase information.

Returns:
javax.swing.JPanel

getIconAlbum

private javax.swing.JLabel getIconAlbum(java.net.URL link)
Returns the Album Art for a specific album. Passed a specific URL which will cause a request to the Internet.

Parameters:
link - URL to the image itself.
Returns:
javax.swing.JLabel

getScrollInformation

private javax.swing.JScrollPane getScrollInformation()
Contains the information pane allowing it to expand without having to resize the window to view all of the contents.

Returns:
javax.swing.JScrollPane

getPanelInformation

private javax.swing.JPanel getPanelInformation()
This method initialises panelInformation. The information panel contains the bulk of the profile information. Most of these are subsequently in their own panels in order to enforce justification.

Returns:
javax.swing.JPanel

getPanelPurchase

private javax.swing.JPanel getPanelPurchase(java.lang.String name,
                                            java.net.URL link)
This method initialises panelPurchase. These elements are generated dynamically. So there is no particular need to tie up resources up at the class level for their instances.

Returns:
javax.swing.JPanel

getPanelTitle

private javax.swing.JPanel getPanelTitle()
This method initialises panelTitle. Displays the album title.

Returns:
javax.swing.JPanel

getPanelArtist

private javax.swing.JPanel getPanelArtist()
This method initialises panelArtist. Artist is only slightly more complex then Album as it has a prefix element that is required.

Returns:
javax.swing.JPanel

getPanelRelease

private javax.swing.JPanel getPanelRelease()
This method initialises panelRelease. Release is only slightly more complex then Album as it has a prefix element that is required.

Returns:
javax.swing.JPanel

getPanelStatistics

private javax.swing.JPanel getPanelStatistics()
This method initialises panelStatistics. Basic information on the hits on an album, in this case the amount of plays and listeners.

Returns:
javax.swing.JPanel

getPanelTags

private javax.swing.JPanel getPanelTags()
This method initialises panelTags. Tags provide an additional criteria with which a user can use to find similarities.

Returns:
javax.swing.JPanel

getPanelSimilar

private javax.swing.JPanel getPanelSimilar()
This method initialises panelSimilar. Similar provide an additional criteria with which a user can use to find common interests.

Returns:
javax.swing.JPanel

getLabelTags

private javax.swing.JLabel getLabelTags(java.lang.String name,
                                        java.net.URL link)
Creates a tag that looks like a hyper link and can be clicked in order to bring up a browser to the Last.fm service information.

Parameters:
name - Name of the tag.
link - URL instance to the site.
Returns:
javax.swing.JLabel;

getAreaSummary

private javax.swing.JTextArea getAreaSummary()
This method initialises areaSummary. Contains a summary of the wiki entry allowing the user to expand if they so choose.

Returns:
javax.swing.JTextArea

getAreaContent

private javax.swing.JTextArea getAreaContent()
This method initialises areaContent. Contains the full content of the wiki on the album.

Returns:
javax.swing.JTextArea

getPanelExpand

private javax.swing.JPanel getPanelExpand()
This method initialises panelExpand. Provides an expansion capability to bring forth the full text.

Returns:
javax.swing.JPanel

getLabelExpand

private javax.swing.JLabel getLabelExpand()
This method initialises labelExpand. Permits the user to expand the summary element.

Returns:
javax.swing.JLabel

getPanelContainer

private javax.swing.JPanel getPanelContainer()
This method initialises panelContainer. Contains the primary interface in order to have the necessary layout. The window resize elements fall outside of this particular layout.

Returns:
javax.swing.JPanel

getPanelStatus

private javax.swing.JPanel getPanelStatus()
This method initialises panelWindow. Contains nothing more then the resize element for creating a consistent look and feel.

Returns:
javax.swing.JPanel

getIconResize

private javax.swing.JLabel getIconResize()
This method initialises iconResize.

Returns:
javax.swing.JLabel