Java Doc for Fonts.java in  » Swing-Library » substance-look-feel » org » jvnet » substance » fonts » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » substance look feel » org.jvnet.substance.fonts 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jvnet.substance.fonts.Fonts

Fonts
final public class Fonts (Code)
Provides static access to popular Windows fonts. The sizes of the font constants are specified in typographic points, approximately 1/72 of an inch.

TODO: Consider changing the visibility of the package private methods to public. As an alternative we may provide a FontPolicy that can emulate the font choice on Windows XP/2000 and Windows Vista for different software resolutions (96dpi/120dpi) and desktop font size settings (Normal/Large/Extra Large).
author:
   Karsten Lentzsch
version:
   $Revision: 1.4 $
See Also:   FontSet
See Also:   FontSets
See Also:   FontPolicy
See Also:   FontPolicies
since:
   2.0



Field Summary
final public static  FontSEGOE_UI_12PT
     This is Segoe UI 9pt, the default font on western Vista with 96dpi.
final public static  FontSEGOE_UI_13PT
     Ascent=14, descent=4, height=18, dbuX=8, dbuY=14, 13dluY=22.75px.
final public static  FontSEGOE_UI_15PT
     Ascent=16, descent=5, height=21, dbuX=9, dbuY=16, 13dluY=26px.
final public static  StringSEGOE_UI_NAME
     The name of the default dialog font on western Windows Vista.
final public static  FontTAHOMA_11PT
     This is the default font on western XP with 96dpi and normal fonts.
final public static  FontTAHOMA_13PT
     Ascent=13, descent=3, height=16, dbuX=8, dbuY=13, 14dluY=22.75px.
final public static  FontTAHOMA_14PT
     Ascent=14, descent=3, height=17, dbuX=8, dbuY=14, 14dluY=24.5px.
final public static  StringTAHOMA_NAME
     The name of the default dialog font on western Windows XP.
final static  StringWINDOWS_DEFAULT_GUI_FONT_KEY
     The desktop property key used to lookup the DEFAULTGUI font.
final static  StringWINDOWS_ICON_FONT_KEY
     The desktop property key used to lookup Windows' icon font.
final static  FontWINDOWS_VISTA_101DPI_NORMAL
     The default icon font on western Windows Vista with 101dpi and the dialog font desktop setting "Normal".
final public static  FontWINDOWS_VISTA_120DPI_NORMAL
     The default icon font on western Windows Vista with 120dpi and the dialog font desktop setting "Normal".
final public static  FontWINDOWS_VISTA_96DPI_LARGE
     The default icon font on western Windows Vista with 96dpi and the dialog font desktop setting "Large".
final public static  FontWINDOWS_VISTA_96DPI_NORMAL
     The default icon font on western Windows Vista with 96dpi and the dialog font desktop setting "Normal".
final public static  FontWINDOWS_XP_120DPI_DEFAULT_GUI
     The default GUI font on western Windows XP with 120dpi and the dialog font desktop setting "Normal".
final public static  FontWINDOWS_XP_120DPI_NORMAL
     The default icon font on western Windows XP with 120dpi and the dialog font desktop setting "Normal".
final public static  FontWINDOWS_XP_96DPI_DEFAULT_GUI
     The default GUI font on western Windows XP with 96dpi and the dialog font desktop setting "Normal".
final public static  FontWINDOWS_XP_96DPI_LARGE
     The default icon font on western Windows XP with 96dpi and the dialog font desktop setting "Large".
final public static  FontWINDOWS_XP_96DPI_NORMAL
     The default icon font on western Windows XP with 96dpi and the dialog font desktop setting "Normal".


Method Summary
public static  BooleancanDisplayLocalizedText(Font font, Locale locale)
     Checks and answers whether the given font can display text that is localized for the specified locale.
static  FontgetDefaultGUIFontWesternModernWindowsNormal()
    
static  FontgetDefaultIconFontWesternModernWindowsNormal()
    
static  FontgetDefaultIconFontWesternWindowsVistaNormal()
    
static  FontgetLooks1xWindowsControlFont()
     Returns the Windows control font used by the JGoodies Looks version 1.x. It is intended for visual backward compatibility only.
public static  FontgetWindowsControlFont()
     Looks up and returns the Windows control font.

Field Detail
SEGOE_UI_12PT
final public static Font SEGOE_UI_12PT(Code)
This is Segoe UI 9pt, the default font on western Vista with 96dpi. Ascent=13, descent=4, height=17, dbuX=7, dbuY=13, 13dluY=21.125px.



SEGOE_UI_13PT
final public static Font SEGOE_UI_13PT(Code)
Ascent=14, descent=4, height=18, dbuX=8, dbuY=14, 13dluY=22.75px.



SEGOE_UI_15PT
final public static Font SEGOE_UI_15PT(Code)
Ascent=16, descent=5, height=21, dbuX=9, dbuY=16, 13dluY=26px.



SEGOE_UI_NAME
final public static String SEGOE_UI_NAME(Code)
The name of the default dialog font on western Windows Vista.



TAHOMA_11PT
final public static Font TAHOMA_11PT(Code)
This is the default font on western XP with 96dpi and normal fonts. Ascent=11, descent=3, height=14, dbuX=6, dbuY=12, 14dluY=21px.



TAHOMA_13PT
final public static Font TAHOMA_13PT(Code)
Ascent=13, descent=3, height=16, dbuX=8, dbuY=13, 14dluY=22.75px.



