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

public class InfoViewTP extends JPanel implements ComponentListener
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:
  • Field Details

    • INFOVIEW_DISK_NO_FILE_LOADED_ICON

      public static final String INFOVIEW_DISK_NO_FILE_LOADED_ICON
      See Also:
    • INFOVIEW_DISK_NO_FILE_LOADED_ICON_ICON

      final ImageIcon 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

      private final JPanel backPanel
    • infoDisplay

      private final JPanel infoDisplay
    • infoDisplayers

      private final JLabel[] infoDisplayers
      Label 1 : Title Label Label 2 : Author Label Label 3 : Misc Label
    • artWork

      private final JLabel artWork
    • listeners

      private final transient ArrayList<InfoViewTP.InfoViewUpdateListener> listeners
    • backPanelArt

      private transient BufferedImage backPanelArt
    • info

      private transient AudioInfo info
    • infoTitle

      private String 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

      public void setAssets(File f)
      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 play File
    • __dispatch_

      private void __dispatch_()
      This method alerts every linked listener about the new info being updated

      This method is threaded in order to blocking other functionalities.

    • __reset_artwork_lowicon

      private void __reset_artwork_lowicon(boolean beSmart)
      Parameters:
      beSmart -
    • addInfoViewUpdateListener

      public void addInfoViewUpdateListener(InfoViewTP.InfoViewUpdateListener l)
      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

      private void infoToString(AudioInfo info, String text, boolean beSmart)
      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 of
      text - The title of the track
      beSmart - Tells the parser to be smart and guess certain details.
    • getInfo

      public AudioInfo getInfo()
      Returns:
      AudioInfo
    • componentResized

      public void componentResized(ComponentEvent e)
      Specified by:
      componentResized in interface ComponentListener
      Parameters:
      e -
    • componentMoved

      public void componentMoved(ComponentEvent e)
      Specified by:
      componentMoved in interface ComponentListener
      Parameters:
      e -
    • componentShown

      public void componentShown(ComponentEvent e)
      Specified by:
      componentShown in interface ComponentListener
      Parameters:
      e -
    • componentHidden

      public void componentHidden(ComponentEvent e)
      Specified by:
      componentHidden in interface ComponentListener
      Parameters:
      e -