Java Doc for FontManager.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » awt » gl » font » 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 » Apache Harmony Java SE » org package » org.apache.harmony.awt.gl.font 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.harmony.awt.gl.font.FontManager

All known Subclasses:   org.apache.harmony.awt.gl.font.fontlib.FLFontManager,  org.apache.harmony.awt.gl.font.WinFontManager,  org.apache.harmony.awt.gl.font.LinuxFontManager,
FontManager
abstract public class FontManager (Code)

Inner Class :protected class HashMapReference extends SoftReference

Field Summary
final public static  StringCOMPONENT_INDEX
    
final public static  StringDEFAULT_NAME
    
final static  intDIALOG
    
final static  intDIALOGINPUT
    
final public static  StringDIALOG_NAME
    
final public static  intEMPTY_FONTS_CAPACITY
     Maximum number of unreferenced font peers to keep.
final public static  shortENGLISH_LANGID
    
final public static  StringEXCLUSION_RANGES
    
final public static  byteFAMILY_NAME_ID
     Set of constants applicable to the TrueType 'name' table.
final public static  StringFONT_CHARACTER_ENCODING
    
final public static  StringFONT_FILE_NAME
    
final public static  String[]FONT_MAPPING_KEYS
    
final public static  byteFONT_NAME_ID
    
final public static  byteFONT_TYPE_T1
    
final public static  byteFONT_TYPE_TT
     Set of constants describing font type.
final public static  byteFONT_TYPE_UNDEF
    
final public static  String[]FP_FILE_NAMES
     Set of possible font.property file names.
final public static  booleanIS_FONTLIB
    
final public static  String[]LOGICAL_FONT_FACES
     Available logical font face names.
final public static  String[]LOGICAL_FONT_FAMILIES
     Available logical font families names.
final public static  StringLOGICAL_FONT_NAME
    
final public static  String[]LOGICAL_FONT_NAMES
     Available logical font names.
final static  intMONOSPACED
    
final public static  String[]OS_VALUES
     Set of possible "os" property values.
final public static  StringPLATFORM_FONT_NAME
     FontProperty related constants.
final public static  bytePOSTSCRIPT_NAME_ID
    
final static  intSANSSERIF
    
final static  intSERIF
    
final public static  StringSTYLE_INDEX
    
final public static  String[]STYLE_NAMES
     Set of font style names.
public  String[]allFamilies
    
public  Hashtable<String, Vector<FontProperty>>fProperties
     Table with all available font properties corresponding to the current system configuration.
public  Hashtable<String, HashMapReference>fontsTable
     Hash table that contains FontPeers instances.
public  ReferenceQueue<FontPeer>queue
     ReferenceQueue for HashMapReference objects to check if they were collected by garbage collector.
protected  Hashtable<String, Short>tableLCID
     Locale - Language ID hash table.

Constructor Summary
public  FontManager()
    

Method Summary
abstract public  FontPeercreateDefaultFont(int style, int size)
     Returns new default font peer with "Default" name for the parameters specified.
protected  FontPeercreateFontPeer(String name, int style, int size, int logicalIndex)
     Returns instance of font peer (logical or physical) according to the specified parameters.
public  StringcreateLogicalFace(String family, int styleIndex)
     Returns logical face name corresponding to the logical family name and style of the font.
abstract public  FontPeercreatePhysicalFontPeer(String name, int style, int size)
     Returns new physical font peer for the parameters specified using font properties This method must be overridden by subclasses implementations.
abstract public  String[]getAllFamilies()
    
abstract public  Font[]getAllFonts()
    
public  FontPeergetDefaultFont(int style, int size)
     Returns default font peer class with "Default" name that is usually used when font with specified font names and style doesn't exsist on a system.
public  intgetFaceIndex(String faceName)
     Returns index of face name from the array of face names available in this GraphicsEnvironment or -1 if no face name was found.
public  StringgetFamily(int index)
     Returns family with index specified from the array of family names available in this GraphicsEnvironment.
public  StringgetFamilyFromLogicalFace(String faceName)
     Returns family name for logical face names as a parameter.
public  intgetFamilyIndex(String familyName)
     Returns index of family name from the array of family names available in this GraphicsEnvironment or -1 if no family name was found.
public  FontPeergetFontPeer(String fontName, int _fontStyle, int size)
     Returns platform-dependent Font peer created from the specified Font object from the table with cached FontPeers instances. Note, this method checks whether FontPeer with specified parameters exists in the table with cached FontPeers' instances.
public  FontProperty[]getFontProperties(String fpName)
     Returns an array of FontProperties from the properties file with the specified property name "logical face.style".
public static  FilegetFontPropertyFile()
     Returns File object with font properties.
public static  FontManagergetInstance()
    
public  ShortgetLCID(Locale l)
    
public  StringgetLogicalFaceFromFont(int fontStyle, int logicalIndex)
     Returns face name of the logical font, which is the result of specified font style and face style union.
public static  intgetLogicalFaceIndex(String fontName)
     Returns index of the font name in array of font names or -1 if this font is not logical.
