Interface RpViewerRendererFactory

All Known Subinterfaces:
DefaultRpViewerRendererFactory

public interface RpViewerRendererFactory
Provide RpViewerRenderers implementations.
  • Method Details

    • findFactory

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

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

      Parameters:
      rp -
      Returns:
      Can be null if no relevant RpViewerFactory found.
    • isSupported

      default boolean isSupported(RhythmParameter<?> rp)
      Check if this factory can create a renderer for the specified RhythmParameter.
      Parameters:
      rp -
      Returns:
      Default implementation returns true.
    • getRpViewerRenderer

      RpViewerRenderer getRpViewerRenderer(Song song, SongPart spt, RhythmParameter<?> rp, RpViewerSettings settings)
      Get a RpViewerRenderer instance adapted to the specified RhyhtmParameter.

      Parameters:
      song - The context song
      spt - The context song part
      rp -
      settings -
      Returns:
      Null if rp is not supported.