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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLoads a IntelliJ .theme.json file from the given input stream. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidhttp://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#custom-ui-control-colorsprivate voidapplyCheckBoxColors(Properties properties) Because IDEA uses SVGs for check boxes and radio buttons, the colors for these two components are specified in "icons > ColorPalette".private voidapplyIconsColorPalette(Properties properties) private voidapplyProperties(Properties properties) private booleanapplyWildcard(Properties properties, String key, String value) private booleancanParseColor(String value) private voidcopyIfSetInJson(Properties properties, Set<String> jsonUIKeys, String destKey, String... srcKeys) static FlatLafcreateLaf(IntelliJTheme theme) Creates a Laf instance for the given IntelliJ theme.static FlatLafcreateLaf(InputStream in) Loads a IntelliJ .theme.json file from the given input stream and creates a Laf instance for it.private StringfixColorIfValid(String newColorStr, String colorStr) private voidfixStartEnd(Properties properties, Set<String> jsonUIKeys, String startKey, String endKey, String key) private Stringstatic booleaninstall(InputStream in) Deprecated.private voidloadNamedColors(Properties properties, Set<String> jsonUIKeys) http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#defining-named-colorsprivate voidput(Properties properties, Object key, Object value) private voidputAll(Properties properties, Object value, String... keys) removeThemeSpecificProps(Properties properties) static booleansetup(InputStream in) Loads a IntelliJ .theme.json file from the given input stream, creates a Laf instance for it and sets it up.private String
-
Field Details
-
name
-
dark
public final boolean dark -
author
-
jsonColors
-
jsonUI
-
jsonIcons
-
namedColors
-
uiKeyExcludes
-
uiKeyDoNotOverride
-
uiKeyMapping
-
uiKeyCopying
-
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
-
put
-
putAll
-
copyIfSetInJson
private void copyIfSetInJson(Properties properties, Set<String> jsonUIKeys, String destKey, String... srcKeys) -
fixStartEnd
-
removeThemeSpecificProps
-
loadNamedColors
http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#defining-named-colors -
apply
http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#custom-ui-control-colors -
applyWildcard
-
fixColorIfValid
-
applyIconsColorPalette
-
toColor
-
canParseColor
-
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 properties.
-
setup(InputStream)instead; this method will be removed in a future version