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,darcula,maclightormacdark.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.StringbaseThemeprivate booleandarkprivate java.lang.Stringnameprivate java.util.Propertiesproperties-
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.PropertiesgetAdditionalDefaults()java.lang.StringgetDescription()protected java.util.ArrayList<java.lang.Class<?>>getLafClassesForDefaultsLoading()java.lang.StringgetName()java.util.PropertiesgetProperties()booleanisDark()private static java.util.PropertiesloadProperties(java.io.InputStream in)-
Methods inherited from class com.formdev.flatlaf.FlatLaf
applyAdditionalProperties, createActiveFontValue, createCompositeFont, disableWindowsD3Donscreen, equals, getCustomDefaultsSources, getDefaults, getDisabledIcon, getExtraDefaults, getGlobalExtraDefaults, getID, getPreferredFontFamily, getPreferredLightFontFamily, getPreferredMonospacedFontFamily, getPreferredSemiboldFontFamily, getStyleableInfos, getStyleableValue, getSupportsWindowDecorations, getSystemColorGetter, getUIKeyLightOrDarkPrefix, getUIKeyPlatformPrefixes, getUIKeySpecialPrefixes, 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:
getNamein classjavax.swing.LookAndFeel
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin classjavax.swing.LookAndFeel
-
getProperties
public java.util.Properties getProperties()
-
getLafClassesForDefaultsLoading
protected java.util.ArrayList<java.lang.Class<?>> getLafClassesForDefaultsLoading()
- Overrides:
getLafClassesForDefaultsLoadingin classFlatLaf
-
getAdditionalDefaults
protected java.util.Properties getAdditionalDefaults()
- Overrides:
getAdditionalDefaultsin classFlatLaf
-
-