Package com.formdev.flatlaf
Class IntelliJTheme
java.lang.Object
com.formdev.flatlaf.IntelliJTheme
This class supports loading IntelliJ .theme.json files and using them as a Laf.
.theme.json files are used by Theme plugins for IntelliJ IDEA and other
JetBrains IDEs that are based on IntelliJ platform.
Here you can find IntelliJ Theme plugins:
https://plugins.jetbrains.com/search?tags=Theme
The IntelliJ .theme.json file are documented here:
http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal String
final boolean
private final boolean
final String
private Map
<String, ColorUIResource> Copy UI default keys (value --> key).Rename UI default keys (key --> value). -
Constructor Summary
ConstructorsConstructorDescriptionLoads a IntelliJ .theme.json file from the given input stream. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
apply
(String key, Object value, UIDefaults defaults, ArrayList<Object> defaultsKeysCache, Set<String> uiKeys) http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#custom-ui-control-colorsprivate void
applyCheckBoxColors
(UIDefaults defaults) Because IDEA uses SVGs for check boxes and radio buttons, the colors for these two components are specified in "icons > ColorPalette".private void
applyColorPalette
(UIDefaults defaults) private void
applyProperties
(UIDefaults defaults) private void
copyIfNotSet
(UIDefaults defaults, String destKey, String srcKey, Set<String> uiKeys) static FlatLaf
createLaf
(IntelliJTheme theme) Creates a Laf instance for the given IntelliJ theme.static FlatLaf
createLaf
(InputStream in) Loads a IntelliJ .theme.json file from the given input stream and creates a Laf instance for it.private String
fixColorIfValid
(String newColorStr, String colorStr) private Object
static boolean
install
(InputStream in) Deprecated.private void
loadNamedColors
(UIDefaults defaults) http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#defining-named-colorsprivate ColorUIResource
parseColor
(String value) private void
putAll
(UIDefaults defaults, Object value, String... keys) removeThemeSpecificDefaults
(UIDefaults defaults) static boolean
setup
(InputStream in) Loads a IntelliJ .theme.json file from the given input stream, creates a Laf instance for it and sets it up.private ColorUIResource
-
Field Details
-
name
-
dark
public final boolean dark -
author
-
isMaterialUILite
private final boolean isMaterialUILite -
colors
-
ui
-
icons
-
namedColors
-
uiKeyExcludes
-
uiKeyDoNotOverride
-
uiKeyMapping
Rename UI default keys (key --> value). -
uiKeyCopying
Copy UI default keys (value --> key). -
uiKeyInverseMapping
-
checkboxKeyMapping
-
checkboxDuplicateColors
-
-
Constructor Details
-
IntelliJTheme
Loads a IntelliJ .theme.json file from the given input stream. The input stream is automatically closed. Using a buffered input stream is not necessary.- Throws:
IOException
-
-
Method Details
-
setup
Loads a IntelliJ .theme.json file from the given input stream, creates a Laf instance for it and sets it up. The input stream is automatically closed. Using a buffered input stream is not necessary.- Since:
- 1.2
-
install
Deprecated.usesetup(InputStream)
instead; this method will be removed in a future version -
createLaf
Loads a IntelliJ .theme.json file from the given input stream and creates a Laf instance for it. The input stream is automatically closed. Using a buffered input stream is not necessary.- Throws:
IOException
-
createLaf
Creates a Laf instance for the given IntelliJ theme. -
applyProperties
-
get
-
putAll
-
removeThemeSpecificDefaults
-
loadNamedColors
http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#defining-named-colors -
apply
private void apply(String key, Object value, UIDefaults defaults, ArrayList<Object> defaultsKeysCache, Set<String> uiKeys) http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#custom-ui-control-colors -
fixColorIfValid
-
applyColorPalette
-
toColor
-
parseColor
-
applyCheckBoxColors
Because IDEA uses SVGs for check boxes and radio buttons, the colors for these two components are specified in "icons > ColorPalette". FlatLaf uses vector icons and expects colors for the two components in UI defaults. -
copyIfNotSet
-
setup(InputStream)
instead; this method will be removed in a future version