05-Dec-2005 18:39 | Squareness Look And Feel to support Laf-Plugin

Some days ago I was contacted by Kirill Grouchnikov, author of the Substance Look And Feel. He told me about Laf-Plugin and asked whether I would integrate it into Squareness Look And Feel.

Laf-Plugin is a simple plugin API targeted specifically at Swing Look And Feels. L&F authors can define plugin categories and load plugins defined for those categories. Laf-Plugin comes with a predefined plugin category — component plugins.

As Swing comes of age more and more third party components and component libraries become available. At the same time more and more pluggable look and feels become available. Laf-Plugin provides a consistent way of defining the look and feel for such components in the context of a specific look and feel. The look and feel dynamically finds the plugins available for it and loads the additional ui delegates defined in them. When a third party component is used the ui delegate from the matching plugin is used and the component fits seamlessly into the look and feel of the containing application.

I think Laf-Plugin is a very good idea. It’s simple and lightweight and does its job. I have integrated Laf-Plugin into Squareness and am currently developing a plugin for Ribbon to make sure my integration works correctly before releasing it.

I hope more look and feels will join this efort and I hope that component developers will also support it. Component developers need to provide ui class id for each component to make this work.

Trackback (URL)
19-Aug-2006 13:59 | Squareness Look And Feel 2.1.0
This is the last major release for JDK 1.4 and earlier. It integrates Laf-Plugin about which I have already written in my personal blog....
Comments

Robert,

It's not only the UI class ID. It's the whole collection of updateUI / getUI / ... *and* not overriding any of the paint* functions in the component itself. The component author needs to provide the basic UI delegate so that the component can be used with specific LAF delegate. With all this in place, the LAF will register the UI delegate via the proposed mechanism, and the component will be painted by that UI delegate.

That should have said "so that the component can be used without any specific LAF delegate, providing out-of-the-box painting" instead of "so that the component can be used with specific LAF delegate".

Kirill,
you're right. Only providing a ui class id won't do, You also have to use ui delegates as they are meant to be used. A component that provides a ui class id and paints itself without using the ui delegate is really senseless.
So it's not really as easy as "Fine, I'll provide a ui class id and somehow magically it will work"

Leave a comment