While the core library provides consistent visuals and animation effects for core Swing components, it also provides an extensible plugin architecture to extend the library functionality to third-party components - such as Flamingo and SwingX component suites.
META-INF/substance-plugin.xml
org.pushingpixels.lafplugin.LafComponentPlugin
interface
The structure of META-INF/substance-plugin.xml
descriptor is:
<substance-plugin> <plugin-class>Class name</plugin-class> </substance-plugin>
The class name is a fully qualified name of a non-abstract class with a default zero-argument
constructor that implements the org.pushingpixels.lafplugin.LafComponentPlugin
interface.
The org.pushingpixels.lafplugin.LafComponentPlugin
interface
specifies the following methods which must be implemented by the plugin:
/**
* Initializes <code>this</code> plugin.
*/
public void initialize();
/**
* Unitializes <code>this</code> plugin.
*/
public void uninitialize();
/**
* Retrieves a collection of custom settings based on the specified theme.
* The entries in the array should be pairwise, odd being symbolic name of a
* setting, and even being the setting value.
*
* @param themeInfo
* Theme information object. Can be {@link MetalTheme}, for
* instance or any other LAF-specific object.
* @return Collection of custom settings based on the specified theme. The
* entries in the array should be pairwise, odd being symbolic name
* of a setting, and even being the setting value.
*/
public Object[] getDefaults(Object themeInfo);
There are two reference implementations of Substance plugins: