Class InfoViewTP
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.jackmeng.halcyoninae.cosmos.components.toppane.layout.InfoViewTP
- All Implemented Interfaces:
ComponentListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible
This class sits on the most upper part of the GUI frame.
It displays a simple list of information regarding the current
stream and nothing else.
This panel does not show every information available, but only a specific part.
If the user wants to know more about the audio file
- Since:
- 3.0
- Author:
- Jack Meng
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn extended listener for any classes that want to get events regarding any info changes.Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JLabelprivate booleanprivate final JPanelprivate BufferedImageprivate final booleanprivate AudioInfoprivate final JPanelprivate final JLabel[]Label 1 : Title Label Label 2 : Author Label Label 3 : Misc Labelprivate String(package private) final intstatic final String(package private) final ImageIcon(package private) final int(package private) final int(package private) final intprivate final ArrayList<InfoViewTP.InfoViewUpdateListener>Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidThis method alerts every linked listener about the new info being updatedprivate void__refresh_draw_bg_img(boolean draw_as_first) Schedules a drawing event on the SWT to update the background image of the backdrop.private void__reset_artwork_lowicon(boolean beSmart) voidAdds a listener to this GUI component, if this listener from that class wants information regarding any updates.voidvoidvoidvoidgetInfo()private voidinfoToString(AudioInfo info, String text, boolean beSmart) This internal method converts the given audio info into the string information.voidThis method is pinged whenever the information regarding the current audio file needs updating.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, updateMethods 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, transferFocusDownCycle, validate, validateTreeMethods 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
INFOVIEW_DISK_NO_FILE_LOADED_ICON
- See Also:
-
INFOVIEW_DISK_NO_FILE_LOADED_ICON_ICON
-
INFOVIEW_MIN_WIDTH
final int INFOVIEW_MIN_WIDTH- See Also:
-
INFOVIEW_MIN_HEIGHT
final int INFOVIEW_MIN_HEIGHT- See Also:
-
INFOVIEW_ARTWORK_RESIZE_TO_HEIGHT
final int INFOVIEW_ARTWORK_RESIZE_TO_HEIGHT- See Also:
-
INFOVIEW_FLOWLAYOUT_HGAP
final int INFOVIEW_FLOWLAYOUT_HGAP- See Also:
-
backPanel
-
infoDisplay
-
infoDisplayers
Label 1 : Title Label Label 2 : Author Label Label 3 : Misc Label -
artWork
-
listeners
-
backPanelArt
-
info
-
infoTitle
-
artWorkIsDefault
private boolean artWorkIsDefault -
disable_backpanel
private final boolean disable_backpanel- See Also:
-
-
Constructor Details
-
InfoViewTP
public InfoViewTP()
-
-
Method Details
-
__refresh_draw_bg_img
private void __refresh_draw_bg_img(boolean draw_as_first) Schedules a drawing event on the SWT to update the background image of the backdrop.- Parameters:
draw_as_first- Determines if the drawing should perform as if it is the first time being drawn
-
setAssets
This method is pinged whenever the information regarding the current audio file needs updating.Mostly when the user selects a new track to play.
- Parameters:
f- The audio track to playFile
-
__dispatch_
private void __dispatch_()This method alerts every linked listener about the new info being updatedThis method is threaded in order to blocking other functionalities.
-
__reset_artwork_lowicon
private void __reset_artwork_lowicon(boolean beSmart) - Parameters:
beSmart-
-
addInfoViewUpdateListener
Adds a listener to this GUI component, if this listener from that class wants information regarding any updates.- Parameters:
l- A listener that can be called
-
infoToString
This internal method converts the given audio info into the string information. This string text displays the following information;- Title of the track
- Artist of the track
- Bitrate, SampleRate, and Duration
- Parameters:
info- The track to generate the information off oftext- The title of the trackbeSmart- Tells the parser to be smart and guess certain details.
-
getInfo
- Returns:
- AudioInfo
-
componentResized
- Specified by:
componentResizedin interfaceComponentListener- Parameters:
e-
-
componentMoved
- Specified by:
componentMovedin interfaceComponentListener- Parameters:
e-
-
componentShown
- Specified by:
componentShownin interfaceComponentListener- Parameters:
e-
-
componentHidden
- Specified by:
componentHiddenin interfaceComponentListener- Parameters:
e-
-