:: JGOODIES :: Java User Interface Design
:: Home :: Products :: Services :: Freeware :: Downloads :: About :: Contact ::

:: ClearLook™ ::

Find and fix common Swing misuse

ClearLook addresses design and implementation mistakes that we've fixed again and again to polish Swing UIs. Metamorphosis was the first step in our efforts to show others how a Swing UI can benefit from a few simple modifications.

We have now started to identify a general set of rules for this task, where each single rule defines when and how to remove or replace obsolete decorations and visual clutter, for example nested beveled borders, and nested splitpane borders.

:: Test Drive the JGoodies Looks Demo
:: Download the JGoodies Looks

:: Example Screenshots ::

ClearLook off ClearLook off   ClearLook on ClearLook on   ClearLook debug ClearLook debug

:: NetBeans Screenshots ::

ClearLook off ClearLook off   ClearLook on ClearLook on   ClearLook debug ClearLook debug

:: How it Works ::

ClearLook works as follows: a UI delegate asks the ClearLookManager to check for available modifications, which in turn asks the current ClearLook policy to do the job. An implementation of ClearLookPolicy comprises a set of modification rules. Firstly, it checks whether one of these rules applies to the component's context, i. e. the component state and component tree. If so, it looks up a replacement decoration for the choosen rule, and finally installs a replacement or modifies the component tree.

The current ClearLookMode defines whether ClearLook is off, on, in verbose, or debug mode. The verbose mode is intended to print reports about detected situations and applied modifications. The debug mode helps you find situations that are considered as misuse by painting saturated decorations instead of elegant replacements.

We have prebuilt the DefaultClearLookPolicy which comprises a foundation of rules, behavior to identify common component states, and a lookup mechanism, that involves the current look&feel to get modifications. One can extend or replace the default policy with a custom policy. For example, I have extended the default policy to add a set of custom rules for the NetBeans IDE, which has become kind-of reference application for testing. I have tested it against different NetBeans versions - and I'm quite satisfied with the results.

(c) 2003 JGoodies