Class SequencerPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SequencerPanel extends JPanel
Swing Control for displaying and manipulating the position of one or more SequencerPanel.AbstractSequencer, which shall play synchronuously. Only the pure sequencer run and position control is supported.
ATTENTION: Currently only HORIZONTAL sliders are used to visualize time progress.
Usage:
Create instance; call modification methods; add/remove Sequencers; call reScaleDuration() after reload of data with new durations.
Selection of input data and output connections must be provided externally.
Extended from music.midi.SequencerPanel <= Extracted from bt midi.Player.
(Editable text field copied from sighkn/FloatSlider)
FIXME text-editieren der zeitposition -> bewirkt sprung
FIXME MuLiLabels
See Also:
  • Field Details

    • defaultFrameText

      public static final String defaultFrameText
      See Also:
    • sequencers

      protected List<SequencerPanel.AbstractSequencer> sequencers
    • longestDataSequencer

      protected SequencerPanel.AbstractSequencer longestDataSequencer
    • highestMaxDuration

      protected float highestMaxDuration
    • positionThread_sleepDuration

      protected int positionThread_sleepDuration
    • labelEditable

      protected boolean labelEditable
    • running

      protected boolean running
    • sliderMoveAllowance

      protected int sliderMoveAllowance
    • label_totalDuration

      protected JLabel label_totalDuration
    • textField_currentTime

      protected JTextField textField_currentTime
    • dynamicDisable

      protected boolean dynamicDisable
    • playButton

      protected JButton playButton
    • pauseButton

      protected JButton pauseButton
    • rewindButton

      protected JButton rewindButton
    • positionModel

      protected final DefaultBoundedRangeModel positionModel
      The model works in milliseconds, encoded as "int".
    • fixedZeroStart

      protected final boolean fixedZeroStart
    • positionThread

      protected final Thread positionThread
    • MOVE_NEVER

      public static final int MOVE_NEVER
      See Also:
    • MOVE_PAUSED

      public static final int MOVE_PAUSED
      See Also:
    • MOVE_ALWAYS

      public static final int MOVE_ALWAYS
      See Also:
    • init

      public final Action init
    • play

      public final Action play
    • pause

      public final Action pause
    • CONST_CHAR_MINUTE_SEPARATOR

      public static final char CONST_CHAR_MINUTE_SEPARATOR
      See Also:
  • Constructor Details

    • SequencerPanel

      public SequencerPanel(@Opt @Opt String frameText, boolean fixedZeroStart)
    • SequencerPanel

      public SequencerPanel(@Opt @Opt String frameText, boolean fixedZeroStart, boolean hasRewindButton, boolean hasPlayButton, boolean hasPauseButton)
  • Method Details

    • userMayJump

      protected boolean userMayJump()
    • updateTextField

      protected void updateTextField()
    • do_updateTextField

      protected void do_updateTextField()
    • updateTextfieldEditable

      protected void updateTextfieldEditable()
    • millisecondsToModel

      protected int millisecondsToModel(float ms)
    • modelToMilliseconds

      protected float modelToMilliseconds(int mod)
    • set_sleepDuration

      public void set_sleepDuration(int sleepDuration)
      Set the intervall with which the GUI display is refreshed. Is passed directly to a Object#sleep(int) call.
    • set_dynamicDisable

      public void set_dynamicDisable(boolean b)
    • add_sequencer

    • remove_sequencer

      public SequencerPanel remove_sequencer(SequencerPanel.AbstractSequencer s)
    • set_labelEditable

      public SequencerPanel set_labelEditable(boolean s)
    • set_sliderMoveAllowance

      public SequencerPanel set_sliderMoveAllowance(int i)
    • updateDynamicDisable

      protected void updateDynamicDisable()
    • play

      public void play()
    • pause

      public void pause()
    • jumpTo

      public void jumpTo(float msec)
    • isRunning

      public boolean isRunning()
    • getPositionModel

      public BoundedRangeModel getPositionModel()
    • reScaleDuration

      public void reScaleDuration()
    • millisecondsToMinuteText

      public static String millisecondsToMinuteText(float ms)
    • minuteTextToMilliseconds

      @Opt public static @Opt Float minuteTextToMilliseconds(String t)
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception