Package org.jjazz.ss_editor.rpviewer.spi
Interface RpViewerRendererFactory
- All Known Subinterfaces:
DefaultRpViewerRendererFactory
public interface RpViewerRendererFactory
Provide RpViewerRenderers implementations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RpViewerRendererFactory
findFactory
(RhythmParameter<?> rp) Try to find the relevant RpViewerRendererFactory for the specified RhythmParameter.getRpViewerRenderer
(Song song, SongPart spt, RhythmParameter<?> rp, RpViewerSettings settings) Get a RpViewerRenderer instance adapted to the specified RhyhtmParameter.default boolean
isSupported
(RhythmParameter<?> rp) Check if this factory can create a renderer for the specified RhythmParameter.
-
Method Details
-
findFactory
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
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 songspt
- The context song partrp
-settings
-- Returns:
- Null if rp is not supported.
-