All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class View extends JPanel
The GUI for the Barlow/Härpfer Indispensability demo. Contains the Java-Swing widgets for user IO and the check and construction for the NSM data object.
See Also:
  • Field Details

    • leftPart

      final JPanel leftPart
      Left part of the toplevel GUI window.
    • clockPanel

      final View.ClockPanel clockPanel
      Right part of the toplevel GUI window.
    • meter

      final JTextField meter
      Where to enter the source text of the NSM. May contain digits 0..9, interspersed with blanks and comma. Hitting return or clicking a different widget will start interpretation. The Result is presented in meterStatus. When this result is an error message, all other input widgets are disabled. (The meter may be changed when playing.)
    • meterStatus

      final JTextField meterStatus
      Display the result of interpreting the source text in meter. When this result is an error message, all other input widgets are disabled. If is a valid NSM, the clock display is updated accordingly.
    • playPauseButton

      final PlayPauseButton playPauseButton
      Widget to hold and continue the playing process. This process happens synchronuously in the output audio and in the graphics of clockPanel.
    • soundSelect

      final EnumPost<View.sound> soundSelect
      Widget to select the sound synthesis.
    • audible

      final JSlider audible
      Slider to set the threshold of the indispensability value to be audible.
    • tempo

      final JSlider tempo
      Slider to set the tempo in "events per minute".
    • volumePost

      final IntPost volumePost
      Data point for overall volume. Rangs is 0.0 - 1.0.
    • volumeSlider

      final IntPost.SwingSlider volumeSlider
      Slider for overall volume.
    • table

      final JTable table
      Output for the meter and the calculated indispensability values.
    • SHORT_DESCRIPTION

      static final String SHORT_DESCRIPTION
      Displayed description text.
      See Also:
    • errorState

      boolean errorState
      Global flag whether an input error occured when interpreting the input to meter.
    • CIRCLE_INSETS

      public static final int CIRCLE_INSETS
      Distance of the main circle to the margins of the clock panel.
      See Also:
    • RADIUS_MIN

      public static final int RADIUS_MIN
      Radius of the smallest circle which represents an event.
      See Also:
    • RADIUS_MAX

      public static final int RADIUS_MAX
      Radius of the largest circle which represents an event.
      See Also:
    • COLOR_ERROR_BG

      public static final Color COLOR_ERROR_BG
      Background of meterStatus in case of a meter input error.
    • COLOR_OKAY_BG

      public static final Color COLOR_OKAY_BG
      Background of meterStatus in case of a valid meter input.
    • COLOR_INACTIVE

      public static final Color COLOR_INACTIVE
      Events which are currently not active.
    • COLOR_ACTIVE

      public static final Color COLOR_ACTIVE
      Events which are currently active.
    • COLOR_BORDER

      public static final Color COLOR_BORDER
      Color for the borders of circles.
    • LINE_STROKE

      static final Stroke LINE_STROKE
      Linetype for the borders of circles.
    • tableModel

      final AbstractTableModel tableModel
      Displays in three rows: the event index (zero-based), the metric weights, and the calculated indispensability values.
  • Constructor Details

    • View

      View()
      Main constructor which creates the whole application.
  • Method Details

    • reactToMeterInput

      boolean reactToMeterInput()
      Is called when user wants to change focus away from meter input textfield, or presses return.
    • getErrorState

      boolean getErrorState()
    • setMeterStatus

      void setMeterStatus(boolean error, String text)
      Set the text of the GUI widget meterStatus and the global error flag. Clear the clock graphic in case of error. (The table is currently not cleared.)
    • showPhase

      void showPhase(int i)
      Called from the sequencer to update the GUI to the current event.
    • main

      public static void main(String[] args)
      Create and start the GUI.