Pluggable look and feel
Encyclopedia
Pluggable look and feel is a mechanism used in the Java
Swing
widget toolkit
allowing to change the look and feel of the graphical user interface
at runtime.
Swing allows an application to specialize the look and feel of widgets, by modifying the default (via runtime parameters), deriving from an existing one, by creating one from scratch, or, beginning with J2SE 5.0, by using the skinnable synth
look and feel, which is configured with an XML
property file. The look and feel can be changed at runtime.
includes:
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
Swing
Swing (Java)
Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes — an API for providing a graphical user interface for Java programs....
widget toolkit
Widget toolkit
In computing, a widget toolkit, widget library, or GUI toolkit is a set of widgets for use in designing applications with graphical user interfaces...
allowing to change the look and feel of the graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...
at runtime.
Swing allows an application to specialize the look and feel of widgets, by modifying the default (via runtime parameters), deriving from an existing one, by creating one from scratch, or, beginning with J2SE 5.0, by using the skinnable synth
Synth Look and Feel
synth is a skinnable Java look and feel, which is configured with an XML property file.According to Sun, goals for synth were:* Enable to create custom look without writing any code.* Allow appearance to be configured from images....
look and feel, which is configured with an XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
property file. The look and feel can be changed at runtime.
Architecture
The corresponding APIApplication programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...
includes:
- HooksHookingIn computer programming, the term hooking covers a range of techniques used to alter or augment the behavior of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components...
in SwingSwing (Java)Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes — an API for providing a graphical user interface for Java programs....
widgets to interact with their look and feel. Each widget defined in Swing can delegate its "painting" to its associated user interfaceGraphical user interfaceIn computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...
classes called UI delegates. - An API to manage existing look and feel definitions. This API allow to set the look and feel or switch from look and feels at runtime.
- Another API to define a specific look and feel, or derive a look and feel from an existing one.
Platform look and feels
The Java platform comes with several bundled look and feels:- A default cross-platformCross-platformIn computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...
look and feel, called Metal (see ). This look and feel comes with several themesTheme (computing)In computing, a theme is a preset package containing graphical appearance details, used to customize the look and feel of an operating system, widget set or window manager....
:- The , which was historically the first Swing default theme.
- The smoother , which became the default theme for Java 5.0.
- Other cross-platform look and feels:
- A skinnable look and feel called synthSynth Look and Feelsynth is a skinnable Java look and feel, which is configured with an XML property file.According to Sun, goals for synth were:* Enable to create custom look without writing any code.* Allow appearance to be configured from images....
(see ), which is configured with an XMLXMLExtensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
property file. - The look and feel (based on synth), which is added for the Java SE 6 Update 10.
- A skinnable look and feel called synth
- Platform dependent look and feels: Look and feels that aim to be the closest as possible to the platform native GUI. The fidelity to the native look and feel theming has been improved in recent Java versions by leveraging the platform native GUI themingTheme (computing)In computing, a theme is a preset package containing graphical appearance details, used to customize the look and feel of an operating system, widget set or window manager....
library when possible- A WindowsMicrosoft WindowsMicrosoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
look and feel (this look and feel depends on the version of the Windows Operating System), - A MotifMotif (widget toolkit)In computing, Motif refers to both a graphical user interface specification and the widget toolkit for building applications that follow that specification under the X Window System on Unix and other POSIX-compliant systems. It emerged in the 1980s as Unix workstations were on the rise, as a...
or GTK+GTK+GTK+ is a cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the X Window System, along with Qt.The name GTK+ originates from GTK;...
(for newer distributions) look and feel on LinuxLinuxLinux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
or Solaris, - A specific vendor look and feel for IBM AIX, HP-UXHP-UXHP-UX is Hewlett-Packard's proprietary implementation of the Unix operating system, based on UNIX System V and first released in 1984...
, and Mac OS XMac OS XMac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
.
- A Windows
Third-party look and feels
Numerous other look and feels have been developed by third parties, such as:- Substance, a skinnableSkin (computing)In computing, a skin is a custom graphical appearance achieved by the use of a graphical user interface that can be applied to specific software and websites to suit the purpose, topic, or tastes of different users....
look and feel, - Insubstantial, a maintenance fork of Substance
- Napkin, which can be used to make GUI work look provisional,
- Synthetica, which is based on synthSynth Look and Feelsynth is a skinnable Java look and feel, which is configured with an XML property file.According to Sun, goals for synth were:* Enable to create custom look without writing any code.* Allow appearance to be configured from images....
, - Liquid, which aim to look like the Liquid theme for KDEKDEKDE is an international free software community producing an integrated set of cross-platform applications designed to run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS X systems...
, - JGoodies Windows and plastic look and feels.
- Pienoware L&F with redesigned filechooser.