Interface RpEditorComponentFactory

All Known Subinterfaces:
DefaultRpEditorComponentFactory

public interface RpEditorComponentFactory
A factory for RhythmParameter component editors (whatever the rhythm) to be used with a RpEditor in the SongPart editor.
  • Method Details

    • findFactory

      static RpEditorComponentFactory findFactory(RhythmParameter<?> rp)
      Try to find the relevant RpEditorComponentFactory for the specified RhythmParameter.

      First, return rp if rp is an instanceof RpEditorComponentFactory. If not, scan all the RpEditorComponentFactory instances available on the global lookup, and return the first one which supports rp and is not a DefaultRpEditorComponentFactory.

      Parameters:
      rp -
      Returns:
      Can be null if no relevant RpEditorComponentFactory found.
    • isRpSupported

      boolean isRpSupported(RhythmParameter<?> rp)
      Check if this RhythmParameter is handled by this factory.
      Parameters:
      rp -
      Returns:
    • createComponent

      RpEditorComponent createComponent(Song song, SongPart spt, RhythmParameter<?> rp)
      Create a RpEditorComponent adapted to rp class (whatever the containing rhythm).
      Parameters:
      song - Can be null except for RhythmParameters which implement the RpCustomEditorProvider interface
      spt -
      rp -
      Returns:
      Can be null if rp is not supported.