1. Introduction

This plugins enables the configuration of the Look&Feel for Swing applications.

2. Usage

This plugin adds a LookAndFeelManager helper class that takes care of configuring the Look&Feel of a Swing application provided the following entries are available in the application’s configuration

Property

Type

Default

lookandfeel.handler

String

System

lookandfeel.theme

String

System

lookandfeel.properties

Map<String,Object>

The properties key is optional. If defined it will be used to fill properties in the javax.swing.UIManager.

The following table summarizes all currently supported handlers and themes.

Table 1. Supported Handlers and Themes
Handler Theme

A03

A03

EaSynth

EaSynth

JGoodies - Plastic

BrownSugar

JGoodies - Plastic

DarkStar

JGoodies - Plastic

DesertBlue

JGoodies - Plastic

DesertBluer

JGoodies - Plastic

DesertGreen

JGoodies - Plastic

DesertRed

JGoodies - Plastic

DesertYellow

JGoodies - Plastic

ExperienceBlue

JGoodies - Plastic

ExperienceGreen

JGoodies - Plastic

ExperienceRoyale

JGoodies - Plastic

LightGray

JGoodies - Plastic

Silver

JGoodies - Plastic

SkyBlue

JGoodies - Plastic

SkyBluer

JGoodies - Plastic

SkyGreen

JGoodies - Plastic

SkyKrupp

JGoodies - Plastic

SkyPink

JGoodies - Plastic

SkyRed

JGoodies - Plastic

SkyYellow

JGoodies - Plastic3D

BrownSugar

JGoodies - Plastic3D

DarkStar

JGoodies - Plastic3D

DesertBlue

JGoodies - Plastic3D

DesertBluer

JGoodies - Plastic3D

DesertGreen

JGoodies - Plastic3D

DesertRed

JGoodies - Plastic3D

DesertYellow

JGoodies - Plastic3D

ExperienceBlue

JGoodies - Plastic3D

ExperienceGreen

JGoodies - Plastic3D

ExperienceRoyale

JGoodies - Plastic3D

LightGray

JGoodies - Plastic3D

Silver

JGoodies - Plastic3D

SkyBlue

JGoodies - Plastic3D

SkyBluer

JGoodies - Plastic3D

SkyGreen

JGoodies - Plastic3D

SkyKrupp

JGoodies - Plastic3D

SkyPink

JGoodies - Plastic3D

SkyRed

JGoodies - Plastic3D

SkyYellow

JGoodies - PlasticXP

BrownSugar

JGoodies - PlasticXP

DarkStar

JGoodies - PlasticXP

DesertBlue

JGoodies - PlasticXP

DesertBluer

JGoodies - PlasticXP

DesertGreen

JGoodies - PlasticXP

DesertRed

JGoodies - PlasticXP

DesertYellow

JGoodies - PlasticXP

ExperienceBlue

JGoodies - PlasticXP

ExperienceGreen

JGoodies - PlasticXP

ExperienceRoyale

JGoodies - PlasticXP

LightGray

JGoodies - PlasticXP

Silver

JGoodies - PlasticXP

SkyBlue

JGoodies - PlasticXP

SkyBluer

JGoodies - PlasticXP

SkyGreen

JGoodies - PlasticXP

SkyKrupp

JGoodies - PlasticXP

SkyPink

JGoodies - PlasticXP

SkyRed

JGoodies - PlasticXP

SkyYellow

JTattoo

Acrylic

JTattoo

Aero

JTattoo

Aluminium

JTattoo

Bernstein

JTattoo

Fast

JTattoo

Graphite

JTattoo

HiFi

JTattoo

Luna

JTattoo

McWin

JTattoo

Mint

JTattoo

Noire

JTattoo

Smart

JTattoo

Texture

Kunststoff

Desktop

Kunststoff

Notebook

Kunststoff

Presentation

Liquid

Liquid

Metouia

Metouia

Napkin

Napkin

Office

Office 2003

Office

Office XP

Office

VisualStudio 2005

Pagosoft

ElegantGray

Pagosoft

JGoodies - BrownSugar

Pagosoft

JGoodies - DarkStar

Pagosoft

JGoodies - DesertBlue

Pagosoft

NativeColor

Pagosoft

Silver

Pagosoft

Vista

Seaglass

Seaglass

Skin

Amarach

Skin

Architect Blue

Skin

Architect Olive

Skin

b0sumi Ergo

Skin

b0sumi

Skin

BeOS

Skin

Blue Metal

Skin

Blue Turquesa

Skin

ChaNinja Blue

Skin

CoronaH

Skin

Cougar

Skin

Crystal2

Skin

Default

Skin

FatalE

Skin

Gfx Oasis

Skin

Gorilla

Skin

Hmm XP Blue

Skin

Hmm XP Mono Blue

Skin

iBar

Skin

Midnight

Skin

MakkiX and MagraX

Skin

Olive Green Luna XP

Skin

Opus Luna Silver

Skin

Opus OS Blue

Skin

Opus OS Deep

Skin

Opus OS Olive

Skin

QuickSilverR

Skin

Roue Blue

Skin

Roue Brown

Skin

Roue Green

Skin

Royal Inspirat

Skin

Silver Luna XP

Skin

SolunaR

Skin

Tiger Graphite

Skin

Tiger

Skin

Underling

Substance

Autum

Substance

BlackSteel

Substance

BlueSteel

Substance

Business

Substance

Cerulean

Substance

Challenger

Substance

CremeCoffee

Substance

Creme

Substance

DustCoffee

Substance

Dust

Substance

EmeralDusk

Substance

Gemini

Substance

GraphiteAqua

Substance

GraphiteGlass

Substance

Graphite

Substance

Magellan

Substance

Mariner

Substance

MistAqua

Substance

MistSilver

Substance

Moderate

Substance

NebulaBrickWall

Substance

Nebula

Substance

OfficeBlack2007

Substance

OfficeBlue2007

Substance

OfficeSilver2007

Substance

Raven

Substance

Sahara

Substance

Twilight

Synthetica

Synthetica

Synthetica

Alu Oxide

Synthetica

Black Eye

Synthetica

Black Moon

Synthetica

Black Star

Synthetica

Blue Ice

Synthetica

Blue Light

Synthetica

Blue Moon

Synthetica

Blue Steel

Synthetica

Classy

Synthetica

Green Dream

Synthetica

Mauve Metallic

Synthetica

Orange Metallic

Synthetica

Silver Moon

Synthetica

Simple2D

Synthetica

Sky Metallic

Synthetica

White Vision

System

CrossPlatform

System

Metal

System

Motif

System

Nimbus

System

System

Tinylaf

Tinylaf

Tonic

Tonic

Notes

JTattoo requires you to explicit add a compile dependency to your build, for example

compile 'com.jtattoo:JTattoo:1.6.11'

Synthetica requires you to explicitly add compile dependencies for each theme. Use a flatDir repository if the dependencies are not found on a local repository or archive server.

3. Configuration

The plugin delivers artifacts for both Swing and JavaFX. It also contains Groovy enhancements that can be used in combination with the respective UI toolkit DSL (SwingBuilder and GroovyFX).

3.1. Gradle

You have two options for configuring this plugin: automatic and manual.

3.1.1. Automatic

As long as the project has the org.codehaus.griffon.griffon plugin applied to it you may include the following snippet in build.gradle

dependencies {
    griffon 'org.codehaus.griffon.plugins:griffon-lookandfeel-plugin:2.0.0'
}

The griffon plugin will take care of the rest given its configuration.

3.1.2. Manual

You will need to configure any of the following blocks depending on your setup

Core
dependencies {
    compile 'org.codehaus.griffon.plugins:lookandfeel-core:2.0.0'
}

3.2. Maven

First configure the griffon-lookandfeel-plugin BOM in your POM file, by placing the following snippet before the <build> element

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.griffon.plugins</groupId>
            <artifactId>griffon-lookandfeel-plugin</artifactId>
            <version>2.0.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Next configure dependencies as required by your particular setup

Core
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>lookandfeel-core</artifactId>
</dependency>

3.3. Additional JARs

The following list summarizes all JAR files that provide additional handlers and themes

  • org.codehaus.griffon.plugins:griffon-lookandfeel-a03:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-easynth:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-jgoodies:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-jtattoo:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-kunststoff:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-liquid:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-metouia:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-napkin:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-office:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-pagosoft:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-seaglass:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-skin:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-substance:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-synthetica:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-tinylaf:2.0.0

  • org.codehaus.griffon.plugins:griffon-lookandfeel-tonic:2.0.0

4. Modules

The following sections display all bindings per module. Use this information to successfully override a binding on your own modules or to troubleshoot a module binding if the wrong type has been applied by the Griffon runtime.

4.1. LookAndFeel

Module name: lookandfeel

bind(LookAndFeelManager.class)
    .to(DefaultLookAndFeelManager.class)
    .asSingleton();

bind(LookAndFeelHandler.class)
    .to(SystemLookAndFeelHandler.class)
    .asSingleton();

bind(GriffonAddon.class)
    .to(LookAndFeelAddon.class)
    .asSingleton();