Class RealTimeRpEditorComponent<E>

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.jjazz.rpcustomeditorfactoryimpl.api.RealTimeRpEditorComponent<E>
Type Parameters:
E - The type of value of the RhythmParameter.
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public abstract class RealTimeRpEditorComponent<E> extends JComponent
A JComponent to be used as a RhythmParameter value editor by the RealTimeRpEditorDialog.

The component must fire PROP_EDITED_RP_VALUE property change events when RP value is changed by the user.

See Also:
  • Field Details

    • PROP_EDITED_RP_VALUE

      public static final String PROP_EDITED_RP_VALUE
      This property change event must be fired each time user modifies the value in the editor.
      See Also:
  • Constructor Details

    • RealTimeRpEditorComponent

      public RealTimeRpEditorComponent()
  • Method Details

    • isModal

      public boolean isModal()
      Check if dialog should be modal.
      Returns:
      True by default
    • getRhythmParameter

      public abstract RhythmParameter<E> getRhythmParameter()
      The RhythmParameter model.
      Returns:
    • preset

      public abstract void preset(E rpValue, SongPartContext sptContext)
      Initialize the editor for the specified context.
      Parameters:
      rpValue - Can not be null.
      sptContext -
    • setEditedRpValue

      public abstract void setEditedRpValue(E rpValue)
      Change the edited value to rpValue.

      Parameters:
      rpValue - Can not be null.
    • getEditedRpValue

      public abstract E getEditedRpValue()
      Get a copy of the current RhythmParameter value in the editor.
      Returns:
      Can be null if a problem occured or RpValue is not yet ready.
    • cleanup

      public abstract void cleanup()
      Called to cleanup possible resources before discarding this object.
    • getTitle

      public String getTitle()
      The dialog title to be used.

      This is called after calling preset().

      Returns:
      If null a default title will be generated.
    • isResizable

      public boolean isResizable()
      If component supports resizing.
      Returns:
      False by default.