Pluggable look and feel is a mechanism used in the
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mos ...
Swing widget toolkit
A widget toolkit, widget library, GUI toolkit, or UX library is a library or a collection of libraries containing a set of graphical control elements (called ''widgets'') used to construct the graphical user interface (GUI) of programs.
Most widge ...
allowing to change the
look and feel
In software design, the look and feel of a graphical user interface comprises aspects of its design, including elements such as colors, shapes, layout, and typefaces (the "look"), as well as the behavior of dynamic elements such as buttons, boxe ...
of the
graphical user interface
The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inst ...
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
A synthesizer (also spelled synthesiser) is an electronic musical instrument that generates audio signals. Synthesizers typically create sounds by generating waveforms through methods including subtractive synthesis, additive synthesis and ...
look and feel, which is configured with an
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
property file. The look and feel can be changed at runtime.
Architecture
The corresponding
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
includes:
*
Hooks in
Swing widgets to interact with their look and feel. Each widget defined in Swing can delegate its "painting" to its associated
user interface
In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine f ...
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.
Examples of look and feels
Platform look and feels
The
Java platform
Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cro ...
comes with several bundled look and feels:
* A default
cross-platform
In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software ...
look and feel, called ''Metal'' (see ). This look and feel comes with several
themes:
** 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
synth
A synthesizer (also spelled synthesiser) is an electronic musical instrument that generates audio signals. Synthesizers typically create sounds by generating waveforms through methods including subtractive synthesis, additive synthesis and ...
(see ), which is configured with an
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
property file.
** The look and feel (based on ''synth''), which is added for the
Java SE 6 Update 10.
* 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
theming
Theming refers to "the use of an overarching theme...to create a holistic and integrated spatial organization of a consumer venue.” A theme is “a unifying or dominant idea or motif”, so theming is the process of designing and constructing an ...
library when possible
** A
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
look and feel (this look and feel depends on the version of the Windows Operating System),
** A
Motif or
GTK+ (for newer distributions) look and feel on
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
or
Solaris,
** A specific vendor look and feel for
IBM AIX
AIX (Advanced Interactive eXecutive, pronounced , "ay-eye-ex") is a series of proprietary Unix operating systems developed and sold by IBM for several of its computer platforms.
Background
Originally released for the IBM RT PC RISC ...
,
HP-UX, and
Mac OS X
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
.
Third-party look and feels
Numerous other look and feels have been developed by third parties, such as:
Insubstantial a maintenance fork of Substance
JGoodies Windows and plastic look and feels
Liquid which aim to look like the ''Liquid'' theme for
KDE
Napkin which can be used to make GUI work look provisional
Substance a
skinnable look and feel
Synthetica based on
synth
A synthesizer (also spelled synthesiser) is an electronic musical instrument that generates audio signals. Synthesizers typically create sounds by generating waveforms through methods including subtractive synthesis, additive synthesis and ...
See also
*
Look and feel
In software design, the look and feel of a graphical user interface comprises aspects of its design, including elements such as colors, shapes, layout, and typefaces (the "look"), as well as the behavior of dynamic elements such as buttons, boxe ...
*
Swing
References
External links
List of Java look and feels*
ttp://java.sun.com/products/jfc/tsc/articles/architecture/index.html#pluggable Swing pluggable look and feel architecture*
{{DEFAULTSORT:Pluggable Look And Feel
Java APIs
Java (programming language) libraries
Java (programming language)
Widget toolkits