public static  intgetLogicalStyle(String lName)
     Return font style from the logical style name.
public static  PropertiesgetProperties(File file)
     Returns Properties from the properties file or null if there is an error with FileInputStream processing.
public  intgetStyleFromLogicalFace(String name)
     Function returns style value from logical face name.
public  FilegetTempFontFile()
     Returns File object, created in a directory according to the System, where JVM is being ran.
abstract public  voidinitLCIDTable()
     Platform-dependent LCID table init.
public  booleanisFamilyExist(String familyName)
     Returns true if specified family name is available in this GraphicsEnvironment.
public static  int[]parseIntervals(String exclusionString)
     Returns an array of integer range values if the parameter exclusionString has format: Range Range [, exclusionString] Range: Char-Char Char: HexDigit HexDigit HexDigit HexDigit Method returns null if the specified string is null.

Field Detail
COMPONENT_INDEX
final public static String COMPONENT_INDEX(Code)



DEFAULT_NAME
final public static String DEFAULT_NAME(Code)



DIALOG
final static int DIALOG(Code)



DIALOGINPUT
final static int DIALOGINPUT(Code)



DIALOG_NAME
final public static String DIALOG_NAME(Code)



EMPTY_FONTS_CAPACITY
final public static int EMPTY_FONTS_CAPACITY(Code)
Maximum number of unreferenced font peers to keep.



ENGLISH_LANGID
final public static short ENGLISH_LANGID(Code)



EXCLUSION_RANGES
final public static String EXCLUSION_RANGES(Code)



FAMILY_NAME_ID
final public static byte FAMILY_NAME_ID(Code)
Set of constants applicable to the TrueType 'name' table.



FONT_CHARACTER_ENCODING
final public static String FONT_CHARACTER_ENCODING(Code)



FONT_FILE_NAME
final public static String FONT_FILE_NAME(Code)



FONT_MAPPING_KEYS
final public static String[] FONT_MAPPING_KEYS(Code)



FONT_NAME_ID
final public static byte FONT_NAME_ID(Code)



FONT_TYPE_T1
final public static byte FONT_TYPE_T1(Code)



FONT_TYPE_TT
final public static byte FONT_TYPE_TT(Code)
Set of constants describing font type.



FONT_TYPE_UNDEF
final public static byte FONT_TYPE_UNDEF(Code)



FP_FILE_NAMES
final public static String[] FP_FILE_NAMES(Code)
Set of possible font.property file names. Language, Country, Encoding, OS, Version should be replaced with the values from current configuration.



IS_FONTLIB
final public static boolean IS_FONTLIB(Code)



LOGICAL_FONT_FACES
final public static String[] LOGICAL_FONT_FACES(Code)
Available logical font face names.



LOGICAL_FONT_FAMILIES
final public static String[] LOGICAL_FONT_FAMILIES(Code)
Available logical font families names.



LOGICAL_FONT_NAME
final public static String LOGICAL_FONT_NAME(Code)



LOGICAL_FONT_NAMES
final public static String[] LOGICAL_FONT_NAMES(Code)
Available logical font names.



MONOSPACED
final static int MONOSPACED(Code)



OS_VALUES
final public static String[] OS_VALUES(Code)
Set of possible "os" property values.



PLATFORM_FONT_NAME
final public static String PLATFORM_FONT_NAME(Code)
FontProperty related constants.



POSTSCRIPT_NAME_ID
final public static byte POSTSCRIPT_NAME_ID(Code)



SANSSERIF
final static int SANSSERIF(Code)



SERIF
final static int SERIF(Code)



STYLE_INDEX
final public static String STYLE_INDEX(Code)



STYLE_NAMES
final public static String[] STYLE_NAMES(Code)
Set of font style names. Font.getStyle() corresponds to indexes in STYLE_NAMES array.



allFamilies
public String[] allFamilies(Code)
array of font families names



fProperties
public Hashtable<String, Vector<FontProperty>> fProperties(Code)
Table with all available font properties corresponding to the current system configuration.



fontsTable
public Hashtable<String, HashMapReference> fontsTable(Code)
Hash table that contains FontPeers instances.



queue
public ReferenceQueue<FontPeer> queue(Code)
ReferenceQueue for HashMapReference objects to check if they were collected by garbage collector.



tableLCID
protected Hashtable<String, Short> tableLCID(Code)
Locale - Language ID hash table.




Constructor Detail
FontManager
public FontManager()(Code)




Method Detail
createDefaultFont
abstract public FontPeer createDefaultFont(int style, int size)(Code)
Returns new default font peer with "Default" name for the parameters specified. This method must be overridden by subclasses implementations.
Parameters:
  style - style of the font
Parameters:
  size - size of the font



createFontPeer
protected FontPeer createFontPeer(String name, int style, int size, int logicalIndex)(Code)
Returns instance of font peer (logical or physical) according to the specified parameters.
Parameters:
  name - font face name
Parameters:
  style - style of the font
Parameters:
  size - size of the font
Parameters:
  logicalIndex - index of the logical face name in LOGICAL_FONT_FACES array or -1 if desired font peer is not logical.



