Proposal for common "feel" layer in look-and-feel libraries
A few weeks ago i posted a question on JavaLobby about the additional "feel" features that i have been adding to Substance and what people think about the extra "weight" of the download and the lock-in for applications that would like to use these features. When i say lock-in, i mean that these features were only available under Substance, which is good for me on one hand, but bad for the community in general. Thankfully, one of the responses (by James) proposed splitting the Substance code base and making the widgets available to all LAFs. And so the laf-widget project was born.
This project contains a collection of "behavioural traits" or "widgets" for
third-party Swing look-and-feels. The list of currently provided widgets:
- Auto-completion (model-based / free-text) on editable combo boxes.
- Hover preview of minimized internal frames on desktop icons.
- Menu search panel on menu bars.
- Hover preview of tab in tabbed panes.
- Overview dialog on tabbed panes.
- Password strength checker on password fields.
- Lock border on non-editable text components and model-based editable combo boxes.
- Select all text in text component on focus gain.
- Enhanced drag-and-drop support for trees.
View the detailed documentation
on how to enable the above widgets in a specific LAF. Once the steps
described in that document have been completed (by either the LAF developer
or by the LAF user), Swing application running under the
"widgetized" LAF will feature the widgets described above. Here is a sample
application under core Metal and Windows LAFs:
Here is the same application under
Substance LAF (note the menu search panel
in the menu bar, the tab overview button, the strength markers on password fields and
the lock icons on disabled text field and editable model-only combobox):
Napkin features the same widgets for
the menu bar, combobox, password fields and text fields. Note that the tab overview widget requires
custom LAF support from the relevant LAFs.
- How to change existing look-and-feel?
- How to write your own widget?
- How it works?
- Extra - fade animations API
Additional thanks go:
Bierhance for letting use the auto-completion on editable
comboboxes (refactored to fit the listener model and later moved to this
project). This work has been previously released to
- To inostock for providing additional fixes for combobox auto-completion.
- To Antonio
Vieiro for letting use the enhanced tree drag-and-drop (refactored to fit the project
concept). This work was originally released under LGPL and contributed under BSD.
- To Romain Guy for contributing
image-processing functions (compatible images and thumbnails).