Package com.formdev.flatlaf
Class FlatDefaultsAddon
java.lang.Object
com.formdev.flatlaf.FlatDefaultsAddon
- Direct Known Subclasses:
FlatSwingXDefaultsAddon
Addon for FlatLaf UI defaults.
Allows loading of additional .properties files from addon JARs.
ServiceLoader
is used to load extensions of this class from addon JARs.
If you extend this class in an addon JAR, you also have to add a text file named
META-INF/services/com.formdev.flatlaf.FlatDefaultsAddon
to the addon JAR. The file must contain a single line with the class name.
See 'flatlaf-swingx' addon for an example
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterDefaultsLoading
(LookAndFeel laf, UIDefaults defaults) Allows modifying UI defaults after loading UI defaults.getDefaults
(Class<?> lafClass) Finds an addon .properties file for the given LaF class and returns it as input stream.int
Returns the priority used to sort addon loading.
-
Constructor Details
-
FlatDefaultsAddon
public FlatDefaultsAddon()
-
-
Method Details
-
getDefaults
Finds an addon .properties file for the given LaF class and returns it as input stream. Ornull
if not found.This default implementation finds addon .properties file for the given LaF class in the same package as the subclass.
Override this method to load addon .properties files from other locations.
-
afterDefaultsLoading
Allows modifying UI defaults after loading UI defaults. The default implementation does nothing. -
getPriority
public int getPriority()Returns the priority used to sort addon loading. The order is only important if you want to overwrite UI defaults of other addons. Lower numbers mean higher priority. Returns 10000 by default.
-