| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sat, 17 Jan 2026 00:22:18 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20070728043335
location: https://web.archive.org/web/20070728043335/https://laf-plugin.dev.java.net/
server-timing: captures_list;dur=0.883374, exclusion.robots;dur=0.053663, exclusion.robots.policy;dur=0.039456, esindex;dur=0.012914, cdx.remote;dur=12.194743, LoadShardBlock;dur=431.961592, PetaboxLoader3.datanode;dur=67.941533, PetaboxLoader3.resolve;dur=316.400656
x-app-server: wwwb-app223-dc8
x-ts: 302
x-tr: 484
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app223; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sat, 17 Jan 2026 00:22:18 GMT
content-type: text/html;charset=UTF-8
x-archive-orig-date: Sat, 28 Jul 2007 04:33:35 GMT
x-archive-orig-server: Apache
x-archive-orig-x-powered-by: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5
x-archive-orig-pragma:
x-archive-orig-cache-control: private,max-age=0,must-revalidate
x-archive-orig-helmloginid: guest
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sat, 28 Jul 2007 04:33:35 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: IA-AROUND-THE-WORLD-2007-20070728041241-05321-crawling021-c/IA-AROUND-THE-WORLD-2007-20070728043233-09796-crawling01.us.archive.org.arc.gz
server-timing: captures_list;dur=0.518709, exclusion.robots;dur=0.018588, exclusion.robots.policy;dur=0.009582, esindex;dur=0.009482, cdx.remote;dur=10.683261, LoadShardBlock;dur=258.891012, PetaboxLoader3.datanode;dur=214.362261, PetaboxLoader3.resolve;dur=113.664168, load_resource;dur=98.042886
x-app-server: wwwb-app223-dc8
x-ts: 200
x-tr: 423
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
laf-plugin: Project Home Page
|
laf-plugin
|
| Summary | Support for third-party components in look-and-feel libraries |
|---|---|
| Categories | None |
| License | Berkeley Software Distribution (BSD) License |
| Owner(s) | kirillcool |
Laf-Plugin - support for third-party components in look-and-feel libraries
The goal of this project is to provide a generic plugin framework for look-and-feels and define the interface of a common kind of plugins - the component plugins.Look-and-feels that use this library
- Substance from version 2.1.
- Liquid from version 2.9.
- Squareness from version 2.1.0 - see this entry.
- PgsLookAndFeel from version 0.5.
- Skin from version 6.7.
- JGoogies Looks around 09-10/2006.
Introduction
The main LookAndFeel class instantiates and queries ComponentPluginManager to get the details of third-party UI components. The constructor of PluginManager gets the XML descriptor name. The plugin class LafComponentPlugin contains a number of functions:- initialize and uninitalize - should be called by the main LookAndFeel class on initialization and unitialization.
- getDefaults - returns collection of all settings for custom components. Can also return settings for core Swing components, effectively overriding the settings of the LAF
- XML descriptor.
- Class that implements LafComponentPlugin interface.
- UI delegate for each custom component.
Using this library in your look-and-feel
The laf-plugin.jar library (in Documents & Files section) contains the runtime classes. You can use the following simple Ant task to put the laf-plugin classes in your main LAF runtime library:
<target name="jar-bin" description="create runtime jar">
<delete file="${substance.drop.dir}/substance.jar" />
<unjar src="${substance.drop.dir}/laf-plugin.jar" dest="${substance.output.dir}/"/>
<jar compress="true" destfile="${substance.drop.dir}/substance.jar"
manifest="${substance.src.dir}/META-INF/MANIFEST.MF">
<fileset dir="${substance.output.dir}/" excludes="test/**" />
<fileset dir="${module.substance.basedir}/" includes="resources/**" />
</jar>
</target>
The ComponentPluginManager class provides utility functions for working with the plugins.
Here is a sample implementation of a look-and-feel that uses these functions.
- Defining a plugin manager in your main LAF class:
/**
* Plugin manager for component plugins.
*/
protected static ComponentPluginManager componentPlugins;
Here the ComponentPluginManager is defined as static in order to allow static functions to access it. You can also define ComponentPluginManager as an instance member.
- Initializing the plugin manager in the LAF constructor:
componentPlugins = new ComponentPluginManager(PLUGIN_XML);
PLUGIN_XML is the string name of the LAF-specific XML configuration file.
- Helper function to initialize all plugins is
/**
* Helper function to initialize all available plugins of <code>this</code>
* plugin manager. Calls the {@link LafComponentPlugin#initialize()} of all available
* plugins.
*/
public void initializeAll()
Sample usage of this function:
/*
* (non-Javadoc)
*
* @see javax.swing.plaf.basic.BasicLookAndFeel#initialize()
*/
public void initialize() {
super.initialize();
// initialize this LAF
// ...
// initialize component plugins
componentPlugins.initializeAll();
}
- Helper function to uninitialize all plugins is
/**
* Helper function to uninitialize all available plugins of <code>this</code>
* plugin manager. Calls the {@link LafComponentPlugin#uninitialize()} of all available
* plugins.
*/
public void uninitializeAll()
Sample usage of this function:
/*
* (non-Javadoc)
*
* @see javax.swing.plaf.basic.BasicLookAndFeel#uninitialize()
*/
public void uninitialize() {
super.uninitialize();
// uninitialize this LAF
// ...
// uninitialize component plugins
componentPlugins.uninitializeAll();
}
- Helper function to set plugin defaults is
/**
* Helper function to process the (possibly) theme-dependent default
* settings of all available plugins of <code>this</code> plugin manager.
* Calls the {@link LafComponentPlugin#getDefaults(Object)} of all available plugins and
* puts the respective results in the specified table.
*
* @param table
* The table that will be updated with the (possibly)
* theme-dependent default settings of all available plugins.
* @param themeInfo
* LAF-specific information on the current theme.
*/
public void processAllDefaultsEntries(UIDefaults table, Object themeInfo)
Recommended usage of this function is in the implementation of getDefaults of your LAF:
/*
* (non-Javadoc)
*
* @see javax.swing.plaf.metal.MetalLookAndFeel#getDefaults()
*/
@Override
public UIDefaults getDefaults() {
UIDefaults table = super.getDefaults();
componentPlugins.processAllDefaultsEntries(table, currentTheme);
return table;
}
where currentTheme contains LAF-specific information on the current theme.
Developers
- Erik Vickroy - Liquid LAF
- Kirill Grouchnikov - Substance LAF
License
The license for this project is BSD. However, this project uses third-party NanoXML Lite XML parser for time and memory efficiency. The license for NanoXML Lite is very much like BSD. In case you wish to obtain fully-BSD version of laf-plugin, you are welcome to open an issue and specify whether you wish to use DOM or SAX parser.| Powered by CollabNet | Feedback |
FAQ |
Press |
Developer tools
© 1995 - 2007 CollabNet. CollabNet is a registered trademark of CollabNet, Inc. |
