Class RealTimeRpEditorDialog<E>

Type Parameters:
E - RhythmParameter value class
All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class RealTimeRpEditorDialog<E> extends RpCustomEditor<E> implements PropertyChangeListener
A RpCustomEditor dialog implementation which lets user preview the RP value changes in real time (while the sequence is playing).

The dialog can be customized for a given RhythmParameter via the RealTimeRpEditorPanel panel which provides the RP value editing capability.

See Also:
  • Field Details

    • DEFAULT_PREVIEW_MAX_NB_BARS

      public static final int DEFAULT_PREVIEW_MAX_NB_BARS
      See Also:
  • Constructor Details

  • Method Details

    • getRhythmParameter

      public RhythmParameter<E> getRhythmParameter()
      Description copied from class: RpCustomEditor
      The RhythmParameter whose value is edited in this dialog.
      Specified by:
      getRhythmParameter in class RpCustomEditor<E>
      Returns:
    • preset

      public void preset(E rpValue, SongPartContext sptContext)
      Description copied from class: RpCustomEditor
      Initialize the dialog before being shown.
      Specified by:
      preset in class RpCustomEditor<E>
      Parameters:
      rpValue - The RhythmParameter value
    • getRpValue

      public E getRpValue()
      Get the edited RpValue.
      Specified by:
      getRpValue in class RpCustomEditor<E>
      Returns:
      Value is meaningful only if isExitOk() is true.
    • isExitOk

      public boolean isExitOk()
      Check if dialog was exited using OK
      Specified by:
      isExitOk in class RpCustomEditor<E>
      Returns:
      False means user cancelled the operation.
    • getPreviewMaxNbBars

      public int getPreviewMaxNbBars()
      Get the maximum number of bars used in the preview.
      Returns:
      the previewMaxNbBars
    • setPreviewMaxNbBars

      public void setPreviewMaxNbBars(int previewMaxNbBars)
      Set the maximum number of bars used in the preview.

    • buildPreviewContext

      public static <T> SongPartContext buildPreviewContext(SongPartContext sptContext, RhythmParameter<T> rp, T rpValue)
      Create a preview SongContext which uses the specified rhythm parameter value.
      Parameters:
      rpValue -
      Returns:
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener