Package com.formdev.flatlaf
Class FlatPropertiesLaf
- java.lang.Object
-
- javax.swing.LookAndFeel
-
- javax.swing.plaf.basic.BasicLookAndFeel
-
- com.formdev.flatlaf.FlatLaf
-
- com.formdev.flatlaf.FlatPropertiesLaf
-
- All Implemented Interfaces:
java.io.Serializable
public class FlatPropertiesLaf extends FlatLaf
A Flat LaF that is able to load UI defaults from properties passed to the constructor.Specify the base theme in the properties with
@baseTheme=<baseTheme>
. Allowed values for<baseTheme>
arelight
(the default),dark
,intellij
ordarcula
.The properties are applied after loading the base theme and may overwrite base properties. All features of FlatLaf properties files are available.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.formdev.flatlaf.FlatLaf
FlatLaf.ActiveFont, FlatLaf.DisabledIconProvider
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
baseTheme
private boolean
dark
private java.lang.String
name
private java.util.Properties
properties
-
Fields inherited from class com.formdev.flatlaf.FlatLaf
NULL_VALUE
-
-
Constructor Summary
Constructors Constructor Description FlatPropertiesLaf(java.lang.String name, java.io.File propertiesFile)
FlatPropertiesLaf(java.lang.String name, java.io.InputStream in)
FlatPropertiesLaf(java.lang.String name, java.util.Properties properties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Properties
getAdditionalDefaults()
java.lang.String
getDescription()
protected java.util.ArrayList<java.lang.Class<?>>
getLafClassesForDefaultsLoading()
java.lang.String
getName()
java.util.Properties
getProperties()
boolean
isDark()
private static java.util.Properties
loadProperties(java.io.InputStream in)
-
Methods inherited from class com.formdev.flatlaf.FlatLaf
applyAdditionalDefaults, createActiveFontValue, createCompositeFont, equals, getCustomDefaultsSources, getDefaults, getDisabledIcon, getExtraDefaults, getGlobalExtraDefaults, getID, getPreferredFontFamily, getPreferredLightFontFamily, getPreferredMonospacedFontFamily, getPreferredSemiboldFontFamily, getStyleableInfos, getStyleableValue, getSupportsWindowDecorations, getSystemColorGetter, hashCode, hideMnemonics, initialize, initIconColors, install, installLafInfo, isLafDark, isNativeLookAndFeel, isShowMnemonics, isSupportedLookAndFeel, isUseNativeWindowDecorations, parseDefaultsValue, registerCustomDefaultsSource, registerCustomDefaultsSource, registerCustomDefaultsSource, registerCustomDefaultsSource, registerUIDefaultsGetter, repaintAllFramesAndDialogs, revalidateAndRepaintAllFramesAndDialogs, runWithUIDefaultsGetter, setExtraDefaults, setGlobalExtraDefaults, setPreferredFontFamily, setPreferredLightFontFamily, setPreferredMonospacedFontFamily, setPreferredSemiboldFontFamily, setSystemColorGetter, setup, setUseNativeWindowDecorations, showMnemonics, supportsNativeWindowDecorations, uninitialize, unregisterCustomDefaultsSource, unregisterCustomDefaultsSource, unregisterCustomDefaultsSource, unregisterCustomDefaultsSource, unregisterUIDefaultsGetter, updateUI, updateUILater
-
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initClassDefaults, initComponentDefaults, initSystemColorDefaults, loadSystemColors, playSound
-
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, getDisabledSelectedIcon, getLayoutStyle, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninstallBorder
-
-
-
-
Constructor Detail
-
FlatPropertiesLaf
public FlatPropertiesLaf(java.lang.String name, java.io.File propertiesFile) throws java.io.IOException
- Throws:
java.io.IOException
-
FlatPropertiesLaf
public FlatPropertiesLaf(java.lang.String name, java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
FlatPropertiesLaf
public FlatPropertiesLaf(java.lang.String name, java.util.Properties properties)
-
-
Method Detail
-
loadProperties
private static java.util.Properties loadProperties(java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
getName
public java.lang.String getName()
- Specified by:
getName
in classjavax.swing.LookAndFeel
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in classjavax.swing.LookAndFeel
-
getProperties
public java.util.Properties getProperties()
-
getLafClassesForDefaultsLoading
protected java.util.ArrayList<java.lang.Class<?>> getLafClassesForDefaultsLoading()
- Overrides:
getLafClassesForDefaultsLoading
in classFlatLaf
-
getAdditionalDefaults
protected java.util.Properties getAdditionalDefaults()
- Overrides:
getAdditionalDefaults
in classFlatLaf
-
-