|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.ui.FontFamily
Represents a typeface (a collection of fonts).
A font family is a collection of font faces (fonts of differing sizes and styles). We recommend that a font family should meet the following criteria:
PLAIN version of every font in the
fmaily.
BOLD
version, then all font sizes in the family should provide a BOLD
version).
Font| Field Summary | ||
static String |
FAMILY_SYSTEM
The system font family. |
|
| Method Summary | ||
static FontFamily |
forName(String name)
Retrieves font family by name. |
|
abstract Font |
getFont(int style,
int height)
Retrieves a font specified by style and size. |
|
static FontFamily[] |
getFontFamilies()
Retreives manifest of known font families. |
|
abstract Font[] |
getFonts()
Retrieves fonts provided in this family. |
|
abstract int[] |
getHeights()
Retrieves list of heights supported by this font family. |
|
String |
getName()
Retrieves this font family's name. |
|
boolean |
isHeightSupported(int height)
Determines if this font family supports a specific height. |
|
abstract boolean |
isStyleSupported(int style)
Determines if this font family supports a specific style. |
|
String |
toString()
Retrieves a string representation of this font family. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
| Method Detail |
public static FontFamily forName(String name) throws ClassNotFoundException
Use this method to retrieve the font family object that was registered with your provided name.
name - Fully qualified name of font family you want to find (note
that getName() returns only a shortened version of the name, not
the fully qualified name). Currently, the permitted value is
FAMILY_SYSTEM.ClassNotFoundException - If the font could not be found.public abstract Font getFont(int style, int height)
Use this method to retrieve a font by specifying the style and size combination you want.
Subclasses of FontFamily must implement this method.
style - Bitmask of desired styles (that is PLAIN,
BOLD, and so on).height - Desired height, in pixels.Fontpublic static FontFamily[] getFontFamilies()
Use this method to retrieve an array of all the font families registered with the system.
public abstract int[] getHeights()
Subclasses must implement this method as appropriate for their contained fonts.
public final String getName()
public final boolean isHeightSupported(int height)
Use this method to determine if this font family contains a font of a specific font height.
height - Font height you want to check.public abstract boolean isStyleSupported(int style)
Use this method to determine if this font family supports a given font style.
Subclasses of FontFamily must implement this method. We
recommend that this method should return true only if every font
contained in the font family supports the specified style.
style - Font style you want to check (that is, PLAIN,
BOLD, and so on.)Fontpublic abstract Font[] getFonts()
If this font family supports scalable fonts, this method should return null.
Note: sublcasses must implement this method.
Font objects supported by this family.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.