|
|||||||||
| 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 font typeface.
A font family is a collection of font faces (fonts of differing sizes and styles), which belongs to the same typeface.
Font| Field Summary | ||
static String |
FAMILY_SYSTEM
Name of the system font family. |
|
static int |
MONO_BITMAP_FONT
Indicates mono bitmap font type. |
|
static int |
SCALABLE_FONT
Indicates scalable font type. |
|
static int |
UNKNOWN_FONT
Indicates unknown font type. |
|
| Method Summary | ||
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
|
static FontFamily |
forName(String name)
Retrieves font family by name. |
|
Font |
getFont(int style,
int height)
Retrieves a font specified by style and size. |
|
Font |
getFont(int style,
int height,
int units)
Retrieves a font specified by style and size. |
|
static FontFamily[] |
getFontFamilies()
Retrieves the manifest of known font families. |
|
Font[] |
getFonts()
Deprecated. Use getFont(int, int) |
|
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. |
|
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 |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static int MONO_BITMAP_FONT
| Method Detail |
public boolean equals(Object obj)
Object
The equals method implements an equivalence relation:
x,
x.equals(x) should return true.
x and
y, x.equals(y) should return
true if and only if y.equals(x) returns
true.
x,
y, and z, if x.equals(y)
returns true and y.equals(z) returns
true, then x.equals(z) should return
true.
x
and y, multiple invocations of x.equals(y)
consistently return true or consistently return
false, provided no information used in
equals comparisons on the object is modified.
x,
x.equals(null) should return false.
The equals method for class Object implements
the most discriminating possible equivalence relation on objects;
that is, for any reference values x and y,
this method returns true if and only if x and
y refer to the same object (x==y has the
value true).
Objectobj - the reference object with which to compare.true if this object is the same as the obj
argument; false otherwise.Boolean.hashCode(),
Hashtablepublic static FontFamily forName(String name) throws ClassNotFoundException
Use this method to retrieve the font family object that was registered with your provided name.
name - A name of font family you want to find.
One of permitted values is FAMILY_SYSTEM.ClassNotFoundException - , see note above.public Font getFont(int style, int height)
Use this method to retrieve a font by specifying the style and size combination you want.
style - Bitmask of desired styles.height - Desired height, in units specified by the style parameter.Fontpublic Font getFont(int style, int height, int units)
Use this method to retrieve a font by specifying the style and size combination you want.
style - Bitmask of desired styles.height - Desired height, in units specified by the style parameter.units - Units modifyer in height, as defined by Ui.UNITS_*.Fontpublic static FontFamily[] getFontFamilies()
Use this method to retrieve an array of all the font families registered with the system.
public Font[] getFonts()
getFont(int, int)
If this font family supports scalable fonts, this method should return null.
Font objects supported by this family.public int[] getHeights()
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 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.)Font
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.