TAHOMA_14PT
final public static Font TAHOMA_14PT(Code)
Ascent=14, descent=3, height=17, dbuX=8, dbuY=14, 14dluY=24.5px.



TAHOMA_NAME
final public static String TAHOMA_NAME(Code)
The name of the default dialog font on western Windows XP.



WINDOWS_DEFAULT_GUI_FONT_KEY
final static String WINDOWS_DEFAULT_GUI_FONT_KEY(Code)
The desktop property key used to lookup the DEFAULTGUI font. This font scales with the software resolution only but works in western and non-western Windows environments.
See Also:   Fonts.getWindowsControlFont()



WINDOWS_ICON_FONT_KEY
final static String WINDOWS_ICON_FONT_KEY(Code)
The desktop property key used to lookup Windows' icon font. This font scales with the software resolution and the desktop font size setting (Normal/Large/Extra Large). However, in some non-western Windows environments this font cannot display the locale's glyphs.

Implementation Note: Windows uses the icon font to label icons in the Windows Explorer and other places. It seems to me that this works in non-western environments due to font chaining.
See Also:   Fonts.getWindowsControlFont()




WINDOWS_VISTA_101DPI_NORMAL
final static Font WINDOWS_VISTA_101DPI_NORMAL(Code)
The default icon font on western Windows Vista with 101dpi and the dialog font desktop setting "Normal".

TODO: Check if this shall be removed or not.




WINDOWS_VISTA_120DPI_NORMAL
final public static Font WINDOWS_VISTA_120DPI_NORMAL(Code)
The default icon font on western Windows Vista with 120dpi and the dialog font desktop setting "Normal".



WINDOWS_VISTA_96DPI_LARGE
final public static Font WINDOWS_VISTA_96DPI_LARGE(Code)
The default icon font on western Windows Vista with 96dpi and the dialog font desktop setting "Large".



WINDOWS_VISTA_96DPI_NORMAL
final public static Font WINDOWS_VISTA_96DPI_NORMAL(Code)
The default icon font on western Windows Vista with 96dpi and the dialog font desktop setting "Normal".



WINDOWS_XP_120DPI_DEFAULT_GUI
final public static Font WINDOWS_XP_120DPI_DEFAULT_GUI(Code)
The default GUI font on western Windows XP with 120dpi and the dialog font desktop setting "Normal".



WINDOWS_XP_120DPI_NORMAL
final public static Font WINDOWS_XP_120DPI_NORMAL(Code)
The default icon font on western Windows XP with 120dpi and the dialog font desktop setting "Normal".



WINDOWS_XP_96DPI_DEFAULT_GUI
final public static Font WINDOWS_XP_96DPI_DEFAULT_GUI(Code)
The default GUI font on western Windows XP with 96dpi and the dialog font desktop setting "Normal".



WINDOWS_XP_96DPI_LARGE
final public static Font WINDOWS_XP_96DPI_LARGE(Code)
The default icon font on western Windows XP with 96dpi and the dialog font desktop setting "Large".



WINDOWS_XP_96DPI_NORMAL
final public static Font WINDOWS_XP_96DPI_NORMAL(Code)
The default icon font on western Windows XP with 96dpi and the dialog font desktop setting "Normal".





Method Detail
canDisplayLocalizedText
public static Boolean canDisplayLocalizedText(Font font, Locale locale)(Code)
Checks and answers whether the given font can display text that is localized for the specified locale. Returns null if we can't test it.

First checks, if the locale's display language is available in localized form, for example "Deutsch" for the German locale. If so, we check if the given font can display the localized display language.

Otherwise we check some known combinations of fonts and locales and return the associated results. For all other combinations, null is returned to indicate that we don't know whether the font can display text in the given locale.
Parameters:
  font - the font to be tested
Parameters:
  locale - the locale to be used Boolean.TRUE if the font can display the locale'stext, Boolean.FALSE if not, null ifwe don't know
since:
   2.0.4




getDefaultGUIFontWesternModernWindowsNormal
static Font getDefaultGUIFontWesternModernWindowsNormal()(Code)



getDefaultIconFontWesternModernWindowsNormal
static Font getDefaultIconFontWesternModernWindowsNormal()(Code)



getDefaultIconFontWesternWindowsVistaNormal
static Font getDefaultIconFontWesternWindowsVistaNormal()(Code)



getLooks1xWindowsControlFont
static Font getLooks1xWindowsControlFont()(Code)
Returns the Windows control font used by the JGoodies Looks version 1.x. It is intended for visual backward compatibility only. The font returned is the default GUI font that scales with the resolution (96dpi, 120dpi, etc) but not with the desktop font size settings (normal, large, extra large).

On Windows Vista, the font may be completely wrong. the Windows default GUI font that scales with the resolution, butnot the desktop font size setting
throws:
  UnsupportedOperationException - on non-Windows platforms




getWindowsControlFont
public static Font getWindowsControlFont()(Code)
Looks up and returns the Windows control font. Returns the Windows icon title font unless it is inappropriate for the Windows version, Java renderer, or locale.

The icon title font scales with the resolution (96dpi, 101dpi, 120dpi, etc) and the desktop font size settings (normal, large, extra large). Older versions may return a poor font. Also, since Java 1.4 and Java 5 render the Windows Vista icon font Segoe UI poorly, we return the default GUI font in these environments.

The last check is, if the icon font can display text in the default locale. Therefore we test if the locale's localized display name can be displayed by the icon font. For example, Tahoma can display "English", "Deutsch", but not the display name for "Chinese" in Chinese. the Windows control font
throws:
  UnsupportedOperationException - on non-Windows platforms




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.