Class OneDarkTheme

java.lang.Object
com.github.weisj.darklaf.theme.Theme
com.github.weisj.darklaf.theme.OneDarkTheme
All Implemented Interfaces:
Serializable, Comparable<Theme>, Comparator<Theme>

@AutoService(Theme.class) public class OneDarkTheme extends Theme
See Also:
Serialized Form
  • Constructor Details

    • OneDarkTheme

      public OneDarkTheme()
  • Method Details

    • getPresetIconRule

      protected PresetIconRule getPresetIconRule()
      Description copied from class: Theme
      The preset icon theme.
      Specified by:
      getPresetIconRule in class Theme
      Returns:
      the icon theme.
    • getPrefix

      public String getPrefix()
      Description copied from class: Theme
      Get the prefix for resource loading.
      Specified by:
      getPrefix in class Theme
      Returns:
      the prefix for loading resources.
    • getName

      public String getName()
      Description copied from class: Theme
      Get the name of this theme.
      Specified by:
      getName in class Theme
      Returns:
      the name of the theme.
    • getResourcePath

      protected String getResourcePath()
      Description copied from class: Theme
      The path to the resource location relative to the classpath of Theme.getLoaderClass().
      Overrides:
      getResourcePath in class Theme
      Returns:
      the relative resource path
    • getLoaderClass

      protected Class<? extends Theme> getLoaderClass()
      Description copied from class: Theme
      The class used to determine the runtime location of resources. It is advised to explicitly return the class instead of using Object.getClass() to protect against extending the theme.
      Specified by:
      getLoaderClass in class Theme
      Returns:
      the loader class.
    • getColorToneRule

      public ColorToneRule getColorToneRule()
      Description copied from class: Theme
      Returns the style rule for this theme.
      Specified by:
      getColorToneRule in class Theme
      Returns:
      the style rule.
    • customizeUIProperties

      public void customizeUIProperties(Properties properties, UIDefaults currentDefaults)
      Description copied from class: Theme
      Customize the ui defaults.

      Note: When overwriting a theme you should use Theme.loadWithClass(String, Class) instead of Theme.load(String).

      Overrides:
      customizeUIProperties in class Theme
      Parameters:
      properties - the properties to load the values into.
      currentDefaults - the current ui defaults.
    • supportsCustomAccentColor

      public boolean supportsCustomAccentColor()
      Description copied from class: Theme
      Returns whether this theme supports custom accent colors.
      Overrides:
      supportsCustomAccentColor in class Theme
      Returns:
      true if supported.
    • supportsCustomSelectionColor

      public boolean supportsCustomSelectionColor()
      Description copied from class: Theme
      Returns whether this theme supports custom selection colors.
      Overrides:
      supportsCustomSelectionColor in class Theme
      Returns:
      true if supported.
    • customizeIconTheme

      public void customizeIconTheme(Properties properties, UIDefaults currentDefaults)
      Description copied from class: Theme
      Customize the icon defaults.

      Note: When overwriting a theme you also have overwrite Theme.getLoaderClass() to return the class of the theme you are overwriting. In this case you should use Theme.loadWithClass(String, Class) instead of Theme.load(String).

      Overrides:
      customizeIconTheme in class Theme
      Parameters:
      properties - the properties to load the value into.
      currentDefaults - the current ui defaults.