|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.lyra.Interface.PlayerPanel
public class PlayerPanel
This class serves as the primary interface for the PlayerOrganiserFrame class. While that class deals with finding and selecting songs for play this panel provides the missing functionality which will permit it to control play back.
PlayerOrganiserFrame
,
Serialized FormNested Class Summary | |
---|---|
private class |
PlayerPanel.Interact
The code separation from the user interface. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
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.JButton |
buttonBack
|
private javax.swing.JButton |
buttonCrossfade
|
private javax.swing.JButton |
buttonNext
|
private javax.swing.JButton |
buttonPlay
|
private javax.swing.JButton |
buttonStop
|
private javax.swing.JButton |
buttonVolume
|
private Playback |
Control
|
private CrossfadeMenu |
CrossfadeControl
|
private javax.swing.JPopupMenu |
CrossfadePopup
|
private java.util.Set<java.lang.String> |
Enabled
|
private java.util.Map<java.lang.String,java.lang.String> |
Global
|
private javax.swing.ImageIcon |
iconMute
|
private javax.swing.ImageIcon |
iconPause
|
private javax.swing.ImageIcon |
iconPlay
|
private javax.swing.ImageIcon |
iconVolume
|
private Status |
Information
|
private PlayerPanel.Interact |
Interface
|
private javax.swing.JLabel |
labelTime
|
private javax.swing.JLabel |
labelTitle
|
private java.util.Map<java.lang.String,java.lang.String> |
Lang
|
private Ledger |
Logger
|
private Comptroller |
Manager
|
private Options |
Modes
|
private javax.swing.JPanel |
panelControl
|
private javax.swing.JPanel |
panelDisplay
|
private javax.swing.JPanel |
panelInformation
|
private javax.swing.JPanel |
panelTime
|
private javax.swing.JPanel |
panelTitle
|
private java.awt.Frame |
Parent
|
private static long |
serialVersionUID
|
private javax.swing.JSlider |
sliderProgress
|
private static int |
TICKER_WIDTH
|
private javax.swing.JToggleButton |
toggleRandom
|
private javax.swing.JToggleButton |
toggleRepeat
|
private javax.swing.JToggleButton |
toggleSingle
|
private VolumeMenu |
VolumeControl
|
private javax.swing.JPopupMenu |
VolumePopup
|
private Updater |
Watcher
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
PlayerPanel(Ledger logger,
Comptroller manager,
Status information,
Playback control,
Options modes,
Updater watcher,
Pendulum clock,
java.util.Map<java.lang.String,java.lang.String> global,
java.util.Map<java.lang.String,java.lang.String> lang,
java.awt.Frame parent)
Primary constructor class for this component. |
Method Summary | |
---|---|
private javax.swing.JButton |
getButtonBack()
This method initialises buttonBack. |
private javax.swing.JButton |
getButtonCrossfade()
This method initialises buttonCrossfade. |
private javax.swing.JButton |
getButtonNext()
This method initialises playerNext. |
private javax.swing.JButton |
getButtonPlay()
This method initialises buttonPlay. |
private javax.swing.JButton |
getButtonStop()
This method initialises buttonStop. |
private javax.swing.JButton |
getButtonVolume()
This method initialises buttonVolume. |
private javax.swing.ImageIcon |
getIconMute()
This method initialises iconMute. |
private javax.swing.ImageIcon |
getIconPause()
This method initialises iconPause. |
private javax.swing.ImageIcon |
getIconPlay()
This method initialises iconPlay. |
private javax.swing.ImageIcon |
getIconVolume()
This method initialises iconVolume. |
private javax.swing.JLabel |
getLabelTime()
This method initialises labelTime. |
private javax.swing.JLabel |
getLabelTitle()
This method initialises labelTitle. |
private javax.swing.JPanel |
getPanelControl()
This method initialises panelControl. |
private javax.swing.JPanel |
getPanelDisplay()
Group container which will carry both the informational display and the album art display from the Last.fm service. |
private javax.swing.JPanel |
getPanelInformation()
This method initialises panelInformation. |
private javax.swing.JPanel |
getPanelTime()
This method initialises labelTime. |
private javax.swing.JPanel |
getPanelTitle()
This method initialises labelTitle. |
private javax.swing.JSlider |
getSliderProgress()
This method initialises sliderProgress |
private javax.swing.JToggleButton |
getToggleRandom()
This method initialises toggleRandom. |
private javax.swing.JToggleButton |
getToggleRepeat()
This method initialises toggleRepeat. |
private javax.swing.JToggleButton |
getToggleSingle()
This method initialises toggleSingle. |
private void |
initFrame()
This method initialises the baseline structure. |
void |
setButtonPlayAsPause()
Adjusts the icon for the play button setting it to a pause icon. |
void |
setButtonPlayAsPlay()
Adjusts the icon for the play button setting it to a play icon. |
void |
setButtonVolumeAsMute()
Adjusts the icon for the volume button setting it to a mute icon. |
void |
setButtonVolumeAsVolume()
Adjusts the icon for the play button setting it to a play icon. |
void |
setLabelTime(int elapsed,
int total)
Sets the display label for the time field. |
void |
setLabelTitle(java.lang.String title)
Sets the display label for the title field. |
void |
setSliderProgress(int elapsed,
int total)
Sets the slider of the position and capacity. |
void |
setToggleRandom(boolean state)
Adjusts the state information for the toggle button. |
void |
setToggleRepeat(boolean state)
Adjusts the state information for the toggle button. |
void |
setToggleSingle(boolean state)
Adjusts the state information for the toggle button. |
void |
updateDisplay()
Updates the elements that have been skipped over when the window is not currently being displayed. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private javax.swing.JPanel panelDisplay
private javax.swing.JPanel panelInformation
private javax.swing.JLabel labelTitle
private javax.swing.JPanel panelTitle
private javax.swing.JLabel labelTime
private javax.swing.JPanel panelTime
private javax.swing.JSlider sliderProgress
private javax.swing.JPanel panelControl
private javax.swing.JButton buttonBack
private javax.swing.JButton buttonPlay
private javax.swing.JButton buttonNext
private javax.swing.JButton buttonStop
private javax.swing.JButton buttonVolume
private javax.swing.JButton buttonCrossfade
private javax.swing.JToggleButton toggleRandom
private javax.swing.JToggleButton toggleRepeat
private javax.swing.JToggleButton toggleSingle
private javax.swing.ImageIcon iconPlay
private javax.swing.ImageIcon iconPause
private javax.swing.ImageIcon iconVolume
private javax.swing.ImageIcon iconMute
private PlayerPanel.Interact Interface
private Comptroller Manager
private Ledger Logger
private Status Information
private Playback Control
private Options Modes
private VolumeMenu VolumeControl
private javax.swing.JPopupMenu VolumePopup
private CrossfadeMenu CrossfadeControl
private javax.swing.JPopupMenu CrossfadePopup
private java.util.Map<java.lang.String,java.lang.String> Lang
private java.util.Map<java.lang.String,java.lang.String> Global
private java.util.Set<java.lang.String> Enabled
private Updater Watcher
private java.awt.Frame Parent
private static final int TICKER_WIDTH
Constructor Detail |
---|
public PlayerPanel(Ledger logger, Comptroller manager, Status information, Playback control, Options modes, Updater watcher, Pendulum clock, java.util.Map<java.lang.String,java.lang.String> global, java.util.Map<java.lang.String,java.lang.String> lang, java.awt.Frame parent)
logger
- Ledger instance for logging of events.manager
- Database comptroller instance.information
- State and status information for playback and modes.control
- Playback control instance.modes
- Options handler for control host Options.watcher
- Updater instance to receive changes in player state.clock
- Timer to keep players up to date.global
- Global settings.lang
- Language elements.parent
- Parent holding window.Method Detail |
---|
private void initFrame()
private javax.swing.JButton getButtonBack()
private javax.swing.JButton getButtonPlay()
private javax.swing.JButton getButtonNext()
private javax.swing.JButton getButtonStop()
private javax.swing.JPanel getPanelInformation()
private javax.swing.JPanel getPanelDisplay()
private javax.swing.JLabel getLabelTime()
private javax.swing.JLabel getLabelTitle()
private javax.swing.JPanel getPanelTitle()
private javax.swing.JPanel getPanelTime()
private javax.swing.JSlider getSliderProgress()
private javax.swing.JButton getButtonVolume()
private javax.swing.JButton getButtonCrossfade()
private javax.swing.JToggleButton getToggleRandom()
private javax.swing.JToggleButton getToggleRepeat()
private javax.swing.JToggleButton getToggleSingle()
private javax.swing.JPanel getPanelControl()
private javax.swing.ImageIcon getIconPlay()
private javax.swing.ImageIcon getIconPause()
private javax.swing.ImageIcon getIconVolume()
private javax.swing.ImageIcon getIconMute()
public void setButtonPlayAsPause()
public void setButtonPlayAsPlay()
public void setButtonVolumeAsMute()
public void setButtonVolumeAsVolume()
public void setToggleRandom(boolean state)
state
- Boolean containing state information.public void setToggleRepeat(boolean state)
state
- Boolean containing state information.public void setToggleSingle(boolean state)
state
- Boolean containing state information.public void setLabelTitle(java.lang.String title)
title
- String carrying title name.public void setSliderProgress(int elapsed, int total)
elapsed
- Integer carrying current runtime.total
- Integer representing total play time.public void setLabelTime(int elapsed, int total)
elapsed
- Integer carrying current runtime.total
- Integer representing total play time.public void updateDisplay()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |