Package qupath.lib.gui.prefs
Class QuPathStyleManager
java.lang.Object
qupath.lib.gui.prefs.QuPathStyleManager
Class to facilitate the use of different styles within QuPath.
 
 These register themselves with PathPrefs so that they can be persistent across restarts.
- 
Property SummaryPropertiesTypePropertyDescriptionGet a list of available fonts.Get the current available styles as an observable list.Get the current selected font.Get the current selected style.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumAvailable font families.static interfaceInterface defining a style that may be applied to QuPath.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGet a list of available fonts.Get the current available styles as an observable list.Get the current selected font.static ColorSchemeGet the color scheme of the current style, or the system color scheme if no other is available.static booleaninstallStyles(Collection<File> list) Handle installing CSS files (which can be used to style QuPath).static voidrefresh()Refresh the current style.Get the current selected style.static voidRequest that the list of available styles is updated.
- 
Property Details- 
availableStylesGet the current available styles as an observable list. The list is unmodifiable, since any changes should be made via adding/removing files inUserDirectoryManager.getCssStylesPath().- See Also:
 
- 
selectedStyleGet the current selected style.- See Also:
 
- 
availableFontsGet a list of available fonts. The list is unmodifiable, since this is primarily used to overcome issues with the default font on macOS by changing the font family. More fine-grained changes can be made via css.- See Also:
 
- 
fontGet the current selected font.- See Also:
 
 
- 
- 
Constructor Details- 
QuPathStyleManagerpublic QuPathStyleManager()
 
- 
- 
Method Details- 
updateAvailableStylespublic static void updateAvailableStyles()Request that the list of available styles is updated. It makes sense to call this when a new user directory has been set, so that a check for CSS files can be performed.
- 
installStylesHandle installing CSS files (which can be used to style QuPath).- Parameters:
- list- list of css files
- Returns:
 
- 
refreshpublic static void refresh()Refresh the current style. This should not normally be required, but may be useful during startup to ensure that the style is properly set at the appropriate time.
- 
getStyleColorSchemeGet the color scheme of the current style, or the system color scheme if no other is available.- Returns:
 
- 
availableStylesPropertyGet the current available styles as an observable list. The list is unmodifiable, since any changes should be made via adding/removing files inUserDirectoryManager.getCssStylesPath().- Returns:
 
- 
selectedStylePropertyGet the current selected style.- Returns:
 
- 
availableFontsPropertyGet a list of available fonts. The list is unmodifiable, since this is primarily used to overcome issues with the default font on macOS by changing the font family. More fine-grained changes can be made via css.- Returns:
- list of available fonts
 
- 
fontPropertyGet the current selected font.- Returns:
 
 
-