Class FavoriteRhythmProvider
java.lang.Object
org.jjazz.rhythmdatabaseimpl.api.FavoriteRhythmProvider
- All Implemented Interfaces:
RhythmProvider
A RhythmProvider instance which only provides the rhythms from the FavoriteRhythms instance.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jjazz.rhythm.spi.RhythmProvider
RhythmProvider.Info -
Field Summary
Fields inherited from interface org.jjazz.rhythm.spi.RhythmProvider
PREFIX_IGNORED_SUBDIR, SUBDIR_MAX_DEPTH -
Method Summary
Modifier and TypeMethodDescriptiongetAdaptedRhythm(Rhythm r, TimeSignature ts) Provide a new rhythm which is an adapted version of r for a different time signature.Get the list of favorite rhythms.Return an empty list.getFileRhythms(boolean forceRescan, MultipleErrorsReport errRpt) Return an empty list.getInfo()Descriptive information about this provider.static FavoriteRhythmProviderString[]Get the file extensions accepted by readFast().booleanReturn true if RhythmProvider has settings which can be modified by end-user.A fast method to read specified rhythm file and extract only information needed for description/catalog purposes.voidShow a modal dialog to modify the user settings of this RhythmProvider.
-
Method Details
-
getInstance
-
getBuiltinRhythmInfos
-
getInfo
Description copied from interface:RhythmProviderDescriptive information about this provider.- Specified by:
getInfoin interfaceRhythmProvider- Returns:
-
getBuiltinRhythms
Return an empty list.See getBuiltinRhythmInfos().
- Specified by:
getBuiltinRhythmsin interfaceRhythmProvider- Parameters:
errRpt- Can't be null. RhythmProvider should update this object so that the framework can notify user about problems.- Returns:
-
getFileRhythms
Return an empty list.See getBuiltinRhythmInfos().
- Specified by:
getFileRhythmsin interfaceRhythmProvider- Parameters:
forceRescan- If true RhythmProvider should not rely on its cached data.errRpt- Can't be null. RhythmProvider should update this object so that the framework can notify user about problems.- Returns:
-
showUserSettingsDialog
public void showUserSettingsDialog()Description copied from interface:RhythmProviderShow a modal dialog to modify the user settings of this RhythmProvider.The RhythmProvider is responsible for the persistence of its settings. The method does nothing if hasUserSettings() returns false.
- Specified by:
showUserSettingsDialogin interfaceRhythmProvider- See Also:
-
hasUserSettings
public boolean hasUserSettings()Description copied from interface:RhythmProviderReturn true if RhythmProvider has settings which can be modified by end-user.- Specified by:
hasUserSettingsin interfaceRhythmProvider- Returns:
- @see showUserSettingsDialog()
-
getSupportedFileExtensions
Description copied from interface:RhythmProviderGet the file extensions accepted by readFast().No dot, lowercase.
- Specified by:
getSupportedFileExtensionsin interfaceRhythmProvider- Returns:
- E.g. "prs", "sty". Can be an empty list if RhythmProvider has only builtin rhythms.
-
readFast
Description copied from interface:RhythmProviderA fast method to read specified rhythm file and extract only information needed for description/catalog purposes.Caller must use loadResources() on the returned rhythm before using it to generate music (possibly lenghty operation, eg if new file reading required).
- Specified by:
readFastin interfaceRhythmProvider- Parameters:
f-- Returns:
- Throws:
IOException
-
getAdaptedRhythm
Description copied from interface:RhythmProviderProvide a new rhythm which is an adapted version of r for a different time signature.- Specified by:
getAdaptedRhythmin interfaceRhythmProvider- Parameters:
r-ts-- Returns:
- Can be null if no adapted rhythm is available.
-