createLogicalFace
public String createLogicalFace(String family, int styleIndex)(Code)
Returns logical face name corresponding to the logical family name and style of the font.
Parameters:
  family - font family
Parameters:
  styleIndex - index of the style name from the STYLE_NAMES array



createPhysicalFontPeer
abstract public FontPeer createPhysicalFontPeer(String name, int style, int size)(Code)
Returns new physical font peer for the parameters specified using font properties This method must be overridden by subclasses implementations.
Parameters:
  faceName - face name or family name of the font
Parameters:
  style - style of the font
Parameters:
  size - font size



getAllFamilies
abstract public String[] getAllFamilies()(Code)



getAllFonts
abstract public Font[] getAllFonts()(Code)



getDefaultFont
public FontPeer getDefaultFont(int style, int size)(Code)
Returns default font peer class with "Default" name that is usually used when font with specified font names and style doesn't exsist on a system.
Parameters:
  style - style of the font
Parameters:
  size - size of the font



getFaceIndex
public int getFaceIndex(String faceName)(Code)
Returns index of face name from the array of face names available in this GraphicsEnvironment or -1 if no face name was found. Default return value is -1, method must be overridden by FontManager implementation.
Parameters:
  faceName - font face name which index is to be searched



getFamily
public String getFamily(int index)(Code)
Returns family with index specified from the array of family names available in this GraphicsEnvironment.
Parameters:
  index - index of the family in families names array



getFamilyFromLogicalFace
public String getFamilyFromLogicalFace(String faceName)(Code)
Returns family name for logical face names as a parameter.
Parameters:
  faceName - logical font face name



getFamilyIndex
public int getFamilyIndex(String familyName)(Code)
Returns index of family name from the array of family names available in this GraphicsEnvironment or -1 if no family name was found.
Parameters:
  familyName - specified font family name



getFontPeer
public FontPeer getFontPeer(String fontName, int _fontStyle, int size)(Code)
Returns platform-dependent Font peer created from the specified Font object from the table with cached FontPeers instances. Note, this method checks whether FontPeer with specified parameters exists in the table with cached FontPeers' instances. If there is no needed instance - it is created and cached.
Parameters:
  fontName - name of the font
Parameters:
  _fontStyle - style of the font
Parameters:
  size - font size platform dependent FontPeer implementation created from the specified parameters



getFontProperties
public FontProperty[] getFontProperties(String fpName)(Code)
Returns an array of FontProperties from the properties file with the specified property name "logical face.style". E.g. "dialog.2" corresponds to the font family Dialog with bold style.
Parameters:
  fpName - key of the font properties in the properties set



getFontPropertyFile
public static File getFontPropertyFile()(Code)
Returns File object with font properties. It's name obtained using current system configuration properties and locale settings. If no appropriate file is found method returns null.



getInstance
public static FontManager getInstance()(Code)
Gets singleton instance of FontManager instance of FontManager implementation



getLCID
public Short getLCID(Locale l)(Code)
Return language Id from LCID hash corresponding to the specified locale
Parameters:
  l - specified locale



getLogicalFaceFromFont
public String getLogicalFaceFromFont(int fontStyle, int logicalIndex)(Code)
Returns face name of the logical font, which is the result of specified font style and face style union.
Parameters:
  fontStyle - specified style of the font
Parameters:
  logicalIndex - index of the specified face from the LOGICAL_FONT_FACES array resulting face name



getLogicalFaceIndex
public static int getLogicalFaceIndex(String fontName)(Code)
Returns index of the font name in array of font names or -1 if this font is not logical.
Parameters:
  fontName - specified font name



getLogicalStyle
public static int getLogicalStyle(String lName)(Code)
Return font style from the logical style name.
Parameters:
  lName - style name of the logical face



getProperties
public static Properties getProperties(File file)(Code)
Returns Properties from the properties file or null if there is an error with FileInputStream processing.
Parameters:
  file - File object containing properties



getStyleFromLogicalFace
public int getStyleFromLogicalFace(String name)(Code)
Function returns style value from logical face name.
Parameters:
  name - face name font style



getTempFontFile
public File getTempFontFile() throws IOException(Code)
Returns File object, created in a directory according to the System, where JVM is being ran. In Linux case we use ".fonts" directory (for fontconfig purpose), where font file from the stream will be stored, hence in LinuxFontManager this method is overridden. In Windows case we use Windows temp directory (default implementation)



initLCIDTable
abstract public void initLCIDTable()(Code)
Platform-dependent LCID table init.



isFamilyExist
public boolean isFamilyExist(String familyName)(Code)
Returns true if specified family name is available in this GraphicsEnvironment.
Parameters:
  familyName - the specified font family name



parseIntervals
public static int[] parseIntervals(String exclusionString)(Code)
Returns an array of integer range values if the parameter exclusionString has format: Range Range [, exclusionString] Range: Char-Char Char: HexDigit HexDigit HexDigit HexDigit Method returns null if the specified string is null.
Parameters:
  exclusionString - string parameter in specified format



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.