Pluggable look and feel
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.
Architecture
The corresponding API 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 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 comes with several bundled look and feels[1]:
- A default cross-platform look and feel, called Metal (see Template:Javadoc:SE). This look and feel comes with several themes:
- The Template:Javadoc:SE, which was historically the first Swing default theme.
- The smoother Template:Javadoc:SE, which became the default theme for Java 5.0.
- Other cross-platform look and feels:
- A skinnable look and feel called synth (see Template:Javadoc:SE), which is configured with an XML property file.
- The Nimbus look and feel (based on synth), which is added for the Java SE 6 Update 10[2][3].
- Platform dependent look and feels[4]: 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 library when possible[5][6]
Third-party look and feels
Numerous other look and feels have been developed by third parties, such as:
- Substance, a skinnable look and feel,
- Napkin, which can be used to make GUI work look provisional,
- Synthetica, which is based on synth,
- Liquid, which aim to look like the Liquid theme for KDE,
- JGoodies Windows and plastic look and feels.
References
- ↑ "Java Tutorials: Available Look and Feels". Sun Microsystems. 2008-02-14. http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html#available. Retrieved 2008-05-25.
- ↑ Potts, Jasper (2007-12-07). "Nimbus Category". http://www.jasperpotts.com/blog/category/nimbus/. Retrieved 2008-05-25.
- ↑ "Nimbus". Sun Microsystems. http://java.sun.com/javase/downloads/ea/6u10/nimbus.jsp. Retrieved 2008-05-25.
- ↑ "Available Look and Feels". Sun Microsystems. http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html#available. Retrieved 2008-05-25.
- ↑ "GTK Native L&F Fidelity". Sun Microsystems. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6185456. Retrieved 2008-05-25.
- ↑ "XP L&F does not work on Windows Vista (Longhorn) - needs to use uxtheme api". Sun Microsystems. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5106661. Retrieved 2008-05-25.
See also
External links
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...