| 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 | |
Method Summary | |
abstract public FontPeer | createDefaultFont(int style, int size) Returns new default font peer with "Default" name for the parameters
specified. | protected FontPeer | createFontPeer(String name, int style, int size, int logicalIndex) Returns instance of font peer (logical or physical) according to the
specified parameters. | public String | createLogicalFace(String family, int styleIndex) Returns logical face name corresponding to the logical
family name and style of the font. | abstract public FontPeer | createPhysicalFontPeer(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 FontPeer | getDefaultFont(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 int | getFaceIndex(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 String | getFamily(int index) Returns family with index specified from the array of family names available in
this GraphicsEnvironment. | public String | getFamilyFromLogicalFace(String faceName) Returns family name for logical face names as a parameter. | public int | getFamilyIndex(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 FontPeer | getFontPeer(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 File | getFontPropertyFile() Returns File object with font properties. | public static FontManager | getInstance() | public Short | getLCID(Locale l) | public String | getLogicalFaceFromFont(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 int | getLogicalFaceIndex(String fontName) Returns index of the font name in array of font names or -1 if
this font is not logical. | public static int | getLogicalStyle(String lName) Return font style from the logical style name. | public static Properties | getProperties(File file) Returns Properties from the properties file or null if
there is an error with FileInputStream processing. | public int | getStyleFromLogicalFace(String name) Function returns style value from logical face name. | public File | getTempFontFile() Returns File object, created in a directory
according to the System, where JVM is being ran. | abstract public void | initLCIDTable() Platform-dependent LCID table init. | public boolean | isFamilyExist(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. |
COMPONENT_INDEX | final public static String COMPONENT_INDEX(Code) | | |
DIALOG | final static int DIALOG(Code) | | |
DIALOGINPUT | final static int DIALOGINPUT(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_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
|
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.
|
FontManager | public FontManager()(Code) | | |
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 |
|
|