Package org.jjazz.spteditor.spi
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 Summary
Modifier and TypeMethodDescriptioncreateComponent
(Song song, SongPart spt, RhythmParameter<?> rp) Create a RpEditorComponent adapted to rp class (whatever the containing rhythm).static RpEditorComponentFactory
findFactory
(RhythmParameter<?> rp) Try to find the relevant RpEditorComponentFactory for the specified RhythmParameter.boolean
isRpSupported
(RhythmParameter<?> rp) Check if this RhythmParameter is handled by this factory.
-
Method Details
-
findFactory
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
Check if this RhythmParameter is handled by this factory.- Parameters:
rp
-- Returns:
-
createComponent
Create a RpEditorComponent adapted to rp class (whatever the containing rhythm).- Parameters:
song
- Can be null except for RhythmParameters which implement the RpCustomEditorProvider interfacespt
-rp
-- Returns:
- Can be null if rp is not supported.
-