Class RadioRenderer

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, ToolkitRenderer<Radio>

public class RadioRenderer extends AbstractToolkitRenderer<Radio>
A specialized UI for the Radio toolkit.

Features a high-contrast LED display and hardware controller for managing internet radio streams and output routing.

Author:
anahata
See Also:
  • Field Details

    • stationTable

      private JTable stationTable
      The table displaying the list of available internet radio stations.
    • tableModel

      private DefaultTableModel tableModel
      The backing data model for the station table.
    • statusLabel

      private JLabel statusLabel
      High-contrast LED status label (e.g., "SYSTEM READY", "STREAMING LIVE").
    • stationLabel

      private JLabel stationLabel
      LED display for the current station name.
    • playBtn

      private JButton playBtn
      The main playback control button.
    • deviceCombo

      private JComboBox<AudioDevice> deviceCombo
      Selector for the hardware output device (audio routing).
  • Constructor Details

    • RadioRenderer

      public RadioRenderer()
      Constructs a new RadioRenderer console with a default layout and uninitialized LED displays.

      The actual initialization and binding to the toolkit state occur during the onBind() lifecycle phase.

  • Method Details

    • onBind

      protected void onBind()
      Hook for subclasses to perform their specific layout and initial state logic. Called whenever the renderer is bound to a new toolkit instance.

      Initializes the high-contrast radio console, setting up the NEON visual theme, the station discovery table, and the hardware-style LED control panel.

      Specified by:
      onBind in class AbstractToolkitRenderer<Radio>
    • togglePlayback

      private void togglePlayback()
      Toggles the playback state based on current toolkit status.
    • syncUiWithToolkit

      private void syncUiWithToolkit()
      Synchronizes the UI components with the current state of the Radio toolkit.
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)

      Subclasses should override this method to handle reactive state changes on the Event Dispatch Thread (EDT).

      Synchronizes the high-contrast display and control states whenever the underlying Radio toolkit's reactive properties change.

      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class AbstractToolkitRenderer<Radio>