Pluggable look and feel
Encyclopedia
Pluggable look and feel is a mechanism used in the Java
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 API
Application 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:
  • Hooks
    Hooking
    In 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 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....

     widgets to interact with their look and feel. Each widget defined in Swing can delegate its "painting" to its associated 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...

     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-platform
    Cross-platform
    In 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 themes
    Theme (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 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....

       (see ), 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 (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
    Theme (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 Windows
      Microsoft Windows
      Microsoft 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 Motif
      Motif (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 Linux
      Linux
      Linux 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-UX
      HP-UX
      HP-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 X
      Mac OS X
      Mac 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...

      .

Third-party look and feels

Numerous other look and feels have been developed by third parties, such as:
  • Substance, a skinnable
    Skin (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 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....

    ,
  • Liquid, which aim to look like the Liquid theme for KDE
    KDE
    KDE 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.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK