Class QuPathStyleManager

java.lang.Object
qupath.lib.gui.prefs.QuPathStyleManager

public class QuPathStyleManager extends Object
Class to facilitate the use of different styles within QuPath.

These register themselves with PathPrefs so that they can be persistent across restarts.

Author:
Pete Bankhead
  • Property Details

  • Constructor Details

    • QuPathStyleManager

      public QuPathStyleManager()
  • Method Details

    • updateAvailableStyles

      public 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.
    • installStyles

      public static boolean installStyles(Collection<File> list)
      Handle installing CSS files (which can be used to style QuPath).
      Parameters:
      list - list of css files
      Returns:
    • refresh

      public 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.
    • isDefaultStyle

      public static boolean isDefaultStyle()
      Check if the default JavaFX style is used.
      Returns:
      true if the default style is used, false otherwise.
    • availableStylesProperty

      public static ObservableList<QuPathStyleManager.StyleOption> availableStylesProperty()
      Get the current available styles as an observable list. The list is unmodifiable, since any changes should be made via adding/removing files in UserDirectoryManager.getCssStylesPath().
      Returns:
    • selectedStyleProperty

      public static ObjectProperty<QuPathStyleManager.StyleOption> selectedStyleProperty()
      Get the current selected style.
      Returns:
    • availableFontsProperty

      public static ObservableList<QuPathStyleManager.Fonts> availableFontsProperty()
      Get 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
    • fontProperty

      public static ObjectProperty<QuPathStyleManager.Fonts> fontProperty()
      Get the current selected font.
      Returns: