Package com.github.weisj.darklaf.theme
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 Summary
Constructors Constructor Description OneDarkTheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcustomizeIconTheme(Properties properties, UIDefaults currentDefaults)Customize the icon defaults.voidcustomizeUIProperties(Properties properties, UIDefaults currentDefaults)Customize the ui defaults.ColorToneRulegetColorToneRule()Returns the style rule for this theme.protected Class<? extends Theme>getLoaderClass()The class used to determine the runtime location of resources.StringgetName()Get the name of this theme.StringgetPrefix()Get the prefix for resource loading.protected PresetIconRulegetPresetIconRule()The preset icon theme.protected StringgetResourcePath()The path to the resource location relative to the classpath ofTheme.getLoaderClass().booleansupportsCustomAccentColor()Returns whether this theme supports custom accent colors.booleansupportsCustomSelectionColor()Returns whether this theme supports custom selection colors.-
Methods inherited from class com.github.weisj.darklaf.theme.Theme
appearsEqualTo, baseThemeOf, compare, compareTo, copy, customizeGlobals, customizePlatformProperties, derive, equals, getAccentColorRule, getContrastRule, getDisplayName, getFontSizeRule, getPropertyFilePath, getThemeClass, hashCode, isDark, isHighContrast, load, loadAccentProperties, loadCustomProperties, loadDefaults, loadIconTheme, loadPropertyFile, loadPropertyFile, loadStyleSheet, loadWithClass, toString, useCustomDecorations, withDisplayName
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
getPresetIconRule
protected PresetIconRule getPresetIconRule()
Description copied from class:ThemeThe preset icon theme.- Specified by:
getPresetIconRulein classTheme- Returns:
- the icon theme.
-
getPrefix
public String getPrefix()
Description copied from class:ThemeGet the prefix for resource loading.
-
getResourcePath
protected String getResourcePath()
Description copied from class:ThemeThe path to the resource location relative to the classpath ofTheme.getLoaderClass().- Overrides:
getResourcePathin classTheme- Returns:
- the relative resource path
-
getLoaderClass
protected Class<? extends Theme> getLoaderClass()
Description copied from class:ThemeThe class used to determine the runtime location of resources. It is advised to explicitly return the class instead of usingObject.getClass()to protect against extending the theme.- Specified by:
getLoaderClassin classTheme- Returns:
- the loader class.
-
getColorToneRule
public ColorToneRule getColorToneRule()
Description copied from class:ThemeReturns the style rule for this theme.- Specified by:
getColorToneRulein classTheme- Returns:
- the style rule.
-
customizeUIProperties
public void customizeUIProperties(Properties properties, UIDefaults currentDefaults)
Description copied from class:ThemeCustomize the ui defaults.Note: When overwriting a theme you should use
Theme.loadWithClass(String, Class)instead ofTheme.load(String).- Overrides:
customizeUIPropertiesin classTheme- Parameters:
properties- the properties to load the values into.currentDefaults- the current ui defaults.
-
supportsCustomAccentColor
public boolean supportsCustomAccentColor()
Description copied from class:ThemeReturns whether this theme supports custom accent colors.- Overrides:
supportsCustomAccentColorin classTheme- Returns:
- true if supported.
-
supportsCustomSelectionColor
public boolean supportsCustomSelectionColor()
Description copied from class:ThemeReturns whether this theme supports custom selection colors.- Overrides:
supportsCustomSelectionColorin classTheme- Returns:
- true if supported.
-
customizeIconTheme
public void customizeIconTheme(Properties properties, UIDefaults currentDefaults)
Description copied from class:ThemeCustomize 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 useTheme.loadWithClass(String, Class)instead ofTheme.load(String).- Overrides:
customizeIconThemein classTheme- Parameters:
properties- the properties to load the value into.currentDefaults- the current ui defaults.
-
-