Substance Java look & feel
The goal of this project is to provide a configurable and customizable production-quality Java look and feel
library for Swing applications. This Java look and feel is available for JDK 5.0+ only.
The main class is org.jvnet.substance.SubstanceLookAndFeel. In order to
use Substance look and feel in your application, you can use one of the
following:
- UIManager.setLookAndFeel(new SubstanceLookAndFeel());
- UIManager.setLookAndFeel("org.jvnet.substance.SubstanceLookAndFeel");
- Start your VM with -Dswing.defaultlaf=org.jvnet.substance.SubstanceLookAndFeel
In any case, add the latest substance.jar to your classpath. Starting from version
2.2 (El Paso), you have an option to use substance-lite.jar that doesn't
use custom color chooser panels (from Quaqua and Xoetrope - see below) and
additional "feel" widgets from laf-widget.
This light version is ~380KB less than the full version. Starting from version 3.0 (Grenada)
you have an option to use substance-lite-feel.jar that doesn't use custom color
chooser panels. This light version is ~230KB less than the full version.
Important announcements
Release for version 3.3 (code-named Japan) is available (view
release info).
Skins
See skin documentation for information on
how to set a skin, create a new skin and plugin a set of new skins
in Substance.
Toned-down skins
See more...
Dark skins
See more...
Saturated skins
See more...
Using themes
See theme documentation for information on
how to set default theme, create a new theme and plugin a set of new themes
in Substance.
A few examples of various core themes - Olive
and Barby Pink
:
Using watermarks
See watermark documentation for information on
how to set default watermark, create a new watermark and plugin a set of new watermarks
in Substance.
A few examples of various core watermarks -
Crosshatch
and Mosaic
:
Screenshots
Full screenshot gallery is available.
In addition, application screenshot gallery shows
how various third-party application look under Substance.
ColorChooserUI
The ColorChooserUI in Substance look and feel is taken from the excellent
Quaqua look and feel
(which is available for Macintosh only). The license
for Quaqua is either LGPL or BSD. Kudos to Werner
Randelshofer for excellent work and for willing to share his color chooser
with this project. The current version is Quaqua 3.7.3.
In addition, the last color chooser panel was written by Luan O'Carroll
from Xoetrope's XUI
project.
Popup windows
The popup windows in Substance look and feel have automatic support for drop shadows
taken from the
JGoodies Looks look and feel.
The license for Looks is BSD. Kudos to all JGoodies developers lead by
Karsten Lentzsch for excellent work. The current version is Looks 2.1.1,
while Substance uses the code from version 1.3.2.
Additional resources
Demos
test
application that shows all Substance features.
demo
for the transition layout
Notes
In case you wish to use cross-platform frame and dialog decorations, use the following before you
instantiate your first top-level window (but after you set the Substance look and
feel to be your default):
JFrame.setDefaultLookAndFeelDecorated(true);
and JDialog.setDefaultLookAndFeelDecorated(true);.
This, however, causes flicker on resize due to a
known bug.
For Windows, there is a workaround, using
System.setProperty("sun.awt.noerasebackground", "true");.
You can set this property along with the above two lines. An additional option
is to specify a substancelaf.useDecorations VM parameter.
In case you wish to build Substance from the sources, you will need to take the
laf-plugin and
laf-widget
(binaries or sources). The best way is to take the CVS snapshot
and use the build.xml script. The main test application uses the
FormLayout and components from
SwingLabs.
Thanks
- To Werner
Randelshofer for letting use the Quaqua's ColorChooserUI.
- To Karsten Lentzsch for
letting use the Looks drop shadows on popup windows and font policy layer.
- To Luan O'Carroll
for providing Xoetrope XUI color chooser panel.
- To Thomas
Bierhance for letting use the auto-completion on editable
comboboxes (refactored to fit the listener model). This work has
been previously released to public
domain.
- To Pierre Le Lannic for contributing
the initial version of the scroll pane selector.
- To Nigel Hughes for contributing
code of JCarousel
and JCarouselMenu
to the tab overview dialog (contributed under ASL license in contrib.com.blogofbug
package).
- To Timothy Wall for contributing the smooth list drag-and-drop widget
(original code at
http://abbot.sourceforge.net/demo/).
- To Chris Hall for reporting and fixing
this defect.
- To inostock for providing additional fixes for
this defect.
- To Nils-Morten Nilssen for reporting and fixing
this defect.
- To Dag Joar for reporting and helping to fix
this defect.
- To Larry Salibra for fixing
this defect.
- To Erik Vickroy for working with me on the plugin mechanism.
- To Romain Guy for contributing
image-processing functions (compatible images and thumbnails) and numerous advice
on pixel-perfecting
the toned-down skins.
- To Tim Boudreau for
his fruitful collaboration on Substance
NetBeans module. Also to Scott Violet
for helping on support for Matisse baseline alignment.
- To Dr Heinz Max Kabutz
for his implementation of soft
reference cache.
- To Daniel Stonier and Keith Woodward for fixes in LAF
swicthing code in the test application.
- To Sebastien Petrucci for providing the initial blurring code (no
longer used).
- To Mark Haag for extensive testing and feedback of the theme mechanism
and other components.
- To Magnus de Pourbaix for reporting bugs, requesting features and
contributing internationalization
of custom labels in 16 new languages.
- To Jorge Alberto Salazar Palomares and Raj Nagappan
for requesting very useful features.
- To Martin Clifford for reporting memory leaks issues and working
with me to resolve them.
- To Jon Lipsky for sharing the brushed
metal texture for the watermark pack
plugin.
- To Chris
Campbell for sharing the soft-clipping technique used in some of the
gradient painters.
- To Vladimir Maslikhin for reporting
20+ issues and testing the daily dev drops of versions 2.0, 2.1 and 2.2.
- To qu0ll for reporting issues on tables, trees and lists in version 3.2.
- To Carsten O. Madsen for requesting internationalization
of custom labels.
- To the Tango project
for providing high quality icons under the public domain license.
- To the Silk Icons for
providing icons for default tree renderer under the public
domain license.
- To all other reporters for pointing out the bugs and requesting new features.
The (incomplete) list: Ismael Juma, Jackson G. West, Jens Hohl, Ana Oleski,
Carsten O'Madsen, Frank Koopmans, Walter Van Der Heiden, Joerg Plewe, Stephan
Bardubitzki, Tzuto Lin, Nick Holcombe, Adam Burrett, Peter Henderson,
QamarAlZaman Habeek, John Mulcahy, Kirill Sorokin, Matthew F. Green, Dhilsukh
Reddy Jeeru, Greg St. Onge, Josue Magana, Arne Gessner, Jurgen Jacobs, Aaron
Bruegl, Jan Erik Paulsen, Vincent Trussart, Scott Shannon.
- To all the users for trying and using the Substance look-and-feel
and its plugins.